Making Postfix Accept All Mail and Stick It In One Inbox

After a long, long time with qmail, I acknowledged the onward march of progress and acceptable licensing terms; I moved on to Postfix. I've found it offers me the balance of features that I want and need from an industrial-strength MTA, with excellent configuration flexibility.

To make your copy of Postfix drop all email into one mailbox, do the following:

Create a file called /etc/postfix/virtual, replacing username with your desired delivery target:


Next create a file called /etc/postfix/virtual_domains, with the single line:

/.*/ MATCH

run postmap to compile these two files,

postmap /etc/postfix/virtual
  postmap /etc/postfix/virtual_domains

You then need to add or change the following two lines in your /etc/postfix/

virtual_alias_maps = regexp:/etc/postfix/virtual
mydestination = regexp:/etc/postfix/virtual_domains

Restart postfix,

  /etc/init.d/postfix restart

...and all email will now be dropping into one inbox. If you need or want separate inboxes for testing purposes, the virtual_alias_maps file, /etc/postfix/virtual, is the place to look.