Comment on page

SMTP Relay Configuration

The following documentation will provide you with step-by-step guidance on configuring a local mail server as an SMTP relay to the EmailLabs service. Through this configuration, you can send email messages using a queuing mechanism, which will enhance the stability, efficiency, and reliability of the sending process. Furthermore, should there be a connection problem between the local server and EmailLabs servers, the sending process will restart automatically.
By enabling advanced SMTP protocol mechanisms such as "pipelining" and connection caching, you will enhance the performance and reliability of the sending process, especially in the case of high traffic.
To correctly configure the Postfix server, log in as root or obtain root privileges using the su or sudo command. Then, in the configuration file /etc/postfix/, add the following entry:
relayhost = []:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/relay_password
smtp_sasl_security_options =
Next, you need to create a password file at the path mentioned in the previous entry:
cd /etc/postfix/ touch relay_password
In the created file, add: user_name:password
Save the file and for security, change the file permissions using the command:
postmap /etc/postfix/relay_password
chmod 600 /etc/postfix/relay_password /etc/postfix/relay_password.db
If you don't have the libsasl2 (SASL) library installed, make sure to install it before restarting Postfix.
Finally, you should restart the Postfix server.
/etc/init.d/postfix restart
To configure Sendmail as a mail relay, log in as root, or obtain root privileges using the 'su' or 'sudo' command. Then, add the following line to the file /etc/mail/access: "U:user_name" "P:password "M:PLAIN"
In the next step, you should configure the Smart Host in the /etc/mail/ file. Under the line starting with #dnl define... add:
define(RELAY_MAILER_ARGS', TCP $h 587')dnl
define(ESMTP_MAILER_ARGS', TCP $h 587')dnl
Then, you need to update the entered data. Navigate to the /etc/mail/ folder and execute the following commands:
m4 >
makemap hash access < access
Remember to restart the Sendmail server:
/etc/init.d/sendmail restart