{"id":1121,"date":"2012-02-06T09:09:32","date_gmt":"2012-02-06T17:09:32","guid":{"rendered":"http:\/\/www.redwireservices.com\/?p=1121"},"modified":"2014-08-18T15:30:37","modified_gmt":"2014-08-18T22:30:37","slug":"postfix-smtp-relay-via-godaddy-alternate-port-and-others","status":"publish","type":"post","link":"https:\/\/www.redwireservices.com\/postfix-smtp-relay-via-godaddy-alternate-port-and-others","title":{"rendered":"Postfix SMTP Relay Via GoDaddy Alternate Port (and others)"},"content":{"rendered":"
Occasionally\u00a0we need to configure\u00a0outgoing\u00a0SMTP services for a customer, and it’s often\u00a0convenient\u00a0to relay through their current email provider. \u00a0Today we did just that for a customer using GoDaddy hosted email. \u00a0As 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).<\/p>\n
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! \u00a0I’ll do my best to document all the changes, but your\u00a0mileage\u00a0may vary.<\/p>\n
smtpout.secureserver.net user@mydomain.com:MySecretPassword<\/span><\/span><\/pre>\n\n- Set the correct permissions, and postmap the file for postfix’s use:<\/li>\n<\/ul>\n
sudo chmod 600 \/etc\/postfix\/sasl_passwd<\/span><\/span><\/pre>\nsudo postmap \/etc\/postfix\/sasl_passwd<\/span><\/pre>\n\n- Next configure postfix to use this password, and set the relay\/port, by updating \/etc\/postfix\/main.cf with the following:<\/li>\n<\/ul>\n
relayhost = [smtpout.secureserver.net]:3535\r\nsmtp_sasl_auth_enable = yes\r\nsmtp_sasl_password_maps = hash:\/etc\/postfix\/sasl_passwd\r\nsmtp_sasl_security_options = noanonymous\r\nsmtp_sasl_type = cyrus\r\nmynetworks = 192.168.1.0\/24, 127.0.0.0\/8<\/pre>\n
\n- Note:<\/li>\n
\n- Update mynetworks<\/em>\u00a0to match your local network.<\/li>\n
- The settings above work for GoDaddy’s smtpout.secureserver.net, they may differ for different services.<\/li>\n
- 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.<\/li>\n<\/ul>\n<\/ul>\n
I truly hope that saves you an hour of work or two. Special thanks to Freelock<\/a>\u00a0for their article, which I reference all the time. \u00a0That was the basis of my work this morning.<\/p>\n","protected":false},"excerpt":{"rendered":"Configuring a relayhost in postfix with the appropriate authentication setup can be tricky, this post will help you set up postfix correctly to relay through GoDaddy’s smtpout.secureserver.net using an alternate port (3535). Continue reading