On Thu, 2010-03-04 at 08:32 -0500, Charles Marcus wrote:
There was another thread (it has come up at least a few times in the past few years I've been lurking) on the postfix list about having some kind of automatic 'Save to Sent' option to avoid the users mail client from having to upload messages twice (obviously the only ones of concern are ones with large attachments) - once to send it, and once to save the copy in the sent folder.
LEMONADE group solved this with IMAP URLAUTH (RFC 4467) and SMTP BURL (RFC 4468) extensions. The idea is basically (copy&pasting from RFCs):
C: RCPT TO:ron@gryffindor.example.com S: 250 2.1.5 ron@gryffindor.example.com OK. C: BURL imap://harry@gryffindor.example.com/outbox ;uidvalidity=1078863300/;uid=25;urlauth=submit+harry :internal:91354a473744909de610943775f92038 LAST S: 250 2.5.0 Ok.
So after receiving BURL command, SMTP server connects to IMAP server and fetches the message:
S: * OK [CAPABILITY IMAP4REV1 URLAUTH] example.com IMAP server
C: a001 LOGIN submitserver secret
S: a001 OK submitserver logged in
C: a002 URLFETCH "imap://joe@example.com/INBOX/;uid=20/
;section=1.2;urlauth=submit+fred:internal
:91354a473744909de610943775f92038"
S: * URLFETCH "imap://joe@example.com/INBOX/;uid=20/;section=1.2
;urlauth=submit+fred:internal
:91354a473744909de610943775f92038" {28}
S: Si vis pacem, para bellum.
S:
S: a002 OK URLFETCH completed
Now, the problem is of course that neither Dovecot nor Postfix support these extensions. For Dovecot I was thinking about using METADATA extension's storage for storing the URLAUTH stuff, but METADATA isn't really implemented yet either.