Configure Postfix only to send mail

Very often you need to send mail only. For example, your web site sends some notifications by email only. In this case, there’s a reason to configure you MTA (main transfer agent) only to send emails.

In case of Postfix, only some options should be edited to force your Postfix to send mail only.

/etc/postfix/main.cf

inet_interfaces = loopback-only
mydestination =

Comment existing inet_interfaces and mydestination if they’re exist by using # at the beginning of the line.

Don’t forget to reload Postfix:

  sudo /etc/init.d/postfix reload

For more information you may read Postfix on a null client.