Copy administrator on all to:abuse@xxx messages?

Discussion in 'Installation/Configuration' started by grant, Sep 20, 2007.

  1. grant

    grant New Member

    I'm running ISPConfig with postfix on Ubuntu.

    Each domain has their own [email protected] email alias setup.

    Is there any way to set it up so that my admins get copied on all messages to abuse@<any domain>?

    That way both people running the domain, and the people running the server, get to see those messages.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    It might be possible to do this by adding a permananet redirect for all abuse@... emails in the procmail recipes of the user accounts. Or it might be possible to do this with the postfix aliases, but I dont know if you can use aliases to deliver the original mail and forward it to a second account.
     
  3. grant

    grant New Member

    I thought about doing it through procmail. The problem is that if they don't set up an abuse@ email address, postfix will still reject the mail. I can work with that, but it's not ideal.

    The ideal setup would be:

    - Postfix accepts email for abuse@<any hosted domain>
    - The email gets sent to [email protected]
    - If there is an abuse@thatdomain email setup, it also gets sent there.

    Anyone know how to accomplish that?
     
  4. falko

    falko Super Moderator Howtoforge Staff

    You could take a look at Postfix transports:
    Code:
    man 5 transport
     
  5. grant

    grant New Member

    The closest I could find with postfix was to add a BCC to another address. This works, however Postfix will still reject mail for any domain that hasn't setup an abuse@... email address.

    So, since I have to force them to add it anyways, I may as well just do it in procmail.

    My example below assumes admindomain.com is the domain you want the mails forwarded to.


    Here's what I added to /root/ispconfig/isp/conf/procmailrc.master (put it right under the line "{MAILDIR_COMMENT}ORGMAIL=$MAILDIR"
    PHP:
    # Copy system admins on any mail to abuse@... or postmaster@...
    # Dont copy us on mail already addressed to us, mailer loops are bad.
    :0c
    * !^X-Original-To:.*postmaster@admindomain.com
    * ^X-Original-To:.*postmaster@
    postmaster@admindomain.com

    :0c
    * !^X-Original-To:.*abuse@admindomain.com
    * ^X-Original-To:.*abuse@
    abuse@admindomain.com
     

Share This Page