OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Lars Hecking (lheckingnmrc.ie)
Date: Wed May 02 2001 - 06:57:50 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    > I want to filter outbound mail. When the user 'pepedomain.com' sends mail,
    > I want to send a copy of the message to another address. Any suggestions? I
    > know how to match the sender address with regexp, but I don't know how to
    > make the cc to another address.

     Check out always_bcc in /etc/postfix/sample-misc.cf. Set up an account for
     this, and use .forward with procmail:

     /etc/postfix/main.cf:
        always_bcc = some_accountmy.dom.ain

    $ cat ~some_account/.forward
    "|IFS=' ' && exec /usr/sbin/procmail -f- || exit 75 #some_account"

    $ cat ~some_account/.procmailrc
    SHELL=/bin/sh
    VERBOSE=off
    LOGFILE=/dev/null

    :0:
    * !^From.*pepedomain\.com
    /dev/null

    :0
    ! yet_another_accountmy.dom.ain

     The last recipe is optional if you want to keep the copied messages
     in some_account's mailbox. Otherwise, they'll be fwd'd to
     yet_another_accountmy.dom.ain.

     Watch out for mail loops!

    -
    To unsubscribe, send mail to majordomopostfix.org with content
    (not subject): unsubscribe postfix-users