• Nick was vital to creating and implementing a disaster recovery plan (DRP) for my business. We are extremely dependent on our network and database […] To be down or our security compromised would create a real financial hardship. We truly appreciated Nick’s professional and creative approach to our DRP […] Thanks Nick!
    Kimberly Dodd, CPA, Broker

Postfix SMTP Relay Via GoDaddy Alternate Port (and others)

Occasionally we need to configure outgoing SMTP services for a customer, and it’s often convenient to relay through their current email provider.  Today we did just that for a customer using GoDaddy hosted email.  As an additional challenge, this customer’s ISP did not allow outgoing requests on port 25 (default for SMTP), so we must use one of the alternate ports GoDaddy provides (we choose port 3535).

This configuration always seems to be fragile and hard to get right the first time, so I hope this post saves some frustration for GoDaddy users!  I’ll do my best to document all the changes, but your mileage may vary.

  • Configure username and password by entering the following line in /etc/postfix/sasl_passwd:
smtpout.secureserver.net user@mydomain.com:MySecretPassword
  • Set the correct permissions, and postmap the file for postfix’s use:
sudo chmod 600 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
  • Next configure postfix to use this password, and set the relay/port, by updating /etc/postfix/main.cf with the following:
relayhost = [smtpout.secureserver.net]:3535
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_type = cyrus
mynetworks =,
  • Note:
    • Update mynetworks to match your local network.
    • The settings above work for GoDaddy’s smtpout.secureserver.net, they may differ for different services.
    • Some articles claim that you should include the port number (3535) in the /etc/postfix/sasl_passwd file, but that didn’t work for me.

I truly hope that saves you an hour of work or two. Special thanks to Freelock for their article, which I reference all the time.  That was the basis of my work this morning.

This entry was posted in LinkedIn, Off The Wire, Tech Tips and tagged , , . Bookmark the permalink.

4 Responses to Postfix SMTP Relay Via GoDaddy Alternate Port (and others)

  1. Nick says:

    Hi, I was wondering if you setup any TLS settings. Most guides I found online use some sort of TLS. I was wondering if it’s needed for this.

    • Nick Webb says:


      TLS is optional, but good to use if you can as without your messages and perhaps your password will be transmitted in the clear, and someone could see/hijack them. If that is not a problem for you, then the above configuration should work fine. Otherwise, I suggest you look into using TLS or SMTPS.

      This example may help.

      Per that, you may just be able to specify

      smtp_tls_security_level = encrypt

      If your smtp server supports it.

      Good luck,

  2. squiggie says:

    Hello, you have a typo in your second directive. It says “sudo chown 600 /etc/postfix/sasl_passwd” and should be “sudo chmod 600 /etc/postfix/sasl_passwd”

    It should be chmod instead of chown

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.