This article describes how to configure Postfix to blindly accept all emails, meaning receive email without checking the recipient. This setup is useful as a backup or archive mail destination.
Create the Virtual Mail User Account

1. Create a new user, we will call it vmail. Change the Login Shell to /sbin/nologin, this user account should not be used for logging in. Learn how to use the User Manager application here.
3. Click the Groups tab and now note down the Group ID of vmail. We’ll be needing all of them later.Configuring Postfix and Dovecot

1. Edit the file /etc/postfix/main.cf and add the lines below.
virtual_transport = dovecot virtual_mailbox_domains = $mydomain
userdb static {
args = uid=501 gid=501 home=/home/vmail/%u allow_all_users=yes
}
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = vmail
group = vmail
}
}
uid, gid and home should contain the user id, group id and home directory respectively of the vmail user account.
Comment out all the other passdb and userdb sections except for those specified above to ensure that nothing will conflict with our virtual accounts setting.
3. Restart the Postfix or MailScanner service if you have installed it. Do the same for Dovecot. Learn how to start and stop services here.
If you encounter any problems, check the log file at /var/log/maillog.Visit the forum to ask for help or to give a comment.
***
Posted on 2/13/2010 and last updated on 3/21/2010
Filed under Postfix
