Postfix relayhost SMTPs / SASL with rackspace smtp.emailsrvr.com

Skriven: 07/08/2010 | Av: samuel | Tags: , , ,

Having run into the problem myself, how to setup postfix with rackspace as the relayhost, running over SMTPs I thought I’d share the solution. I’ve seen a bunch of forums where this question has been asked but not been answered.

Start by creating the user that should be used for relay, don’t forget to set it’s permission in the rackspace control panel to allow for SMTP (SSL) login.

1. /etc/postfix/main.cf

This shows what config is unique to rackspace, setup the rest as you prefer.

relayhost = [smtp.emailsrvr.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_pass
smtp_sasl_security_options = noanonymous
smtp_use_tls = yes

2. /etc/postfix/sasl_pass

[smtp.emailsrvr.com]:587          account@domain.com:mypassword

After file is created, set permissions to 640.
chmod 640 /etc/postfix/sasl_pass

Create the hash with postmap
postmap hash:/etc/postfix/sasl_pass

3. Restart postfix / done

service postfix restart
That should do it, best of luck!

2 Kommentarer »