Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to have postfix store mail in a maildir in /var/mail/<DOMAIN>/<USER>. I've got

mail_spool_directory = /var/mail

and I'm preparing

home_mailbox =

but I don't know where to go from there.

Assistance please?

EDIT: SF ate my tag. Please re-read to determine paths.

share|improve this question
Should I assume the < DOMAIN > will be variable (not a hard coded)? – user1797 May 11 '09 at 18:29
Correct. Otherwise, this would be easy :) – Glen Solsberry May 11 '09 at 18:35
All right. Deleting my answer, as it isn't precisely what you are asking. – user1797 May 11 '09 at 18:41
Are you using Procmail as the delivery agent? – user1797 May 11 '09 at 18:44
Not yet. Haven't gotten that far :) – Glen Solsberry May 11 '09 at 19:10
up vote 3 down vote accepted

It sounds like you want Vritual mailbox delivery. This is well-documented at the Postfix website, and will do exactly what you are asking. Note that you will need to do some lookup tables for this, although the official docs do mention that you can use a SQL backend at some point, should it all become too unmanageable.

share|improve this answer

The only way I can think of to accomplish what you want is the using Procmail (or alike with similar capabilities) as the delivery agent. With procmail, something like this on the system wide procmailrc would work:

* RECIPIENT ?? .*@\/.*$
share|improve this answer
As there are other MTAs that may use Procmail in a similar fashion, +1 for MTA-agnostic answer... :) – Avery Payne May 12 '09 at 3:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.