[Dovecot] imap support for attachement deletion?

Michael M. Slusarz slusarz at curecanti.org
Tue Mar 16 07:16:34 EET 2010

Quoting Louis-David Mitterrand <vindex+lists-dovecot at apartia.org>:

> On Sat, Mar 13, 2010 at 12:25:49PM +0100, Oliver Eales wrote:
>> Am 13.03.2010 um 11:26 schrieb Louis-David Mitterrand:
>> > Hi,
>> >
>> > Does dovecot support in-place attachement deletion?
>> >
>> > Mutt currently uploads a new message after deleting attachements. Is
>> > there a better, imap way to do it?
>> Hello,
>> no, this is the IMAP way to do it.
>> Via IMAP you can't modify a message, only its attributes (flags)
> On the mutt-dev list someone pointed out the APPEND spec from the
> IMAP4rev1 standard:
> 	If a date-time is specified, the internal date SHOULD be set in
> 	the resulting message; otherwise, the internal date of the
> 	resulting message is set to the current date and time by default.
> Does dovecot honor a date-time passed during APPEND?

The better solution is the CATENATE (RFC 4469) extension, if  
available.  An example directly from Appendix A of that RFC:

     Example 3: The following example demonstrates how the CATENATE
     extension can be used to strip attachments.  Below, a PowerPoint
     attachment was replaced by a small text part explaining that the
     attachment was stripped.

     C: A003 APPEND Drafts (\Seen \Draft $MDNSent) CATENATE
      (URL "/Drafts;UIDVALIDITY=385759045/;UID=21/;section=HEADER"
      TEXT {42}
     S: + Ready for literal data
     C: --------------030308070208000400050903
     C:  URL "/Drafts;UIDVALIDITY=385759045/;UID=21/;section=1.MIME"
      URL "/Drafts;UIDVALIDITY=385759045/;UID=21/;section=1" TEXT {255}
     S: + Ready for literal data
     C: --------------030308070208000400050903
     C: Content-type: text/plain; charset="us-ascii"
     C: Content-transfer-encoding: 7bit
     C: This body part contained a Power Point presentation that was
     C: deleted upon your request.
     C: --------------030308070208000400050903--
     C: )
     S: A003 OK append Completed


More information about the dovecot mailing list