My Love/Hate relationship with a MTA

I can't recall the first mail transport agent (MTA) that I used when I first got started with Gentoo. I'm fairly certain it was not sendmail and I think it was, in fact, postfix itself (this is way before Gentoo made ssmtp the default). Since I had no interest in running an email server back then, I used it only for local mail delivery, and as it turns out, configuring postfix for local mail delivery only is surprisingly easy.

I use the mail command to read my local email, as well as write scripts using this command to send emails to my 'real' email accounts via pipe in scripts. Sure, postfix is overkill for this, but it does what I need it to do.

When getting local mail working, little more needs to be done than setting the myhostname, myorigin, inet_interfaces, and mynetworks_style parameters in postfix's main.cf file to local values. I set mail_spool_directory = /var/spool/mail so my mail gets stored in a spool file, although mail gets put into ~/mbox "magically." I've never been particularly interested in email systems, nor do I care to know much more about them than this post - just so we're clear.

Anyways, on several occasions it slips my mind to change the default mailbox size limit, which is apparently ~50 MB (currently it's 51047696 bytes). This is a frustratingly small limit, especially since most of my systems have hundreds of gigabytes to a few terabytes of disk space. The solution of course is simple; just add the following to main.cf:

mailbox_size_limit = 536870912

Bam. Mailbox size increased to 512 MB (512 * 1024 * 1024). No more space problems.

Another handy trick, if you don't like using local mail delivery as much as I do, or you want a more centralized place to read machine email (such as from a special email account...), is to simply use the age old .forward files. Also painless:

# echo "vlad@where.ever.com" > ~/.forward

And email will automatically be forwarded to your email account - assuming a couple hundred other settings are also set correctly (like the MX for where.ever.com accepts mail from your host, smtp works, your machine is on...you get the idea).

I think that covers the love part of it. The hate part is setting up real mail servers. Virtual accounts, multiple domains, spam filtering, antivirus filtering, black/white listing...you get the idea. It's a fscking nightmare. Especially when your users start requesting stuff like POP3 *and* IMAP - then discover that email is "insecure" and want to use TSL wrapped SMTP, etc. Ugh. It SUCKS.

No doubt there's other platforms that are more email friendly than Gentoo - ones with GUI tools that make life easier - but you learn from doing things the hard way. Oh well, there's always Microsoft Exchange...;)

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Copy the characters (respecting upper/lower case) from the image.