procmail
[Top] [All Lists]

Re: why is >> making files size=0 ?

2001-12-04 04:44:27
Someone else asked for a verbose log... unfortunately it doesn't seem
to overwrite it every time, so it would be hard to pinpoint when it
did happen in the log

OH!

You mean the file grows and grows as expected....then it suddenly
vanishes?

I have a half-baked theory about how that could happen.  However, I've
not had any coffee yet this morning, so treat this with the disdain it
deserves!  Consider the case where you have a faked sender, or mail sent
from a misconfigured mail client, or something like that.  For example:

  marty(_at_)chonzie$ echo 'From: "<>"'|formail -rtzxTo: 
  "<>"

If you can construct a return address such as:
    "" >
(or something equally nasty) then your recipe condition

  * $ ! ? fgrep -i "$REPLYTO" "$ALLSENDERS"

will expand to be effectively

    fgrep -i > senders.txt

thus making senders.txt an empty file.  I'm not sure if formail can be
persuaded to generate such an unpleasant return address, but if it can
then something along those lines might explain what you are seeing.

Martin
-- 
Martin McCarthy                 /</                  PGP key available
    `Procmail Companion'        \>\  http://www.ancient-scotland.co.uk
     Addison Wesley             /</    http://www.ehabitat.demon.co.uk
_______________________________________________
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>