procmail
[Top] [All Lists]

Re: formail flags problem in pm recipe - solved!

2001-06-16 12:03:19
"David W. Tamkin" <dattier(_at_)ripco(_dot_)com> writes:
...
It was intended to reduce the score by 1!  It corrects for the case with
messages that do end in blank lines, where "1^1 ^.*$" counts one too many. 
So if in your format you don't get one too many, subtracting one regardless
will give you one too few.

Maybe this will handle both cases:

:0Bfh
* H ?? ! ^Lines:
* 1^1 ^.*$
* -1^0 ($)($)^^
| formail -f -A "Lines: $="

| I think this is because there is a trailing newline at the end of the
| message for some reason.

More likely it's that there isn't a trailing blank line on the message body,
perhaps no closing newline on the last line at all.

It may be that the message being fed to procmail is terminated by
carriage-return/newline pairs instead of plain newlines.  To find out,
Louis should check the sendmail.cf: if the mailer definition that calls
procmail contains the directive "E=\r\n", then that's what's happening.

Note that doing so isn't a real problem.  Besides the line count change,
I would suggest adding the 'r' flag to all the recipes.  That's all.
You don't need to add a CR to the Lines: header field added by formail
because deliver can actually handle both line endings, including messages
that are a mixture of the two, and will make them consistent.

On the otherhand, removing the E= directive is probably the better
choice as it makes things more consistent for procmail and programs run
from recipes.


Philip Guenther
_______________________________________________
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>