On Wed, Mar 04, 2015 at 09:38:46PM +0300, Eugene R wrote:

> Alternatively you could forward-copy a message to some simple script but I
> don't remember off-hand how to setup such forward in Postfix.

In this case:

    main.cf:
        indexed = ${default_database_type}:${config_directory}/
        recipient_bcc_maps = ${indexed}rcpt-bcc
        transport_maps = ${indexed}transport
        notify_destination_recipient_limit = 1

    rcpt-bcc:
            u...@example.com    noti...@example.net@notify.example.com

    transport:
            notify.example.com  notify

    master.cf:
            notify    unix  -       n       n       -       -       pipe
                flags=DOR user=nobody argv=/usr/local/bin/notify.sh ${mailbox}

The "notify.sh" script needs to generate the apppriate notice.  It
can look at the message headers to extract the subject, or other
data as appropriate.  The notification address will be the
"noti...@example.net" portion of the bcc address.

-- 
        Viktor.

Reply via email to