Local MTA – advantages

Local mail servers such as Postfix or Sendmail are the most reliable ways to forward e-mail to EmailLabs™. Setting up your application in a way that sends e-mails to EmailLabs ™ by using a smart host, will use the mechanism of queueing, allowing you to get a higher stability and bandwidth. In addition, by excessive load, or a loss of connection between the EmailLabs™ server and the local server, the transmission will resume as soon as possible.

With high traffic, local relays are able to take advantage of more advanced SMTP mechanisms, such as pipelining and caching connections. Thanks to this, the mail server is able to send a lot more e-mails, than a single script reconnecting for every single message.

Mail server configuration

Postfix Configuration

To properly configure Postfix log in as root or obtain root privileges using the su or sudo command, then in the configuration file /etc/postfix/main.cf add the following entry:

Next, create a password file in accordance with the path that we provided in the previous post:

Add to the created file:

Save the file and for security reasons change the permissions for the file with the command:

If you do not have libsasl2 library (SASL) installed, install it before restarting postfix

Finally, restart the postfix server