Hi, everyone! I'm setting up my mail gateway to forward some emails like [email protected] to a different machine (instead of the machine where regular user mailboxes reside).
Would the following setup work as intended? Meaning my exceptions-list is checked first; I use the same domain name and wildcards to forward all other user emails. Note: I use relay_recipient_maps to verify that user even exists before relaying anything. (I tested it and it initially worked, but I'm not certain it will keep working if I renew the transport-table with postmap) In main.cf I define the following: relay_recipient_maps = hash:/etc/postfix/relay_recipients transport_maps = hash:/etc/postfix/exceptions, hash:/etc/postfix/transport .... smtpd_relay_restrictions = permit_mynetworks, reject_unauth_destination /etc/postfix/exceptions: [email protected] :[x.x.x.x] [email protected] :[x.x.x.x] hash:/etc/postfix/transport: #wildcards instead of defining each user one by one # [email protected] :[x.x.x.x] # [email protected] :[x.x.x.x] example.com :[x.x.x.x] .example.com :[x.x.x.x] /etc/postfix/relay_recipients: [email protected] [email protected] [email protected] [email protected] and so on.... Sincerely, Jonathan
