Opened 10 years ago

Closed 10 years ago

#3713 closed (fixed)

use Python's make_msgid() for generating Message-ID email header

Reported by: Gary Wilson <gary.wilson@…> Owned by: Adrian Holovaty
Component: Core (Mail) Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Message-ID was asked for in #2991, commited in [4051], and had some tweaks in [4058], [4065], and [4536].

Python's email.Utils (or email.utils in python2.5) provides a function, make_msgid(), that accomplishes the same thing. Note, however that make_msgid() does not cache the hostname like our current code does.

Attachments (1)

mail.diff (1.5 KB) - added by Jannis Leidel <jl@…> 10 years ago.
Uses Python's make_msgid()

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by Gary Wilson <gary.wilson@…>

Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 10 years ago by Adrian Holovaty

Triage Stage: Design decision neededAccepted

If this lets us simplify our code, I'm all for it.

comment:3 Changed 10 years ago by Chris Beaven

So we are dropping the functionality of caching the hostname? :(

comment:4 Changed 10 years ago by Adrian Holovaty

Is there a way to use make_msgid() while keeping our hostname caching?

comment:5 Changed 10 years ago by Chris Beaven

Not that I see - Python's email.Utils.make_msgid() calls socket.getfqdn() directly.

Changed 10 years ago by Jannis Leidel <jl@…>

Attachment: mail.diff added

Uses Python's make_msgid()

comment:6 Changed 10 years ago by Will McCutchen <mccutchen@…>

Has patch: set

Just noting that a patch has been attached.

comment:7 Changed 10 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

In [5141] I included a copy of the source from Python's stdlib and changed it to use the cached hostname, which is a real performance improvement. The stdlib version was slightly more featureful than ours, so I felt it was worth including.

Note: See TracTickets for help on using tickets.
Back to Top