View Single Post
  #3  
Old 7th December 2012, 16:42
thewebguy thewebguy is offline
Junior Member
 
Join Date: Dec 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, just for anyone else looking to do this, the following is how to achieve it:

Create /etc/postfix/my_aliases.regexp file

Insert the following:

/^(postmaster|domains|root|abuse|webmaster|sysadmin )@/ admin@mydomain.com

(You can alter the global aliases you wish to use by adding them within the brackets above and separating them with | ).

Change admin@mydomain.com to wherever you wish the emails to be directed to.

Save the file and exit.

Edit the following file:
/etc/postfix/main.cf

Find the section that starts virtual_alias_maps and add the following:

regexp:/etc/postfix/my_aliases.regexp

So the line should read something similar to this:

virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman, regexp:/etc/postfix/my_aliases.regexp
Reply With Quote