Why use postfixadmin? Isn’t this overkill?
If you’re running a Linux system at home, you’re quite likely to be using Postfix as your mail transfer agent MTA. Postfix has been around for years and is secure and relatively easy to maintain. Most Linux distributions come with a configuration utility which makes it even easier.
Like almost all other Linux applications, the configuration files are plain text files sitting in the /etc
directory so any text editor can be used to maintain these.
Postfix also works well with things like IMAP servers like Dovecot. This makes it straightforward to set up a home mail server that you can access from outside your home and on your smartphone.
One thing you probably have used is the aliasing function. Even if you haven’t explicitly set an alias, when you’ve ticked a box for a user to receive system mail you’ve set up an alias to forward all sorts of system generated mail to that user.
A simple alias file may look like:
# Sample aliases file. Install in the location as specified by the # output from the command "postconf alias_maps". Typical path names # are /etc/aliases or /etc/mail/aliases. # # >>>>>>>>>> The program "newaliases" must be run after # >> NOTE >> this file is updated for any changes to # >>>>>>>>>> show through to Postfix. # # Person who should get root's mail. Don't receive mail as root! root: joe # Basic system aliases -- these MUST be present MAILER-DAEMON: postmaster postmaster: root # General redirections for pseudo accounts bin: root daemon: root named: root nobody: root uucp: root www: root ftp-bugs: root postfix: root # Put your local aliases here. # Well-known aliases manager: root dumper: root operator: root abuse: postmaster
(This is the Opensuse factory-fitted file)
This simply says that if a message to the postmaster or the manager arrives, forward it to the root user. When it gets to the root user, it sees another alias, so the mail ends up being delivered to joe (who is probably the owner).
For a simple set up this works well. It’s easy to add a new alias and run the newaliases
command to rebuild the map so that postfix can read it.
So why use PostfixAdmin?
Even if you only have a few users, it could be worth setting this up for several reasons:
- Adding a new user is simply a matter of adding them in the postfix.admin web application. You don’t need to re-generate any may files.
- Create simple mail lists. Use the Add Alias function to create a new list by creating the name and adding the members in the box.
- Temporary aliases. create aliases for your domain so you can use (& track) different email addresses from website sign-ups
- Easily disable users or aliases without deleting mailboxes
- Easily creating test domains, or domain forwarding if you have several domains
- You don’t need access to the machine (directly or via SSH) to maintain the system so you could even manage it remotely if you set your server up to allow outside contact (remember to secure it via HTTPS first)
- Postfix makes sure every thing is consistent preventing configuration errors
- (If you maintain mailing lists, then the MailMan mailing list manager can be easily integrated into this set-up. I will probably cover this in a later post
- By holding credentials in a database, other applications can also authenticate against it meaning one username/password can can used across multiple systems.
However, there is a bit more work required when setting up postfix to work in this way, but I think it’s worth the effort because once it’s done, looking after the system becomes very easy as the web interface makes it easy to see what you’re doing.
On the bright side, there are a lot of web resources to help you and the required packages are available in almost all Linux distributions and also on FreeBSD, so you don’t need to start from scratch. I haven’t installed these on windows or Mac OS’s, but this would be possible also.
Useful Links
- http://www.postfix.org
- http://postfixadmin.sourceforge.net
- http://www.dovecot.org