mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
14.06k stars 1.44k forks source link

Support forward without downloading for attachments (Lemonade/BURL) #801

Open Hooloovoo opened 8 years ago

Hooloovoo commented 8 years ago

I noticed that I cannot forward emails with attachments without downloading the attachments first. I haven't seen it implemented properly yet on an IMAP server, but it is something that I'm interested in and hoped MIAB may be able to achieve, given it controls both the IMAP and SMTP server.

I've now looked into this a bit and thought I would collect my research here for anyone else who is interested.

The feature is part of the Lemonade Profile: https://en.wikipedia.org/wiki/Lemonade_Profile https://tools.ietf.org/html/rfc5550#section-4.1 - "Forward without download"

A high level summary of what is needed is here: http://isode.com/company/wordpress/lemonade-forward-without-download/

There is some discussion on this in relation to Postfix here: http://dovecot.dovecot.narkive.com/TrsLOmum/dovecot-2-2-lemonade-extensions

And it is on the Postfix 2.3 roadmap with low priority: http://wiki2.dovecot.org/Roadmap

If anybody has managed to make this work (with extensions or any other way) it would be interesting to hear.

JoshData commented 8 years ago

There's nothing for us to do until Dovecot supports it (as well as mail clients - do any mail clients support it? does Roundcube?).

Hooloovoo commented 8 years ago

https://github.com/benkaiser/trojita/blob/master/docs/masters/mobile-imap.tex Gives a good summary of support as at 2012. Even then Trojita did (which is the client that is now the mail client in Ubuntu Touch:

Trojitá is an advanced IMAP client which includes support for many different extensions from the basic ones like IDLE, LITERAL+ or the ID extension to the complex ones like the Lemonade trio [...]

One unique feature of Lemonade is the possibility to forward messages without their prior download}. The three ESMTP and IMAP extensions, often referred to as the Lemonade trio, namely the CATENATE, URLAUTH and BURL, allow the clients to compose a message using existing parts available from the IMAP mail store, provide a way of generating single-purpose ``pawn tickets'' for making the composed messages available to the submission server, and replacing the DATA SMTP command with a way of downloading the message from the IMAP server, respectively. This feature prevents having to transfer potentially huge data over the network three times --- once when the users wants to read it, second time when the message is saved to the sent folder, and finally when delivering via SMTP.

I don't think Roundcube has so much of a need for it, because you aren't downloading the attachments across the network. As with other Lemonade features, it mainly has benefit for mobile devices.

Hooloovoo commented 8 years ago

Based on: http://imapwiki.org/Specs Dovecot now supports CATENATE and URLAUTH.

It looks to me like Postfix has actually been the holdup so far on the BURL side: http://www.dovecot.org/list/dovecot/2013-March/089330.html http://postfix.1071664.n5.nabble.com/LEMONADE-profiles-support-td41893.html

One of the above says:

Also there's a good chance that Dovecot v2.3 will have an SMTP submission server with BURL support (that will simply forward the mail to a real SMTP server).

There is more info here: http://www.dovecot.org/list/dovecot/2013-May/090313.html

According to: https://www.ietf.org/mail-archive/web/apps-discuss/current/msg13450.html

In addition to that, I've made an SMTP submission frontend (proxy) for Dovecot that adds BURL support to any SMTP server. It will be available for version v2.3, but I have no idea when that will be released.

So once Dovecot 2.3 comes out, it should hopefully be possible to tie it together with Postfix in a way to make the combo support BURL.

(Not sure if this is relevant: http://wiki2.dovecot.org/HowTo/PostfixAndDovecotSASL ?)