Skip to contentSkip to conversation

deletion of From-header

mlmmj Franky Van Liedekerke 2 participants 2 messages May 13, 2010 – May 14, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

in the source code there's a line:

delheaders->strs[delheaders->count++] = mystrdup("From ");

effectively deleting a header called "From " in a mail, but this never happens in reality (maybe it does with feeded mails via a program); the header is always "From:".

For now this always forced me to add "From:" to the delheaders section, but maybe this can be changed? Maybe just by removing it from the code entirely (so people can choose wether or not to remove the "From:"-information) ?

Just a thought ...

Franky

#1 lore raw

The "From " header isn't truly a header. It is, however, how the envelope sender is often communicated to mlmmj by the MTA. A line of the form "From [email protected]" is prepended to the mail, the same as in mbox files. It needs to be removed precisely because it is not truly a header. To be honest, it would perhaps be better to simply swallow the first line of input if it had that form, but doing it the current way works, too; no valid header will have that form, so we won't remove too much, and by ensuring we do remove it, we don't remove too little (which would result in invalid mails and much nastiness).

Cheers,

Ben.

Quoted 18 lines · Franky Van Liedekerke

Hi,

in the source code there's a line:

delheaders->strs[delheaders->count++] = mystrdup("From ");

effectively deleting a header called "From " in a mail, but this never happens in reality (maybe it does with feeded mails via a program); the header is always "From:".

For now this always forced me to add "From:" to the delheaders section, but maybe this can be changed? Maybe just by removing it from the code entirely (so people can choose wether or not to remove the "From:"-information) ?

Just a thought ...

Franky