Skip to main content

Sieve

dovecot / script / mail

keep​

Save the mail into main mailbox

keep;

# equivalent to
fileinto "INBOX";

discard​

Cancel implicit keep (but not explicitly keep)

discard;

The following script will keep the mail

keep;
discard;
discard;
keep;

stop​

Exit the script

stop will not cancel implicit keep

stop;

require​

require "<capability>";

require ["<capability>", "<capability>"];

Comment​

# <comment>
/* <comment> */

fileinto​

Save the mail into <mailbox>

fileinto will cancel implicit keep

require "fileinto";

fileinto "<mailbox>";

# Move to the <mailbox> under main mailbox
fileinto "INBOX.<mailbox>";

redirect / forward​

Ref: RFC 5228

Forward to <email address>

redirect will cancel implicit keep

redirect "<email address>";

Redirect to multiple address

redirect "<email address>";
redirect "<email address>";

Ref: RFC 3894

Redirect and keep

require "copy";

redirect :copy "<email address>"

vacation / out of office​

Auto reply mail

require "vacation";

vacation
# Only reply the same address again after <days>
:days <days>
:subject "<subject>"
"<content>";