Zsombor B:
> Hi All,
> 
> I need your thoughts.
> 
> Some of our customers wanted us to forward all emails sent to some  
> recipient domains to 3rd party relay servers instead of the mail  
> server defined in the recipient domain's MX records.
> 
> Also they provided smtp username and password for these relay servers.
> 
> I.e.
> - *@foo1.bar is sent to mailprovider-X.com with foo1user + foo1pass
> - *@foo2.bar is sent to mailprovider-Y.com with foo2user + foo2pass
> - etc.

If these email messages are sent by your customers, you need:

- In master.cf, one dedicated Postfix SMTP client per customer,
with its own "-o smtp_sasl_passwd_maps=maptype:mapname" setting
with that customer's login information for the remote servers.

smtp-custxxx   unix  -      -      -      -      -      smtp
   -o smtp_sasl_passwd_maps==hash:/etc/postfix/sasl-custxxx
   
- In main.cf, "smtp_sender_dependent_default_transport_maps =
maptype:mapname", and use that table select the dedicated Postfix
SMTP client for each customer.

This ensures that the right customer's login is used with the 
right renote SMTP server, and only for email sent by that customer.

        Wietse

Reply via email to