Wietse: > Milters must see the entire SMTP session, not just the RCPT TO > command. > > If you want different Milters for different domains, configure > different smtpd services in master.cf, each listening on a different > IP address, one with milter and one without. Then point each > domain's MX records to the appropriate IP address.
Kirill Peskov: > Ouch! Sounds not really as 'elegant' solution... Thank you for the quick > response, anyway. There is nothing inelegant about using two IP addresses, but I suppose you don't have that. > Is there any way to pass the message through content filter (which > can potentially amend the content of the message or even bounce > it if the message does not fit certain criteria) JUST before passing > it to the lmtp (dovecot in my case) for the final delivery to the > recipient's mailbox? There is no content filter interface "in front of Postfix delivery agents. There is the after-queue filter as described in http://www.postfix.org/FILTER_README.html. You could set up two Postfixen, and follow instructions in http://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup 1 - The Internet facing gateway MTA that relays mail to final MTAs. Here, you would set transport_map entries for local domains that point to the second machine. 2 - The MTA that delivers local mail. You can do the Milter stuff in this MTA. The two MTAs could be running on the same box, connected via 127.0.0 and some non-standard port. Wietse