How to to set up Postfix for Dyn’s Email Delivery.

Configure Postfix to Send Through Email Delivery

For the purpose of this document, we are assuming that Postfix is installed and able to send mail. The paths and commands used below for specifying file locations are specific to Ubuntu/Debian; your file paths or exact editing commands may differ depending on the operating system you are using. The changes to the configuration files are the same.

We support TLS on port 25 or 587.

  1. Edit the main.cf file for Postfix.
    sudo vi /etc/postfix/main.cf
  2. Add the following lines to this file (main.cf):
    smtp_sasl_auth_enable=yes 
    smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd 
    smtp_sasl_security_options=
    
  3. Update the relayhost line (in main.cf) to:
    relayhost=smtp.email.dynect.net:25
  4. Create the sasl_passwd file in the same directory as main.cf.
    sudo vi /etc/postfix/sasl_passwd
  5. Add the following line, replacing <username> with your Email Delivery login name and <password> with your Email Delivery password (without the greater-than and less-than symbols):
    smtp.email.dynect.net <username>:<password>
  6. Give the password file the correct permissions.
    sudo chown root:root /etc/postfix/sasl_passwd && sudo chmod 600 /etc/postfix/sasl_passwd
  7. Generate the password hash.
    sudo postmap hash:/etc/postfix/sasl_passwd
  8. Remove your clear text password file.
    sudo rm /etc/postfix/sasl_passwd
  9. Reload Postfix.
    sudo postfix reload
  10. The last step is to ensure the email address you use to send email from is listed as an approved sender in Dyn’s Email Delivery.
Note: If you are using SASL authentication, you must use the following RPM package: cyrus-sasl-plain. Visit PostFix for further documentation on configuring SASL authentication.