Example for doveadm-save using Doveadm HTTP API

Sami Ketola sami.ketola at dovecot.fi
Thu May 11 00:16:28 EEST 2017


> On 10 May 2017, at 16.26, KT Walrus <kevin at my.walr.us> wrote:
>> 
>> # curl -v -X POST -u doveadm:hellodoveadm -H "Content-Type: application/json" -d '[["save",{"user":"samik","mailbox":"INBOX/myfoldertoo","file":"From: Joulu Pukki <joulu.pukki at korvatunturi.fi>\nSubject: plaa\n\nmail body\n"},"bb"]]' http://localhost:8080/doveadm/v1
> 
> Thanks. I worry that by inlining the entire message in the curl command, the message might exceed some limits on how long a command can be. Some of my messages are up to 20MBs with the attachments and 1MB messages are very common. I also worry about the raw message having unescaped quotes in the message messing up to actual storage of the message in the INBOX. Are HTML mail messages encoded to be safe to enclose in quotations? Or, should I encode the entire mail message and trust that Dovecot can handle decoding the message in the back end?


The question is: why do you want to deliver 20MB messages with doveadm http api? I would not replace LMTP with that.

Sami



More information about the dovecot mailing list