Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15793 closed Cleanup/optimization (wontfix)

Filebased email backend should save emails using the ".eml" standard extension

Reported by: German M. Bravo Owned by: nobody
Component: Core (Mail) Version:
Severity: Normal Keywords:
Cc: German M. Bravo Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: yes
Easy pickings: yes UI/UX: no

Description

Emails saved by the filebased backend should be saved using .eml or .email extensions, this is the de facto standard extension for email files, using .email or .eml instead of .log has some other advantages as well. One of them is the possibility of opening emails directly in MS Outlook or preview them in OS X Finder by simply pressing space over the file.

Attachments (1)

#15793 - email_extension.diff (548 bytes) - added by German M. Bravo 5 years ago.

Download all attachments as: .zip

Change History (13)

Changed 5 years ago by German M. Bravo

comment:1 Changed 5 years ago by German M. Bravo

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

The standard extension that works both in Windows and Mac is .eml, not sure about Linux, but I suppose it should be a standard there as well?

comment:2 Changed 5 years ago by German M. Bravo

Component: UncategorizedCore (Mail)
Has patch: set
Type: UncategorizedCleanup/optimization
Version: 1.2

comment:3 Changed 5 years ago by anonymous

Ubuntu with default settings opens .eml files in Evolution too.

comment:3 Changed 5 years ago by anonymous

Ubuntu with default settings opens .eml files in Evolution too.

comment:4 Changed 5 years ago by Aymeric Augustin

Easy pickings: unset
Triage Stage: UnreviewedAccepted

comment:5 Changed 5 years ago by Aymeric Augustin

Easy pickings: set
Triage Stage: AcceptedReady for checkin

Patch is trivial and the change makes sense.

There is no standard for file extensions; .eml is certainly more appropriate than .log for an email.

comment:6 Changed 5 years ago by anonymous

Needs documentation: set
Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

Some documentation could be added to docs/topics/email.txt about this, and even though the current extension isn't documented, this would be backwards incompatible for anyone who uses other scripts built on what we have now - a note will have to be added to the next version release docs noting this incompatible change.

comment:7 Changed 5 years ago by Chris Beaven

(that previous comment was me)

comment:8 Changed 5 years ago by Aymeric Augustin

Upon further investigation, the files created by the filebased email backend aren't really emails:

  • ('-' * 79 + '\n') is appended after each email, even if there is only one;
  • several message will be written to the same file if they are sent with one call to send_messages().

While I understand and support the case for renaming these files as .eml — it's only a debug tool, being able to double-click the files will save time — I wonder if we should go further and use the mbox format (http://docs.python.org/library/mailbox.html#mailbox.mbox), which is the standard container for dumping several email to the same file. That would be more backwards incompatible, but at the same time much more useful. One possibility is to create "mbox" backend and then deprecate the "filebased" backend, but that seems overkill...

comment:9 Changed 5 years ago by Łukasz Rekucki

Resolution: wontfix
Status: newclosed

I'm closing this as won't fix then.

Using ".eml" as an extension will probably work in most cases, but having more then one message in the same file is likely to break and confuse people. Using a mailbox seems like a good idea, but that's another story in another ticket :)

PS. I don't think we need to deprecate filebased backend even if we add an "mbox" one. It's less then 60 LOC, unlikely to break and useful as is.

comment:10 Changed 5 years ago by German M. Bravo

Cc: German M. Bravo added
UI/UX: unset
Note: See TracTickets for help on using tickets.
Back to Top