> On 10 May 2017, at 14.57, KT Walrus <[email protected]> wrote:
>
> I could use an example of how to use curl to save a new message to a user’s
> INBOX using the Doveadm HTTP API.
>
Here you go:
doveadm mailbox save
parameters:
{
"command": "save",
"parameters": [
{
"name": "allUsers",
"type": "boolean"
},
{
"name": "socketPath",
"type": "string"
},
{
"name": "user",
"type": "string"
},
{
"name": "userFile",
"type": "string"
},
{
"name": "mailbox",
"type": "string"
},
{
"name": "file",
"type": "string"
}
]
}
example:
[
[
"save",
{
"file": "From: Joulu Pukki <[email protected]>\nSubject:
plaa\n\nmail body\n",
"mailbox": "INBOX/myfoldertoo",
"user": "samik"
},
"bb"
]
]
# curl -v -X POST -u doveadm:hellodoveadm -H "Content-Type: application/json"
-d '[["save",{"user":"samik","mailbox":"INBOX/myfoldertoo","file":"From: Joulu
Pukki <[email protected]>\nSubject: plaa\n\nmail body\n"},"bb"]]'
http://localhost:8080/doveadm/v1
> Does anyone here use the Doveadm HTTP API in production?
I know many.
Sami