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.

    Customer Feedback

    I had the privilege of working with John and Freelock in launching a new Little League website. The process was flawless and the end product was magnificent exceeding our expectations.

    John knows his stuff! He had a wonderful ability to bring the perfect solution to our community based organization. Being volunteer run, we needed some special considerations in the way our website works, John understood this and delivered solutions that were perfect for us.

    We now have a cool website that also has the ability to grow with us into the future.

    I highly recommend John Locke and Freelock Computing.

    Brian Boone
    Pacific Little League

    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-2010 Freelock Computing