Opened 17 years ago

Closed 17 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: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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@…> 17 years ago.
Uses Python's make_msgid()

Download all attachments as: .zip

Change History (8)

comment:1 by Gary Wilson <gary.wilson@…>, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by Adrian Holovaty, 17 years ago

Triage Stage: Design decision neededAccepted

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

comment:3 by Chris Beaven, 17 years ago

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

comment:4 by Adrian Holovaty, 17 years ago

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

comment:5 by Chris Beaven, 17 years ago

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

by Jannis Leidel <jl@…>, 17 years ago

Attachment: mail.diff added

Uses Python's make_msgid()

comment:6 by Will McCutchen <mccutchen@…>, 17 years ago

Has patch: set

Just noting that a patch has been attached.

comment:7 by Malcolm Tredinnick, 17 years ago

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