Re: slight differences in getmail message vs downloaded message

Michael Grant <[email protected]> Mon, 1 Nov 2021 14:37:30 -0400
Newsgroups gmane.mail.getmail.user
Message-ID <[email protected]>
> > 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.

Ok I spent some more time trying to prove to myself what's going on
here and I have good news and bad...

Yah you're right, many of these lines have nothing to do with getmail.
The X-GMAIL lines are inserted by gmail's imap server.  The initial
From line is as you say not part of the message but the mbox format
delimiter.  So we can safely ignore these differences.

I found a few more differences that mutt added as I saved the message
in a file, it added:

Content-Length: 13406
Lines: 579

The only difference I see at the moment now is some extra blank lines
after the mime body part separators.  I think this is could be gmail
but not sure.  It's not mutt.  I redid my comparisons by extracting
the message manually from the mbox file.

I think this is probably a non-problem, it's probably as you say
nothing to do with getmail.

Here is a cleansed version of my getmailrc:

[options]
delivered_to = false
received = false
delete = true

[retriever]
type = SimpleIMAPSSLRetriever
server = imap.gmail.com
username = [email protected]
port = 993
password = SECRET
mailboxes = ("[Gmail]/Spam",)
record_mailbox = false

[filter-stale]
type = Filter_classifier
# A filter which returns a result code only:
# 0 = message received < 48h ago
# 99 = message received >= 48hrs ago (it's too old to report)
path = ~/bin/is-stale.pl

[destination]
type = MultiDestination
destinations = ('[spamlog]','[barracuda]',)

[spamlog]
type = Mboxrd
# This is where I was getting the message from via mutt to compare with the original downloaded from gmail:
path = ~/getmail/spamlog

# Barracuda is currently not accepting spam, I use some others which I've deleted
[barracuda]
type = MDA_external
path = /usr/local/bin/send-mail
arguments = ("-f","[email protected]","-s","spam attached","-a","[email protected]",)

%  python2 -V
Python 2.7.18

Anyway, I consider this a non-issue.  Thanks!

> 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.
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEDXVee01gWrPIdWPRwgRAue7sYQMFAmGAM+cACgkQwgRAue7s
YQM5cQ//RpwFrlyRpy85Ef8e+WE9nSaQ33Uu4k0bSl49NstYt0ZjObIHLhocjhxu
Jan0fePg3dI7h6CWbacxaWvAp0n68Rxx2hrr8jTMa0yrbg7Djn0YAB6kzHNOo7H4
Ct7w9+HtxG1G6ETJCrdwaWEBowFBPZj6hxFiinBtTGuIep9WwDlHd5+C8Zc1NQK1
SDkAPwInBFGkVFfbnOLpvDJgyjefkzfTdQas+4Y0Hbi498/CUic3MpNyChD1P/6J
6HgUUS84FCHBx0xijrFuSxWBLc8/G62sA48DXJ17RmtlzuAwdKBeZg7WYyZa/WWv
m61I1MaMUmG6z6bgi9BQzjrFs19Qa3qTzXdJBC8trp3WfEY6YxYk5VpDG9RCr2aY
J496IV8w76Y6eSjSgCM8YI5U5rGhcWNdas8ubue7+/0LUvNLAhSwm7+dN39/xW6T
l19+SNlYZwfdkLjgBcglaOSArRAkkBkT+OfnQ23wVbZy6isVinmn6T3M6/UjuZnM
7cf57yOXqiMoAzPiTyrZiVbVzeHMlnmXrwpgeQciMD2vjC5J3NNUD93g/8MMueur
ctipGwAJeJxXL/P/E1STVsgtYWWkO1xcWw60Me/23+aktKHhlzQknB2NvwLeMeBm
gLa7XdiuG3loBZLgpoV56VeO1dbny1lb+9+xb/3c0yoT0HwsIbU=
=oyCh
-----END PGP SIGNATURE-----