Delivering root mail locally while relaying others

In order to deliver some accounts locally, you can set up virtual aliases as follows:

1. Add the following line to /etc/postfix/main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual
mail_spool_directory=/var/spool/mail

2. Create /etc/postfix/virtual as follows:
root root@localhost

3. postmap /etc/postfix/virtual

4. Restart postfix

Note: Make sure that /etc/aliases doesn’t have root’s mail being redirected

About vicki

Welcome to the Sovereign Republic of Vickistan. I am the President here. Lucky me! No taxes or laws yet. Lucky you!
This entry was posted in Linux. Bookmark the permalink.