Automatically allowing postmaster@domain

Discussion in 'Installation/Configuration' started by thewebguy, Dec 6, 2012.

  1. thewebguy

    thewebguy New Member

    Is there a way that when adding a domain to ISPConfig or when setting up the domain for email services that it can automatically add the postmaster@newdomain.com address to the postmaster or root account of the server itself?

    There is an RFC standard that requires this but without manually creating that alias or forwarder for each new domain which is going to be a pain, I cannot see a way.

    Any help as always greatly appreciated.

    Thanks
     
  2. till

    till Super Moderator

    You can create a global postmasetr alias in the postfix aliases file.

    The RFC requires it but most likely you will just get tons of spam on these addresses, so most poeple dont create this address. If someone wants to contact you as representative of a domain, he can lookup your company address in the whois records of the domain.
     
  3. thewebguy

    thewebguy New Member

    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
     

Share This Page