Re: slight differences in getmail message vs downloaded message
Charles Cazabon <[email protected]> Thu, 28 Oct 2021 09:24:44 -0600
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <[email protected]> |
Michael Grant <[email protected]> wrote: > I just noticed something. If in gmail, I go to the message and > 'Download Original', then, use getmail to suck over a message and then > compare them, I see some slight differences. That shouldn't be the case. The stdlib email module interfaces getmail uses are explicitly idempotent; the output is the same as the input (minus new headers added by getmail). > For example, here's a spam message that I diffed (getmail on left, gmail download on right): > > 1,2d0 > < From [email protected] Thu Oct 28 10:38:48 2021 > < Return-Path: <[email protected]> > 27a26 > > Return-Path: <[email protected]> > 36a36 The first line, the "From ", isn't part of the message. It's an mbox file delimiter line, presumably added when you had getmail deliver the message to an mbox file. So ignore that; the above are identical message content. > > Return-Path: <[email protected]> > 44,47d43 I'm not sure if this was part of the example above or what. Two Return-Path: headers in one message is weird, and getmail should not be capable of making that happen. getmail moves the Return-Path: header to the top of the message if necessary, but that's it. > < X-GMAIL-THRID: =?utf-8?q?1714874573027056122?= > < X-GMAIL-MSGID: =?utf-8?q?1714874573027056122?= The X-GMAIL-* headers are added by Gmail in their IMAP server. > I have other examples too where headers that were continued on lines got put > back on one line (unwrapped). getmail's code doesn't do this. Please post your configuration file, your getmail version, and your Python version. There are other ways this mangling/rewriting could be happening. Charles -- ----------------------------------------------------------------------- Charles Cazabon GPL'ed software available at: http://pyropus.ca/software/ -----------------------------------------------------------------------