procmail
[Top] [All Lists]

Re: How to notify another e-mail address

2000-12-15 11:24:20
Harry Jensen wrote:
Take "from" address and name.
Send a notification to my_other_address(_at_)another_isp(_dot_)dk(_dot_)
The note should be: "You've got mail from " + from_e-mail_address + from_name.

With that syntax I can see why someone might think of perl, and you
can certainly go that way.

I'd probably approach it differently, though, maybe something like
this as a starting point...

# when mail comes to oneAddress(_at_)oneISP, inform 
my_other_address(_at_)another_isp(_dot_)dk
# Don't do it, though, if mail comes from the FROM_DAEMON set, and
# be careful of mail loops.

:0 hci
* ! ^FROM_DAEMON
* ! ^X-Loop: *oneAddress(_at_)oneISP
* ^From: *\/.*
| (formail "-fITo: root(_at_)localhost" "-AX-Loop: oneAddress(_at_)oneISP" < 
/dev/null; \
    echo "You've got mail from $MATCH") | \
    $SENDMAIL $SENDMAILFLAGS my_other_address(_at_)another_isp(_dot_)dk


# other recipes here

hth
-- 
Neither I nor my employer will accept any liability for any problems
or consequential loss caused by relying on this information.  Sorry.
Collin Park                         Not a statement of my employer.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail