Code

Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#15793 closed Cleanup/optimization (wontfix)

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

Reported by: Kronuz Owned by: nobody
Component: Core (Mail) Version:
Severity: Normal Keywords:
Cc: Kronuz 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 Kronuz 3 years ago.

Download all attachments as: .zip

Change History (13)

Changed 3 years ago by Kronuz

comment:1 Changed 3 years ago by Kronuz

  • 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 3 years ago by Kronuz

  • Component changed from Uncategorized to Core (Mail)
  • Has patch set
  • Type changed from Uncategorized to Cleanup/optimization
  • Version 1.2 deleted

comment:3 Changed 3 years ago by anonymous

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

comment:3 Changed 3 years ago by anonymous

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

comment:4 Changed 3 years ago by aaugustin

  • Easy pickings unset
  • Triage Stage changed from Unreviewed to Accepted

comment:5 Changed 3 years ago by aaugustin

  • Easy pickings set
  • Triage Stage changed from Accepted to Ready 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 3 years ago by anonymous

  • Needs documentation set
  • Patch needs improvement set
  • Triage Stage changed from Ready for checkin to Accepted

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 3 years ago by SmileyChris

(that previous comment was me)

comment:8 Changed 3 years ago by aaugustin

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 3 years ago by lrekucki

  • Resolution set to wontfix
  • Status changed from new to closed

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 2 years ago by Kronuz

  • Cc Kronuz added
  • UI/UX unset

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.