SA Bugzilla – Bug 6420
[PATCH] Extend fetchmail parsing restart to cover other mail fetchers
Last modified: 2017-12-29 18:40:57 UTC
Created attachment 4751 [details] Fixup mail fetcher detection logic to be more generic Currently, we only restart parsing of headers when encountering a Fetchmail marker. This patch extends that to any mail received via POP3 or IMAP, which can be assumed to have been fetched when we're in trusted_networks. Also, initialize $self->{allow_fetchmail_markers} to 1 so we don't tell the user in dbg that the first header is untrusted, if it is generated by a mail fetcher. Furthermore, remove already obsolete Received: parsing try which would have been caught by the test this patch replaces, and is certainly caught by this patch.
Can anyone who uses getmail or fetchmail with SA confirm this patch works? It looks like it has promise but I can't confirm it much.
*** Bug 6935 has been marked as a duplicate of this bug. ***
The patch works for me. Funny thing is that I had to dig-out an old POP3 retrieval to test the behaviour with and without the patch. It turns out that without this patch there is no support for "with IMAP" headers. For all these years my internal/trusted networks would have worked correctly without any configuration because the getmail header wasn't parsable.
Recent mention on the SA users list. I will commit this if there are no objections. I reviewed the patch and the code changes look OK to make it more of a general header parsing that works with both fetchmail and getmail.
+1 for you to commit. I hate received.pm hacks :-)
It's such an old patch against 3.3.1 so I will try to figure out if there are any changes that conflict with newer SA versions and adjust the patch file if needed. If there are conflicts and I have to adjust the patch file, I will setup a test environment and test the changes against 3.4.1 before committing.
Thanks. And it's considered you run make test before committing and that right now any changes are committed to trunk (4.0) and 3.4 branch.
Patch seems legit, +1 for commit if regression tests still passes. Thanks Giovanni
Committed to trunk and 3.4 branch.