email address with domain alias

Discussion in 'General' started by dmgeurts, Oct 21, 2016.

  1. dmgeurts

    dmgeurts Member

    Getting to terms with DMARC I've noticed that sending reports to an external domain requires the external domain to have a DNS TXT entry permitting this. this however means I need to create a TXT entry for each sending domain in the zone file of the receiving domain. Great if you don't have many domains to cater to.
    So, I think I'd prefer to have the reports sent back to the same domain but don't want to create a mailbox for this for each domain. My users after all expect me to manage this for them and I don't like the admin work of lots of email accounts to manage.
    Enter the user alias (dmarcreq@), as opposed to the domain catch all alias "". I think this is what it would look like: "/^dmarcreq@/". But where to put this? The ISPConfig email alias interface doesn't allow for regex entry. I could manually insert something in the mysql table, but rather I'd add a file in /etc/postfix/ and set the custom alia- there. What would the best way be of setting this alias so any email to dmarcreq@* is forwarded to a single account?
    (ISPConfig 3.1)
    Last edited: Oct 25, 2016
  2. dmgeurts

    dmgeurts Member

    Simple non mySQL solution:
    To allow each domain to receive DMARC reports on their own domains (no need to add lots of TXT reconrds to the domain, we install portfix-pcre, create a PCRE file and add it to
    Install postfix-pcre:
    sudo apt install postfix-pcre
    Create /etc/postfix/dmarc_aliases.pcre:
    vi /etc/postfix/dmarc_aliases.pcre
    Paste the following into the new file:
    # RUA catch-all
    /^dmarc.aggregate@/ dmarcreq@<>

    Add pcre:/etc/postfix/dmarc_aliases.pcre, to the start of the virtual_alias_maps string in /etc/postfix/
    virtual_alias_maps = pcre:/etc/postfix/dmarc_aliases.pcre, hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:/etc/postfix/, proxy:mysql:/etc/postfix/

    Restart postfix:
    service postfix restart
    electronico_nc and Jesse Norell like this.
  3. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    And make sure to create a conf-custom file with your changes, so you don't loose them the next time you upgrade ispconfig.
    dmgeurts likes this.

Share This Page