I have one remote SMTP server I want to relay mail through, but connect to it 
using differing credentials based on sender; using Postfix 2.3

My relevant main.cf is:

  relayhost =
  smtp_sender_dependent_authentication = yes
  sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_maps
  #sender_dependent_default_transport_maps = hash:/etc/postfix/transport
  smtp_sasl_auth_enable = yes
  smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
  smtp_sasl_mechanism_filter = AUTH LOGIN
  smtp_sasl_security_options =

relayhost_maps:

  @company-a.com   [secure.mailrelay.com]
  @company-b.com   [secure.mailrelay.com]

sasl_passwd:

  @company-a.com   u...@company-a.com:passwordA

Reply via email to