E-mail Delivery Service Server Side Configuration: CentOS + Plesk + Postfix


Here are steps to configure your server for use with SoftLayer’s E-mail Delivery Service as a SmartHost. The example below was performed with a standard SoftLayer OS Reload of CentOS 6.5 with Plesk 12 and Postfix. 


The Following configuration changes will allow you to utilize the power of SendGrid with your Linux-Based Plesk server. The first thing that you will need to do is find your Postfix configuration file, normally /etc/postfix/main.cf. Once you've located this file, open it with your favorite text editor (vim, nano, etc.) and add the following to the configuration:

smtp_sasl_auth_enable = yes

smtp_sasl_password_maps = static:<Your SendGrid Username>:<Your SendGrid Password>

smtp_sasl_security_options = noanonymous

smtp_tls_security_level = encrypt

header_size_limit = 4096000

relayhost = [smtp.sendgrid.net]:587

Be sure that you're entering your SendGrid username and password in the fields outlined above (without the brackets). At this point, you can save and close the /etc/postfix/main.cf file, and restart postfix using:

/etc/init.d/postfix restart


1) If after you perform the above steps you encounter an error stating that there is "no mechanism available," this means that you're likely missing some libraries that are vital for authentication/encryption.
You can install these libraries using:
Debian/Ubuntu:  apt-get install libsasl2-modules
Redhat/CentOS: yum install cyrus-sasl-plain
Once you've installed these libraries, you can issue the same restart command above:
/etc/init.d/postfix restart
2) If after your install you find that port 587 isn't working for you, you can opt to use port 2525 in the postfix configuration listed above. You may also need to edit the configuraiton file /etc/postfix/main.cf  and uncomment the line: 
#tlsmgr unix - - n 1000? 1 tlsmgr