1999-09-23-22:01:44 Philip Guenther:
Dallman Ross <dman(_at_)netcom(_dot_)com> writes:
formail -Y -s sendmail me(_at_)account2 < /path/to/mailbox
I use this a lot, but hadn't seen the -Y flag to formail. I
just looked. Is there a danger if it's not used? Are Content-Length:
fields somehow bad? (-Y causes ignore to them.)
If you don't use Content-Length: fields locally then any that appear in
received mail messages may contain completely bogus values. Consider what
would happen if someone sent you a mail message (like _this_ one, heh
heh) with a Content-Length: of, say, 999999. Try splitting a mailbox
with that message in the middle of it using formail _without_ the -Y
flag and see what happens.
If you don't set it yourself, you should _never_ trust it.
Cool! I'd never thought of that! It really hadn't occurred to me that a basic
tool would have its default behavior needing to be overriden so urgently.
I don't suppose there's any chance that we could get an environment variable
or a config variable in an rc file or some such "sticky" way to disable this?
Meanwhile, for those of us who are content to lose backward-compatiblity in
the "-Y" behavior, here's a teensy source-code patch, which I made against
3.13.1; it simply inverts the sense of the -Y option, so if you do nothing
Content-Length is ignored, and if you want formail to trust it you use -Y.
Wasn't there a 3.14 series under development at one time that supported
Maildir? Or am I confused? I can't find it on ftp.procmail.org.
-Bennett
procmail-invert-Y.patch
Description: Text document