[Top] [All Lists]

Re: [ietf-smtp] Submission DATA reply to indicate auto-save

2013-04-10 18:33:25
On 11.4.2013, at 1.40, SM <sm(_at_)resistor(_dot_)net> wrote:

Hi Timo,
At 14:22 10-04-2013, Timo Sirainen wrote:
GMail's submission server saves all the submitted mails to the sender's Sent 
mailbox. After this most IMAP clients with their default configuration will 
again save the same mail to the Sent mailbox. I'm not sure if GMail removes 
one of them as a duplicate or

I assume that you have read Gmail's answer about the handling of the /Sent 

Not really. I've seen some random mails that GMail doesn't do any duplicate 
prevention, but somehow I thought it there would be something.. at least in 
theory there could be.

not. I've been considering doing a similar feature to Dovecot (it will most 
likely have a proxying submission server in near future), but it would be 
nice to tell the SMTP clients that this auto-saving is happening, so they 
could skip the IMAP APPEND part with default configuration.

Of course there are the LEMONADE extensions that are supposed to solve this 
same issue, and Dovecot will support those as well, but I think it's going 
to take a while for clients to actually implement those. There's likely much 
better chance of them implementing a small check for "oh, the mail was 
already saved, I'll just skip the IMAP APPEND." Even if any clients 
themselves didn't implement this, it would make it possible to implement a 
simple SMTP+IMAP proxy locally that catches the flag and supresses the 
APPEND before it reaches the network.

So, any thoughts on creating an RFC for this functionality? I'm not familiar 
enough with SMTP yet to know what would be the best design for that 
notification. Maybe a new extended status code? Maybe change some of the 
DATA reply's text part to have a special meaning? A simple flag is enough I 
think, because it's reasonable to require that both the server and client 
supports IMAP SPECIAL-USE to find the \Sent flagged mailbox. Returning IMAP 
UIDVALIDITY+UID could help IMAP clients a bit more, but that's maybe a bit 
too ugly (and not always possible).

In the above you have the SMTP (MSA) client and the IMAP client which are 
acting independently.  If the mail client already knows that the message has 
been saved to the Sent mailbox it could use the
Message Submission BURL Extension to submit the message to avoid the 
"duplicate submission".

Suppressing the APPEND may be problematic.  The MSA server can reject the 
submission attempt with a message mentioning the IMAP mailbox automatically 
used to submit the message.  BTW, what you are looking for might be what 
behavior the mail client should set at configuration time to provide mail 
functionality.  This means detecting the features offered on the server side.

My understanding is that most email clients first send the message to 
submission server, and only after that is successful they are saved to Sent 
mailbox via IMAP APPEND. My whole auto-save-flag idea relies on that..
ietf-smtp mailing list