I'm very new to email, so I have decided to use PostFix for outgoing email only, and then use gmail for incoming email.

I realize this will be a big learning experience for me, but what tutorials should I be looking at? Since I am using it for outgoing only, is there anything I should skip or focus on?

5 Answers 5


You can look at: http://www.hypexr.org/linux_mail_server.php It's a tutorial for postfix and a complete mail system, but it's kind of pretty well divided and explained for the different parts of the system, so you may only ommit the parts about outgoing email...

I followed it and the first thing I could do was to receive emails, and then to send them, so I can assume that a similar process may help you for your needs...

  • great, looking at it now.
    – Blankman
    Nov 27, 2010 at 18:38
  • what is pacman?
    – Blankman
    Nov 27, 2010 at 18:40
  • oh! beware that this tutorial is written from the perspective of someone using Arch Linux distribution, so just change pacman for the package manager your distro uses, mmm perhaps yum, apt, whatever! Nov 29, 2010 at 14:42
  • This doesn't really answer the question. What you are trying to do per your question exactly is create a postfix null client. Apr 25, 2014 at 7:48
  • you can always send a better answer ;) Apr 26, 2014 at 14:37

You want to set up postfix as a null client.


If it's new to you I'd consider blocking inbound port 25 using a firewall.

It removes the possibility of you being used as an open relay if you configure it incorrectly.

We used Postfix for several years and it's not that difficult to configure, but there's much less emphasis on "right first time" if you don't have it exposed to the internet as you have time to experiment and test.


From the comments in main.cf:

The relay_domains parameter restricts what destinations this system will relay mail to. See the smtpd_recipient_restrictions restriction in the file sample-smtpd.cf for detailed information.

By default, Postfix relays mail - from "trusted" clients (IP address matches $mynetworks) to any destination, - from "untrusted" clients to destinations that match $relay_domains or subdomains thereof, except addresses with sender-specified routing. The default relay_domains value is $mydestination.

In addition to the above, the Postfix SMTP server by default accepts mail that Postfix is final destination for: - destinations that match $inet_interfaces, - destinations that match $mydestination - destinations that match $virtual_alias_domains, - destinations that match $virtual_mailbox_domains. These destinations do not need to be listed in $relay_domains.


Postfix is very flexible and can be configured in different ways. For example, it can be configured with mysql, postgresql, or ldap.

First, you need to decide how you want to configure your email server.

You can start from postfix documentation. Of course, you can search for other howtos and tutorials. To narrow your search use something like: "postfix+mysql" if you want to configure it with mysql and so on.

  • yeah I want to go the mysql route, virtual users makes more sense to me so far...
    – Blankman
    Nov 24, 2010 at 16:34

You must log in to answer this question.

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