Philip Guenther suggested to David Gikandi,
| You should probably mean to match against only the Subject:
| header field or the body. That can be done most easily with two recipes:
|
| :0
| * ^Subject:.*\
| \<((time( +|-)?out|\
| did( +no|n'?)t +get|\
| miss(ing|ed)|\
| havent +got|\
| everything +but|\
| i +only +g[oe]t)\>|\
| rec(ei|ie)v)
| * ! ^Subject:.*768sdfds
| |(formail -rtk; \
| cat /usr/apache/htdocs/search/mailtemplates/Missingouts.txt \
| ) | $SENDMAIL $SENDMAILFLAGS -t
|
| :0 B
| * \<((time( +|-)?out|\
| did( +no|n'?)t +get|\
| miss(ing|ed)|\
| havent +got|\
| everything +but|\
| i +only +g[oe]t)\>|\
| rec(ei|ie)v)
| * ! 768sdfds
| |(formail -rtk; \
| cat /usr/apache/htdocs/search/mailtemplates/Missingouts.txt \
| ) | $SENDMAIL $SENDMAILFLAGS -t
Actually, it can be done with only one recipe, but Philip will have to let
us know which way is more efficient:
:0HB
* ^^(.+$)*(Subject:|$(.*$)*)(.*\<)?((time( +|-)?out|\
did( +no|n'?)t +get|\
miss(ing|ed)|\
havent +got|\
everything +but|\
i +only +g[oe]t)\>|\
rec(ei|ie)v)
* ! 768sdfds
|(formail -rtk; \
cat /usr/apache/htdocs/search/mailtemplates/Missingouts.txt \
) | $SENDMAIL $SENDMAILFLAGS -t