.qmail Files - The Story According to Me:

I've never fully understood how the various .qmail files hang together. It's always seemed a bit of a mystery (why do I need .qmail and .qmail-default? Why can't I get .qmail-forename-surname to work?)

Referring to man dot-qmail and the excellent Life With Qmail I have the answer. Miracles happen when you RTFM.

As to what you should put in your .qmail files, Life With Qmail is your friend.


.qmail

.qmail (no extension) is used to override the default delivery method specified by /var/qmail/rc (or whatever you called it after copying an example in /var/qmail/boot.

It only does this for address such as fred@example.com, where fred is the user ID and not an alias etc. You'll see the Delivered-To: line in the message header with just fred@example.com. It has no effect whatsoever on fred-bloggs@example.com. You're most likely to see this on a system where messages are distributed to local users rather than a virtual domain user.

If all of your mail is "Delivered-To: fred@example.com" you don't need a ".qmail" file at all, unless you wish to override the default delivery method.


.qmail-default

.qmail-default is by contrast used only for address such as fred-bloggs@example.com. It has no effect on fred@example.com, but does affect fred-smith@example.com, fred-smithers@example.com, fred-anything@example.com. This is typically what you'd see if you're user ID is used as the local user for a virtual domain.

If our mail is "Delivered-To: fred-smith@example.com" you must have at least a ".qmail-default" or your message will be bounced.

You can of course decide to use .qmail-fred-smith instead, which will mean that fred-smith@example.com will be delivered, but fred-smithers@example.com won't, unless .qmail-default exists.

There's some more funky detail to this, here


.qmail-forename.surname

And finally, the ubiquitous forename.surname@example.com. Why does Qmail not cope with .qmail-forename.surname? Simple. To stop possible security breaches when some smart a*se sends a message to forename..surname which may subsequently be interpreted by a shell as a parent directory reference.

How do I do it then? stop wibbling, man!

.qmail-forename:surname - replace your dot with a colon.


This page was last updated 21/11/03

home