Re: Modify stored mail contents?

2017-07-23 Thread Evan Martin
On 23/07/2017 3:30 PM, Sami Ketola wrote: On 23 Jul 2017, at 16.14, Tom Hendrikx wrote: In general, you should not do this. When a message is stored using IMAP, it is immutable. The IMAP server also remembers things like size and assigns messages a unique ID, so mail

Re: Modify stored mail contents?

2017-07-23 Thread Sami Ketola
> On 23 Jul 2017, at 16.14, Tom Hendrikx wrote: > > In general, you should not do this. When a message is stored using IMAP, > it is immutable. The IMAP server also remembers things like size and > assigns messages a unique ID, so mail readers that have already > downloaded

Re: Modify stored mail contents?

2017-07-23 Thread Tom Hendrikx
On 23-07-17 13:07, Evan Martin wrote: > It looks like the mail filter plugin > [https://wiki2.dovecot.org/Plugins/MailFilter] is almost exactly what I > want, except for this: > >> Currently the filtering must not modify the message in any way: mail > -> write filter -> read filter -> must

Re: Modify stored mail contents?

2017-07-23 Thread Evan Martin
It looks like the mail filter plugin [https://wiki2.dovecot.org/Plugins/MailFilter] is almost exactly what I want, except for this: > Currently the filtering must not modify the message in any way: mail -> write filter -> read filter -> must produce exactly the original mail back. > (TODO:

Re: Modify stored mail contents?

2017-07-23 Thread James
On 22/07/2017 11:51, Evan Martin wrote: Is there a safe way to modify the contents of emails stored by Dovecot? I'll probably only want to change the message bodies, not the headers, if that matters. I use javamail[1] for this. The javamail API can be used to get and put emails with IMAP so

Re: Modify stored mail contents?

2017-07-22 Thread Jerry
>> On Sat, 22 Jul 2017 12:51:15 +0200, Evan Martin stated: >> >>> Is there a safe way to modify the contents of emails stored by >>> Dovecot? I'll probably only want to change the message bodies, not >>> the headers, if that matters. Looking for ways to do this both for >>> existing emails and

Re: Modify stored mail contents?

2017-07-22 Thread Evan Martin
Yes, obviously clients can save messages. I meant: to modify messages in bulk, on the server, replacing the existing message bodies stored by Dovecot. On 22/07/2017 3:56 PM, Jerry wrote: On Sat, 22 Jul 2017 12:51:15 +0200, Evan Martin stated: Is there a safe way to modify the contents of

Re: Modify stored mail contents?

2017-07-22 Thread Jerry
On Sat, 22 Jul 2017 12:51:15 +0200, Evan Martin stated: >Is there a safe way to modify the contents of emails stored by >Dovecot? I'll probably only want to change the message bodies, not the >headers, if that matters. Looking for ways to do this both for >existing emails and new emails as they