「Xserver VPSでDebianサーバ構築/IMAPサーバ設定」の版間の差分
ナビゲーションに移動
検索に移動
(→設定) |
(→ユーザ設定) |
||
75行目: | 75行目: | ||
~/sieve/dovecot.sieve |
~/sieve/dovecot.sieve |
||
<nowiki> |
|||
require "fileinto"; |
|||
if address :is "From" "logwatch@example.com" |
|||
{ |
|||
fileinto "logwatch"; |
|||
} |
|||
</nowiki> |
|||
<nowiki> |
<nowiki> |
2024年5月31日 (金) 08:07時点における版
概要
次の表のとおりである。
IMAPサーバ | Dovecot |
設定
$ sudo apt install dovecot-imapd
- /etc/dovecot/conf.d/10-master.conf
service imap-login { inet_listener imap { #port = 143 } inet_listener imaps { port = 993 ssl = yes } service auth { # Postfix smtp-auth unix_listener /var/spool/postfix/private/auth { mode = 0666 }
- /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir
- /etc/dovecot/conf.d/10-ssl.conf
ssl_cert = </etc/letsencrypt/live/mail.example.com/fullchain.pem ssl_key = </etc/letsencrypt/live/mail.example.com/privkey.pem
メールフィルタ
$ sudo apt install dovecot-sieve
/etc/postfix/main.cf
mailbox_command = /usr/lib/dovecot/deliver -f "$SENDER" -a "$RECIPIENT"
$ sudo systemctl reload postfix@-
/etc/dovecot/conf.d/15-lda.conf
protocol lda { # Space separated list of plugins to load (default is global mail_plugins). mail_plugins = $mail_plugins sieve }
ユーザ設定
~/sieve/dovecot.sieve
require "fileinto"; if address :is "From" "logwatch@example.com" { fileinto "logwatch"; }
ln -s sieve/dovecot.sieve .dovecot.sieve