Article View: gnu.emacs.vm.bug
Article #211Re: Suggested fix to vm-pipe-message-part
From: blueman
Date: Mon, 04 Jan 2010 18:18
Date: Mon, 04 Jan 2010 18:18
76 lines
5306 bytes
5306 bytes
Julian Bradfield <jcb@inf.ed.ac.uk> writes: > On 2010-01-04, blueman <NOSPAM@nospam.com> wrote: >> HOWEVER, vm-pipe-message-part is skipping the initial 'From' line since >> it is using (vm-headers-of m) as the start rather than (vm-start-of m). >> Similarly, it uses (vm-text-end-of m) rather than (vm-end-of m) >> >> Since the usual reason for splitting/piping messages to an external >> shell command is to pass the message to some standard 3rd program, it >> would be helpful to use standard conventions -- by which I mean >> something relatively consistent with 'formail' or better yet the RFC's. >> In particular, when you ask for the "entire message", I at least expect >> the entire message. > > VM is behaving correctly. The initial From line is NOT part of the RFC > standard, nor is it part of the message. It's an obsolete Unix mbox hack > that should have been killed off decades ago - the mbox format is > patently unsuitable, leading to abominations like From-stuffing. > I've had immense trouble with very broken mail systems (procmail) that > insist on putting the From in where it has no business - it caused > standards-compliant mail filters to break, because they saw a From > instead of a proper message. > >> In my case, spamassassin thinks a collection of messages is just one big >> message since it doesn't see the 'From' line. >> >> I would suggest making the following change so that the default "entire >> message" truly includes the entire message and perhaps add an option >> with four universal arguments that gives the current default behavior. > > Bad idea. If you want to have a command that does > "take bunch of messages, concatenate them into given (mbox in your case) > mailbox format, pipe resulting mbox to program" > then write a command to do that - don't break an existing well > specified command. Except that I doubt too many people are using it since the command itself is rather broken (at least if you try to use the optional arguments) Also, the command is *not* well specified. It says *entire* message which includes the From lines and anything else. If you want just the header or just the message then you can use the already defined options with prefix args. If you want the sum total of the headers (without the From) and the message (without any potential trailers) then I am suggesting adding a 4th option. Moreover, the multiple message functionality was actually a feature request that I made of Robert a couple of years ago specifically for the purpose of grabbing the *entire* message for use with spamassassin but never got around to testing... So I stand by my suggestion unless multiple others have coded on the basis of this function -- especially since I seem to be one of the few people who have really been using this code to any real extent unless others have fixed the bugs without notifying the group... I really think that the default should "do no harm" to the folder since you may want to use this function to pipe portions of your mailbox folder(s) non-destructively somewhere else... If you are not using mbox format then this change shouldn't make any distance since your mta will have stripped off the from. And if you are using mbox format, then you probably want the from included or else you will be destructively changing the output. Indeed, the casual user of mbox format will be surprised to find his/her message format destroyed -- in fact, it took me a while to figure out why spamassassin and formail were not able to parse the extracted messages... Do you have any specific use cases where the change I am proposing will mess up existing code or applications? Theoretical problems encountered elsewhere that may involve some theoretical future code is not compelling especially since I am proposing to add an option that would give you the sum total of the headers and footers (by adding a 4th prefix). In fact, there would even be logic to building up the message that way from its component parts...
Technical Details
Message-ID:
<m23a2l7myy.fsf@consult.pretender>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.mixmin.net!feeder.eternal-september.org!eternal-september.org!not-for-mailReferences:
<m2d41p7sho.fsf@consult.pretender> <hht5o0$9pd$1@scotsman.ed.ac.uk>Show Full Headers
Complete Article Headers
X-Google-Thread: a16957f451,747cd7667796b3e3 X-Google-Attributes: gida16957f451,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.mixmin.net!feeder.eternal-september.org!eternal-september.org!not-for-mail From: blueman <NOSPAM@nospam.com> Newsgroups: gnu.emacs.vm.bug Subject: Re: Suggested fix to vm-pipe-message-part Date: Mon, 04 Jan 2010 13:18:29 -0500 Organization: A noiseless patient Spider Lines: 76 Message-ID: <m23a2l7myy.fsf@consult.pretender> References: <m2d41p7sho.fsf@consult.pretender> <hht5o0$9pd$1@scotsman.ed.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.eternal-september.org U2FsdGVkX1+/C87yOHo2pveDPdXnvfuc0DqdmV6fJEWmVksFR0Q8ZVhGvtH7RxrJQgCSeqn94itGy4SQ4cTlHgdhhtVZ4i0fXz0kSnJOMp9M59GT2bnU+meOSeZ407WvaKQDFgNnEQf1QEac4LnYNg== X-Complaints-To: abuse@eternal-september.org NNTP-Posting-Date: Mon, 4 Jan 2010 18:18:31 +0000 (UTC) X-Auth-Sender: U2FsdGVkX1+zaFAGwkxQaeZ0v3HSItpfzQRVQRX8Y43Ik7Ou/ncxzQ== Cancel-Lock: sha1:j5OV+0/HGeOtyPmYav6RQyhR2VU= sha1:v0VWVea5BF7jW8uPP7QbwfbVg4U= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)