procmail
[Top] [All Lists]

Re: formail flags problem in pm recipe - solved!

2001-06-16 18:20:25
On 06/16/01 02:01 PM, Philip Guenther sat at the `puter and typed:
<snip> 
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.

So what does that E= directive do?  I do have it in my sendmail.cf
file, as follows:

Msmtp,          P=[IPC], F=mDFMuX, S=11/31, R=21, E=\r\n, L=990,
                T=DNS/RFC822/SMTP,
                A=IPC $h
Mesmtp,         P=[IPC], F=mDFMuXa, S=11/31, R=21, E=\r\n, L=990,
                T=DNS/RFC822/SMTP,
                A=IPC $h
Msmtp8,         P=[IPC], F=mDFMuX8, S=11/31, R=21, E=\r\n, L=990,
                T=DNS/RFC822/SMTP,
                A=IPC $h
Mrelay,         P=[IPC], F=mDFMuXa8, S=11/31, R=61, E=\r\n, L=2040,
                T=DNS/RFC822/SMTP,
                A=IPC $h

After a little checking, I found that this is added via the
.../sendmail-cf/mailer/smtp.m4 file, part of the standard smtp config.

Why is this a problem?  I actually don't see any consistent behavior
there.  My .sig has no trailing newline or return, and I never append
after the sig.  For some reason, every once in a while I see a blank
line at the end of my test messages, but not always.  The thing is,
that even if you count that line, the score is still wrong.  Unless
you also count the blank line between the headers and the message
- which I am not.

If this trailing blank like shows up, the count appears to be
incremented twice for the blank line, rather than once.  Wierd.  I
know that line wasn't there in the message I sent, so I don't know how
it gets into the delivered message.  I'm sure I have something goofed
up here, but I don't have any idea what at this point.


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.

Not sure why you think this, could you explain the results of removing
that directive?

Thanks!

Lou
-- 
Louis LeBlanc
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
leblanc(_at_)acadia(_dot_)ne(_dot_)mediaone(_dot_)net
http://acadia.ne.mediaone.net                Ô¿Ô¬
_______________________________________________
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>