I was wondering how to distinguish inbound from outbound SMTP transactions.
Normally this would be a straightforward question, however my SMTP server has to handle a special case:
- Other domains might point to my MX domain (mail address aliases)
What outbound criteria should I check for? Is it as simple as checking if the transaction is authenticated (via the AUTH command), or do any other rules apply (derived from the FROM/RCPT addresses)? I guess alias addresses can be detected by resolving their MX?