Postfix relayhost

These are the basic steps to set up Postfix to use SMTP Authentication to send mail through a relay host.

  • Set up a password maps file (/etc/postfix/sasl_passwd) as follows:

  • mail.ispserver.com username:password

  • chown root:root /etc/postfix/sasl_passwd; chmod 600 /etc/postfix/sasl_passwd
  • postmap /etc/postfix/sasl_passwd
  • In /etc/postfix/main.cf:

  • relayhost = mail.ispserver.com
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options =

  • postfix reload


  • Also, if this is the first SASL service installed on the machine, make sure there's an appropriate SASL plugin installed:

  • urpmi --media main libsasl2-plug-login libsasl2-plug-plain



  • That should do it! Postfix will log into the relay host using the smtp auth username and password. It's possible to set different logins for different servers, by adding more lines to the map file. Security options must be cleared to allow plaintext logins.

    Freelock Blog Posts

    Customer Feedback

    Freelock were very helpful and supportive in helping me realize my vision for a website. They have deep technical expertise, and are capable of delivering on advanced features and functionality. They also have a genuine, longer-term commitment to making your website a success, and are always on-hand to provide great suggestions.

    F. Gardella
    Cool Day Trips

    About Freelock

    We are located in the Fremont neighborhood of Seattle, WA. 3800 Woodland Park Ave. N. Seattle, WA 98103  USA [P] 206.577.0540 Contact Us | Site Map Get Updates ©1995-2011 Freelock Computing