Forum Discussion
Thomas_Walker_1
Jan 06, 2005Historic F5 Account
Can we use an iRule to dispatch SMTP messages?
I have a request to route mail messages based on the RCPT TO: field. Is there a reliable way in v9 to collect enough of the initial mail transaction so we may read the RCPT TO: portion and send the e...
unRuleY_95363
Jan 10, 2005Historic F5 Account
Thom,
Yes, this type of rule should be feasible. You would use a simple tcp profile and the commands TCP::collect, TCP::payload, TCP::payload replace, and TCP::respond to collect, parse, and modify the SMTP messages.
However, the error detection and recovery is going to be the largest and hardest part of the rule. For example, the "MAIL FROM:" command may come before the "RCPT TO:" command. In that case, we would need to supply a fake/proxied response, likely a "250 xxx... Sender ok". However, later when the server has been picked and we are now replaying the initial portion of the connection to the chosen server, we may instead get a "553 xxx... Domain name required" or "501 xxx... Sender domain must exist". There is very little recourse of action at this point, since the clientside of the rule has already responded with the 250. Perhaps just resetting the connection would work here.
If anyone out there has the desire to work on this rule, then please post it to DevCentral. Otherwise, we may eventually get a chance to develop this rule and we'll be sure to post it in the Downloads section.
Another approach would be to contract through our professional services organization to develop the rule.
Hope this helps.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects