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 = 192.168.1.0/24, 127.0.0.0/8
- 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.
4 Responses to Postfix SMTP Relay Via GoDaddy Alternate Port (and others)