Comments (6)
SMTP servers in general add Message-ID if it is missing. Reference the local_header_rewrite_clients
and always_add_missing_headers
directives for Postfix. Notably, an ID is generated by Marrow Mailer, albeit it isn't directly used except in logging. I'll admit: that's a bug! However, an easy one to "work around":
Just set the header.
Note that the above works, correctly, because a conformant ID will be generated automatically and stored ("cached") on first access. Assignment of an explicit _id
value will also work. But, notably, the _id
(or id
) attributes are not utilized by the SMTP transport other than for logging.
from mailer.
I don't suppose you could give the develop
branch a go? It should be entirely compatible with your own fix (test that, too? ;) and render manual application of the Message-Id
unnecessary. Building the MIME message (e.g. for SMTP delivery) will automatically add it if missing.
The reasons this is not performed in the constant declaration at the top of prepare_headers
is:
- That I do wish to permit manual specification of that (don't break people's fixes for this long-standing issue).
- It is not performed much earlier to ensure the ID generation is truly lazy, waiting until the last moment (delivery) to generate if left unspecified.
(Edited to add: apologies for the commit spam there, it's been a long day. Latest run is all good: https://travis-ci.org/marrow/mailer/builds/580962733)
from mailer.
Thank you for the fix.
Are you sure this isn't ready for the master branch? Most people don't pull again without expecting breaking changes anyway (worst case here is two message id headers, so not even a breaking change). Yet in develop branch nobody will recognize it but people will continue building on the master branch and possibly keep running into this issue.
Sidenote: Most SMTP servers should add their own message id if there is not one already there, but it is not default config in postfix, which I guess most - especially the big - mail providers use.
from mailer.
Are you sure this isn't ready for the master branch?
There's a release process, I follow it.
…but people will continue building on the master branch…
It is generally good practice to utilize stable, published, release versions. I'm, however, asking the reporter of an issue to check to see if the issue initially reported is actually corrected by the "fix". Otherwise it's not a "fix", it's "just more dead weight", and is absolutely pointless to release, breaking or otherwise. ;P If actually fixed, I can consider rolling a release (after writing a regression test): master branch merge + actual Pypi package release.
Edited to add: and you seem to have given no indication on if you have tested it or not, successfully or not. :/
from mailer.
Sorry, I misunderstood your former comment.
I tested the develop branch and your fix works. A message id is added to the header without having to append it manually.
from mailer.
Awesome, thanks! :D
I'll see what else I can complete for this release, with an estimated release time for this patch (4.0.3) scheduled for Friday. There's a much larger breaking change (breaking at the packaging level itself, not just code using the package) I'll also see about finalizing for this week-end (5.0). I'm aiming for the major bump to be API compatible (no major changes there, just in packaging).
Have a great day!
Edited to add: if you depend on this Message-Id fix, I'd strongly recommend pinning your version numbers a la marrow.mongo~=4.0.3
. (4.0.x where x>=3)
from mailer.
Related Issues (20)
- Incorporate mxclient-like direct-to-destination SMTP as a transport.
- Update testing practices to current Marrow standards. HOT 1
- tlsv1 unrecognized name (_ssl.c:600) when setting up with gmail HOT 3
- Message's To Field Behaves Differently with List or Tuple
- using unicode_literals in message.py prevents expanding and collapsing headers from being inverses
- Bump version to include latest bugfix HOT 1
- SMTP backend not raising SMTPRecipientsRefused HOT 1
- How can I know if there are still pending emails HOT 2
- Sendmail transport fails with AttributeError: 'Message' object has no attribute 'sendmail_f' HOT 1
- Comma in Email Address Name
- Documentation for logging and error checking is amiss HOT 2
- Bounce backs HOT 2
- SMTP regression and failure during TLS negotiation under Python 3.7. HOT 13
- Dynamic manager does not work with python3 concurrent futures package. HOT 1
- Fix simple typo: produciton -> production
- Broken in 3.8 due to bad import from marrow/cgi HOT 27
- Any maintained fork HOT 4
- SES Signature Version 3 is not supported anymore HOT 1
- 'TransportPool' object has no attribute '_log' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailer.