Dear Grtz,
Thank you very much for your advice on my recipe. For reference, my
recipe was (the square brackets contain a single space.):
:0
* ! WL ?? ^^yes^^
* ^From:([ ]$|$)|!^From:|^From:.*<>
{
WL="yes"
:0 fwh
| formail -I"Cc: (no from) ${CC_}"
}
You said that the ! (negation) in the second condition line had to be at
the beginning. However Timo Salmi, whom I am sure you have heard of,
gives this recipe in his "Timo's procmail tips and recipes":
:0:
* !^From:.*\.hk\.|\
!^From:.*\.kr\.|\
!^From:.*\.tr\.
* !^TO_myid@([-a-z0-9_]+\.)*myhost\.mydom
ProbableSpam.mail
To be honest I have never used a negation in a compound condition line in
any of my recipes. It would be very easy for me to check. However,
Timo's paper got quite a bit of peer review.
I also tried doing the check of missing "From:" (and emtpy from, etc.)
using scoring, like this:
:0
* 1^0 ^From:([ ]$|$)
* 1^0 !^From:
* 1^0 ^From:.*<>
/dev/null
This is very straightforward and it should trash any mail with no from
line at all. But it still passed mails that show no from line at all in
the headers.
This is very hard for me to understand. It is as though there is a hidden
from line. Everything else that I am doing with procmail works fine.
Debugging the check for a missing from header is a bit difficult, since I
cannot easily generate a test email with no from header.
Regards,
Lloyd
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail