dovecot

apt-get install dovecot-common dovecot-imapd

/etc/dovecot/dovecot.conf

protocols = imap imaps
listen = *

ssl_cert_file = /etc/ssl/certs/dovecot.pem ssl_key_file = /etc/ssl/private/dovecot.pem mail_location = maildir:~/mail

service dovecot restart

Show all configurations:

dovecot -a
doveadm log find
mutt -f imap://username@localhost/folder

Sieve integration

apt-get install dovecot-sieve dovecot-managesieved
protocol lda {
mail_plugins = $mail_plugins sieve
}
protocol lmtp {
mail_plugins = $mail_plugins sieve
}

$HOME/.dovecot.sieve

require ["fileinto", "reject"];
if size :over 100K {
reject "Bitte senden Sie mir das nächste Mal eine kleinere Mail. Bei großen
Anhängen laden Sie bitte die Dateien auf einen Server und schicken Sie mir
eine URL.
Danke.";
}
elsif address :is ["From", "To"] "mailinglist@example.com" {
fileinto "INBOX.mailinglist";
}
elsif anyof (not address :all :contains ["To", "Cc", "Bcc"] "me@example.com",
header :matches "Subject" ["*money*","*Viagra*"]) {
fileinto "INBOX.spam";
}
else {
keep;
}
service dovecot restart