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

107 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

  3. det. Denne side har bestemt alle de oplysninger, jeg ønskede om dette emne, og vidste ikke, hvem jeg skulle spørge. Dette er min 1. kommentar her, så jeg ville bare give en hurtig

  4. at web, except I know I am getting familiarity all the time by reading thes pleasant posts.|Fantastic post. I will also be handling some of these problems.|Hello, I think this is a great blog. I happened onto it;) I have bookmarked it and will check it out again. The best way to change is via wealth and independence. May you prosper and never stop mentoring others.|I was overjoyed to find this website. I must express my gratitude for your time because this was an amazing read! I thoroughly enjoyed reading it, and I’ve bookmarked your blog so I can check out fresh content in the future.|Hi there! If I shared your blog with my Facebook group, would that be okay? I believe there are a lot of people who would truly value your article.|منشور رائع. سأتعامل مع بعض هذه|

  5. hello there and thanks on your information – I have definitely picked up anything new from proper here. I did on the other hand expertise some technical points using this web site, since I skilled to reload the site lots of times prior to I may just get it to load correctly. I have been pondering in case your web host is OK? No longer that I’m complaining, however sluggish loading cases occasions will sometimes affect your placement in google and could damage your high-quality ranking if ads and ***********|advertising|advertising|advertising and *********** with Adwords. Anyway I’m adding this RSS to my email and can glance out for a lot extra of your respective fascinating content. Make sure you replace this once more very soon..

  6. Com tanto conteúdo e artigos, alguma vez se deparou com problemas de plágio ou violação de direitos de autor? O meu site tem muito conteúdo exclusivo que eu próprio criei ou

  7. nenarazili jste někdy na problémy s plagorismem nebo porušováním autorských práv? Moje webové stránky mají spoustu unikátního obsahu, který jsem vytvořil.

  8. Hello, i read your blog from time to time and i own a similar one and i was just wondering if you get a lot of spam remarks? If so how do you reduce it, any plugin or anything you can suggest? I get so much lately it’s driving me crazy so any help is very much appreciated.

  9. Wow that was strange. I just wrote an extremely long comment but after I clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyways, just wanted to say excellent blog!

  10. obviously like your web-site however you need to take a look at the spelling on quite a few of your posts. Several of them are rife with spelling problems and I find it very bothersome to inform the truth nevertheless I will certainly come back again.

Leave a Reply

Your email address will not be published.