title: postfix sender dependent relayhost
body: <p>I want a single sending address to use a different gmail account, and all others to use the default gmail account.</p>
  
  <p>As most tutorials online say this should work, but postfix uses the default smtp user name and password for all emails...</p>
  
  <p>Is there any documentation for postfix that can help?
  Sender dependent tls encryption also appears to not be an option... am I wrong?</p>
  
  <pre><code>### main.cf ###
  relayhost = smtp.gmail.com:587
  smtp_sasl_auth_enable=yes
  smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
  sender_dependent_relayhost_maps=/etc/postfix/senderDependentRelayHostMap
  
  smtp_use_tls = yes
  smtp_sasl_security_options = noanonymous
  smtp_sasl_tls_security_options = noanonymous
  smtp_tls_note_starttls_offer = yes
  smtp_tls_...
  
  ### senderDependentRelayHostMap ###
  test@gmail.com smtp.gmail.com:587
  
  ### sasl_password ###
  #per sender email stmp username and password
  test@gmail.com test@gmail.com:testPass
  #default route
  smtp.gmail.com:587 default@site.com:defaultPass
  </code></pre>