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.

2 Answers 2


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 [email protected] - but how do I do that? Apr 20, 2011 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, 2011 at 11:17
  • alas OpenSMTPD is much easier then changing one parameter entails other.. Feb 7, 2015 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. Apr 20, 2011 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. Apr 20, 2011 at 8:05
  • Yea... SO that's why I asked ;) Apr 20, 2011 at 8:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .