Take the 2-minute tour ×

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
add comment

2 Answers

up vote 2 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
add comment

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
add comment

Your Answer


