Help me set up Postfix, please.
January 24, 2007 12:44 PM   RSS feed for this thread Subscribe

Postfix Mail Server Setup: Help me cut through the cruft.

I'm attempting to set up a mail server using Postfix and Courier. I'd like to avoid having to learn every single detail about Postfix in order to configure it.

I've worked with several HowTos, but all of them conflict with eachother as far as where mail is stored, how virtual users are set up, and so on. None of the HowTos include all of what I'm interested in.

What I'd like to have:
  • Basic mail server with virtual users and one domain. The domain could be virtual if it makes things easier, or not. This is one of many conflicts between howtos.
  • Able to use some kind of web control panel to add/edit users and quotas once initial configuration is finished. This is where almost all of the HowTos don't work - they all end with "And now, all you have to do is edit these complex text files to do even the simplest things! Isn't this clever? Here are some perl scripts!" PHPMyAdmin to edit the databases where users are stored does not count.
My question: Why isn't there a simple-to-install package for Postfix that's mostly set up as above? Is the above somehow uncommon? Why is everyone forced to come up with "Well, this worked for me, YMMV, here's my main.cf" in their HowTos?

Is there an easy-to-install Postfix package? Perhaps a pre-configured dedicated distro?

If it helps, I'm using Ubuntu.
posted by odinsdream to computers & internet (3 comments total) 2 users marked this as a favorite
Virtual domains aren't easier, per se, but they do allow you to get away without having a system account for each mailbox.

Lately, I've taken to using Horde to administrate my Postfix users, since all my users get Horde access, but it can't really do quotas. It could put an entry in the user table, but it can't make them user configurable easily.

I think the reason there isn't a pre-configured package relates to the conditions that you could store all your data in files or in one of several different databases, you may want to store your mailboxes in an odd place, and really, there is no good admin software for it. Also, these things are generally set up by ISPs who have existing user databases and management systems they have to tie into.

The thing is that it doesn't really matter where you store the mailboxes, or even how your virtual user table is set up to a large degree. (I know this isn't very helpful, but it's the best I can do ;)): What works for me, is to store the address, password, maildir, and transport type (which isn't really needed, if all your accounts are virtual) in the database, in addition to a login name if you want pop/imap to be different than their email address.

The uid and gid fields, I take care of with a static map in the main.cf, like "virtual_uid_maps = static:" and 'virtual_gid_maps = static:".

If it were me, unless I were planning on expanding or using SMTP AUTH for outgoing mail, I'd just do what I used to do and create system users for each account. That way you're not relying on a database and you can use tools like webmin to manage everything, including quotas.

posted by wierdo at 1:37 PM on January 24, 2007


Oh, and there is a package to handle the administrative aspects of it, but it costs money and is a piece of crap, IMO..it's called cPanel. ;) I think Directadmin will do it, too.

There are some dedicated and vps hosting providers that offer servers that are pretty much ready to go with admin panels, only requiring a bit of firewall tweaking.
posted by wierdo at 1:44 PM on January 24, 2007


My question: Why isn't there a simple-to-install package for Postfix that's mostly set up as above? Is the above somehow uncommon? Why is everyone forced to come up with "Well, this worked for me, YMMV, here's my main.cf" in their HowTos?

To answer this question, it's because setting up a mail server is far from a one-size-fits-all thing, and as a result, it's really not possible for there to be a "simple-to-install package" that will work for anything close to a majority of the people who want to use it. Mail servers do a LOT of things -- they set up various services to accept mail, then figure out what belongs on your system and doesn't, possibly run the incoming mail through various filters, and finally deliver it to the mailboxes of the users. The services can run on a few different ports (depending on your system); systems can have one or more of dozens of user configurations (e.g., simple username-based users, virtual users mapped to actual user accounts, catch-all addresses mapped to actual user accounts, distribution lists mapped to multiple users, aliased users mapped to command-line applications that process mail, etc.); there are oodles and oodles of filters and processors that can plug into mail systems; there are half a dozen or more major apps to manage users' mailboxes (all the various flavors of IMAP servers, all the various flavors of POP servers, etc.). And that's all just the incoming mail side, nevermind the outgoing mail side.

Add to that the various network configurations that impact how a mail server is configured -- whether it's an edge mail router, a core mail server, a mail relay agent, etc.. Add to that all the various ways a mailserver has to be able to determine which machines are allowed to connect to them in order to send mail, so that they can try to not be enormous spam sieves. Add to THAT all the different authentication schemes that mail servers might have to be able to speak in order to allow senders to authenticate and send their mail. Etc., etc., etc.. And for administration, Postfix would either have to ship with its own built-in webserver, figure out how to integrate with your pre-existing webserver, or some other option.

So in the end, there aren't simple-to-install Postfix packages because the core concept isn't all that amenable to that way of distribution; there are way, way too many variables involved.
posted by delfuego at 7:43 PM on January 24, 2007


« Older Garageband problem or hardware...   |   How do I update rows in a tabl... Newer »
This thread is closed to new comments.