My servers are currently on sendmail which is not very efficient. I'd like to migrate to PostFix.

I'm using Google Mail for Domain for handling incoming email so I need to setup PostFix to send emails only. What's the minimal PostFix configuration I must do to set up outgoing email delivery and prohibit receiving email? All localhost emails are trustable by default.


The postfix documentation tells you exactly what you need to do.

  • The only thing I would like to ask is what if I have many domains on the machine? PostFix manual says set up a domain-wide alias database that aliases each user to user@that.users.mailhost - but how do I do that? – Vladislav Rastrusny Apr 20 '11 at 10:01
  • The origin is usually appended only if you have not set your sender domain. You can set up address rewriting to set the domain based on the sender, but I don't think it's necessary if your client is setting the domain. – Cakemox Apr 20 '11 at 11:17
  • alas OpenSMTPD is much easier then changing one parameter entails other.. – Denis Denisov Feb 7 '15 at 15:42

I suggest you instead use msmtp as just an outgoing email server. Simpler than configuring postfix, and there's no chance you will ever accidentally configure it to recieve mail (because it can't).

Here's a howto for configuring msmtp as your system mailer.

  • I do not forward email to provider's gate currently. Can msmtp sent it directly to destination servers efficiently? I have emails sending every several seconds from the server. – Vladislav Rastrusny Apr 20 '11 at 7:48
  • If it's a few mails a minute, msmtp should be fine. However, it sounds like you may be approaching the point where something like postfix makes more sense, especially since postfix can store and retry messages much better than msmtp. – Phil Hollenback Apr 20 '11 at 8:05
  • Yea... SO that's why I asked ;) – Vladislav Rastrusny Apr 20 '11 at 8:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.