Mail filtering and forwarding

I have a domain, call it A, which is stuck on dialup. It gets about 600K (!) emails a day, 599K of which are pure spam to accounts which don't exist, such as bill123.

A different computer, call it B, acts as primary MX for A, directing all non-account messages to the bit bucket and forwarding the remaining 1000 messages to A over dialup. Most of these are also spam, but both I and dialup can deal with them easily enough.

B is a 5 year old machine running qmail, used for some other purposes as long as it is around, but filtering and forwarding are the only real reasons for its continued existence. A friend told me about Linode and it seems tailor made for replacing B, which is getting a bit long in the tooth, especially for a laptop.

This mail filtering could be handled by a simple regex on the RCPT TO: envelope recipient (^(postmaster|root|webmaster|account1|account2)), but for various reasons, it is currently handled by a Perl program invoked by qmail's dot-forward process. It usually has a load factor of around .4. That would certainly drop on a modern machine with a proper qmail install which didn't need to invoke Perl on every message, even though I used PersistentPerl to speed things up. Storage is minimal except when I bork A and it takes a day or two for my poor sysadmin skills to recover.

So, several questions.

1. Is this a good fit for a Linode 360 running slackware or gentoo? No X, no rdbms, no apache, just a mail server and ssh, maybe djbdns.

2. I originally migrated to qmail years ago when it was that or sendmail and I got tired of all the sendmail security holes. I like many things about qmail, but I do not like the proliferation of patches, and especially the confusing conflicting combined patches. I have thought about switching to postfix but don't have a spare machine to play with. Does anyone with experience with both have any comments? Is this filtering, a regex on the RCPT TO: envelope recipient and nothing else, enough enough to do in postfix? How about the forwarding from B to A? It's been ages since I actually did much to qmail, and I have never done more than skim documents, so I would be basically starting from scratch.

3. I see many references to "dedicated IP addresses". Is this Linode-speak for static IP addresses? I don't want a dynamic address for A's primary MX provider; even if the DHCP server and DNS are tightly integrated and switch together,, there is still the matter of other machines using the cached old incorrect IP address for an hour or two after. If static IP addresses are available but not standard, how much do they cost?

4. When I set up a machine myself, I always keep it offline until I have set up the firewall and services. How does this work under Linode?

The very concept of Linode tickles my brain, and I can see lots of ways to experiment for only $20 a month. Heck, the first thing I might try would be a secondary MX at a different data center. The possibilities are endless.

6 Replies

1. A 360 will easily handle your proposed tasks.

2. As you're more-or-less starting over, I recommend postfix.

3. Static IPs are standard.

4. Linodes are connected to the net as soon as you configure them - it's the only way to load software onto them. Job one - install a firewall. You can disable eth0 if you want to tinker in peace via the console.

Just wanted to add a specific answer: yes, Postfix supports PCREs as valid account names. Since they get compiled once, and don't require an actual Perl instance, it's quite fast.

Alrighty then! Postfix it is ….

Do you have any recommendations for docs, sample configs, etc? Last time I looked, the official docs seemed a bit verbose and flatulent, but it has been a few years …

Any recommendation on Slackware vs Gentoo? I haven't run Slackware for several years since I got a 64 bit machine, just gentoo, but they have a half-assed qmail build which makes me wonder if their postfix build is just as amateurish … if not, then the familiarity of gentoo probably overrides the simplicity of slackware. I don't like being an admin and try to keep it to a minimum.

All the others are right out.

I'll put in my fanboyish support for Slackware(or Slamd64if you want to bootstrap up to it from Slackware).

As far as Postfix goes, I would recommend the Postfix SlackBuild. Thats what I use on my Linodes.

I'll play the gentoo fanboy just to balance things out :)

I've never tried qmail, so I can't compare to that, but I've been using postfix under gentoo for years and have no complaints.

I've done most of my setup based on the flatulent docs on postfix.org, so I can't really tell you a good HOWTO on setting things up the way you want. Most that I have seen are going for a full-blown mailserver with imap/pop and mysql configs, with various anti-spam setups. If all you want is what you described in your original post, I think here is a good start.

Well, maybe I will give gentoo a try then. The unstable versions get farked often enough to make me wish for Slackware's stability, but if it's only a simple mail server, there won't be any need for programs marked unstable. My slackware is just rusty enough to make me leery … but since this is a new install, I can probably set up two disk images and switch between, as long as the mail queue is on its own disk image. This linode setup is looking more and more interesting.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct