procmail
[Top] [All Lists]

Re: how do i run something _after_ the mail is delivered?

2001-10-05 16:21:40
On Fri, Oct 05, 2001 at 04:53:47PM +0100, Stephen Shirley wrote:
Hi,
      What I want to do is run a script once i know the mail in question
has been delivered into one of my mailboxes. Here is an example of what
I'm trying:

It would probably be safer to do 



:0     #catch some spam
* ^From: (_dot_)*spammer(_at_)blah(_dot_)com
/dev/null

:0 ciw #run script
|/path/to/script.sh

:0:
* ^From mailing-list1
Mailing-list1

:0:
* ^From mailing-list2
Mailing-list2

# This is not needed. $DEFAULT is called that for a reason.
#:0: #catch any non-mailing list mail
#${DEFAULT}

However this doesn't seem to work reliably. I tend to get double mails
into some of the mailling list folders. Can anyone see any problems with
the above .procmailrc?

You probably need to tighten up your matching a bit. Changing the order of
your recipes also means you only have one copy to deliver going into your
mailing list section.

-- 
Andrew Edelstein        -       andrew(_at_)pure-chaos(_dot_)com
http://andrew.pure-chaos.com

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>