On 05-18-2021 8:53 am, Wietse Venema wrote:
Wietse Venema:
Remove the recipient domain from main.cf:mydestination and
main.cf:virtual_mailbox_domains.

Add the recipient domain to main.cf:relay_domains.

Actually, here is a simpler one, that uses content_filter.

master.cf:
    submission .. .. .. .. smtpd
        -o { content_filter = smtp:[mxhost.example.com] }
-o { smtpd_recipient_restrictions = permit_sasl_authenticated, reject }
        -o smtpd_relay_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_helo_restrictions=
        -o smtpd_client_restrictions=

I have been playing around with some ideas and i found that main.cf:virtual_transport=smtp:mxhost.example.com (mostly) gives the behavior im looking for. On the two server setup it will send mail from the submission:587 server and deliver it to the smtp:25 server.

But for the single all in one server configuration, i tried:

main.cf:
virtual_transport=virtual

master.cf:
submission inet n - n - - smtpd
   -o virtual_transport=smtp:mxhost.example.com

However the -o option under submission is ignored and the mail is still delivered to the virtual transport. Is there a way to split that behavior so transport in main.cf goes to virtual and transport under submission goes to smtp: ?

Reply via email to