Postfix to use a third party SMTP server

3 Mar

This instructs postfix to use a third party SMTP server. It’s useful when you want to relay e-mail from an internal server which uses a dynamic IP address.

Ensure postfix is installed, and let’s have all e-mail sent to root relay to an external e-mail address:

nano /etc/postfix/sender_canonical
root     youremail@provider.tld

Postfix requires the modifications to be hashed:

postmap hash:/etc/postfix/sender_canonical
postconf -e "sender_canonical_maps=hash:/etc/postfix/sender_canonical"

Now let’s instruct postfix to use third party SMTP to route e-mail:

nano /etc/postfix/main.cf
relayhost = yoursmtp.provider.tld
service postfix restart

Finally update system aliases:

nano /etc/aliases
root:   email@domain.tld
newaliases

6 thoughts on “Postfix to use a third party SMTP server

  1. Wonderful work! That is the kind of information that are supposed to be shared across the web. Shame on Google for no longer positioning this put up higher! Come on over and seek advice from my website . Thank you =)

  2. [url=https://fastpriligy.top/]can i buy priligy in usa[/url] There s no way, I can t can lasix cause erectile dysfunction be bothered, I can t be bothered, let s Enzyte Natural Male Enhancement can lasix cause erectile dysfunction just bear with it

Leave a Reply

Your email address will not be published.