Prolateral Consulting Ltd
Prolateral Consulting Ltd
Knowledgebase Articles
Setup examples

Prolateral offers primary and backup domain (DNS) services, with servers in key geographic locations providing the best service possible.


How to setup a Mail Relay in Postfix?
How to setup a SMTP Mail Relay in Postfix?


Follow the guide below to configure Postfix to use outMail as a Internet Mail Relay.

This article already assumes your Postfix system is able to send emails externally and that you are already have a terminal connection to your server with the necessary access rights to manage and administor postfix.

First you need to create a password file for postfix to use. Create a file called /etc/postfix/relay_passwd and add the following lines to that file OUTMAILUSERNAME:OUTMAILPASSWORD

where OUTMAILUSERNAME and OUTMAILPASSWORD are the (case-sensitive) information provided when you set up your account.

To enable postfix to use the outMail service at the prompt type the following

postconf -e
postconf -e smtp_sasl_auth_enable=yes
postconf -e smtp_sasl_password_maps=hash:/etc/postfix/relay_passwd 
postconf -e smtp_sasl_security_options=noanonymous
postconf -e smtp_sasl_mechanism_filter=plain,login

postmap /etc/postfix/relay_passwd 

For the above changes to take effect the postfix service will need restarting (service postix restart)

service postix restart


Problem Solving

Below is a list of common gotchas.

SASL authentication failure

In your postfix logs you see message smilar to "mail postfix/smtp: warning: SASL authentication failure"

Double check you did the following

postmap /etc/postfix/relay_passwd
postfix reload 

SASL authentication failure: No worthy mechs found

In your postfix logs you see message smilar to "mail postfix/smtp: warning: SASL authentication failure: No worthy mechs found"

This usually indicates that the library SASL2 (Simple Authentication Secuiryt Layer) isn't installed.  Install the libsasl2-modules

sudo apt install libsasl2-modules

For CentOS, you may need to install cyrus-sasl and cyrus-sasl-plain.  You may also need to install cyrus-sasl-lib.

sudo yum -y install cyrus-sasl
sudo yum -y install cyrus-sasl-plain
sudo yum -y install cyrus-sasl-lib


Summary of server details

Outgoing server

As provided in your signup email.

Outgoing server protocol


Outgoing server port

25, 465, 587, 2525 or 8025

Authentication Type

Basic Authentication, SSL and TLS supported


As provided


As provided


like it, love it, then share it. Share this article on social media.

Did you enjoy this article?


The Origin of this information may be internal or external to Prolateral Consulting Ltd. Prolateral makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Prolateral makes no explicit or implied claims to the validity of this information. Any trademarks referenced in this document are the property of their respective owners.