Operating System - Linux
1828483 Members
2818 Online
109978 Solutions
New Discussion

Re: help wit procmail ...

 
K.C. Chan
Trusted Contributor

help wit procmail ...

All,
I have this:
:0
* ^Subject:.*msgs
{
SUBJECT=`formail -zx Subject:`
:0 Bfhw
* (hda|Drive)
| formail -I "Subject: DiskError $SUBJECT"
:0
* (hda|Drive)
! user1@abc.com, user3@yahoo.com
}

The forwarding line does not work, it seems that as soon as the first match occurs on the ":O bfhw", it skips ":O". Any idea on how to get two action to execute, I am looking to modify the subject line, have the email drop to my mail box, and forward it to others as well.
Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
5 REPLIES 5
Chakravarthi
Trusted Contributor

Re: help wit procmail ...

hope this works
Q: Can I list several actions under a common condition? How?

A: Here you go:

:0
* common-condition
{
:0fbw
* perhaps an additional condition on this one, even
| sed -e 's/definately/definitely/g' -e 's/seperate/separate/g'

:0c:
* perhaps an additional condition on this one, too
action1

:0
! action2
}
http://laku19.adsl.netsonic.fi/era/procmail/mini-faq.html#recipe-block
K.C. Chan
Trusted Contributor

Re: help wit procmail ...

got it to work. Now does any one knows how to make sure I don't get an ifinite loop from this rule?

Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
Chakravarthi
Trusted Contributor

Re: help wit procmail ...

K.C. Chan
Trusted Contributor

Re: help wit procmail ...

Thanks again. Now I need to also pipe that to a script without loosing what I have. Where would I insert a new procmail rule?
Reputation of a thousand years can be determined by the conduct of an hour
Chakravarthi
Trusted Contributor

Re: help wit procmail ...