「Xserver VPSでDebianサーバ構築/IMAPサーバ設定」の版間の差分
ナビゲーションに移動
検索に移動
(ページの作成:「= 概要 = 次の表のとおりである。 {| class="wikitable" |IMAPサーバ |Dovecot |}」) |
(→ユーザ設定) |
||
(同じ利用者による、間の7版が非表示) | |||
7行目: | 7行目: | ||
|Dovecot |
|Dovecot |
||
|} |
|} |
||
= 設定 = |
|||
<nowiki> |
|||
$ sudo apt install dovecot-imapd |
|||
</nowiki> |
|||
* /etc/dovecot/conf.d/10-master.conf |
|||
<nowiki> |
|||
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 |
|||
} |
|||
</nowiki> |
|||
* /etc/dovecot/conf.d/10-mail.conf |
|||
<nowiki> |
|||
mail_location = maildir:~/Maildir |
|||
</nowiki> |
|||
* /etc/dovecot/conf.d/10-ssl.conf |
|||
<nowiki> |
|||
ssl_cert = </etc/letsencrypt/live/mail.example.com/fullchain.pem |
|||
ssl_key = </etc/letsencrypt/live/mail.example.com/privkey.pem |
|||
</nowiki> |
|||
== メールフィルタ == |
|||
<nowiki> |
|||
$ sudo apt install dovecot-sieve |
|||
</nowiki> |
|||
/etc/postfix/main.cf |
|||
<nowiki> |
|||
mailbox_command = /usr/lib/dovecot/deliver -f "$SENDER" -a "$RECIPIENT" |
|||
</nowiki> |
|||
<nowiki> |
|||
$ sudo systemctl reload postfix@- |
|||
</nowiki> |
|||
/etc/dovecot/conf.d/15-lda.conf |
|||
<nowiki> |
|||
protocol lda { |
|||
# Space separated list of plugins to load (default is global mail_plugins). |
|||
mail_plugins = $mail_plugins sieve |
|||
} |
|||
</nowiki> |
|||
=== ユーザ設定 === |
|||
* https://doc.dovecot.org/configuration_manual/sieve/examples/ |
|||
~/sieve/dovecot.sieve |
|||
<nowiki> |
|||
require "fileinto"; |
|||
if address :is "From" "logwatch@example.com" |
|||
{ |
|||
fileinto "logwatch"; |
|||
} |
|||
</nowiki> |
|||
<nowiki> |
|||
ln -s sieve/dovecot.sieve .dovecot.sieve |
|||
</nowiki> |
|||
=== dovecot-managesieved === |
2024年5月31日 (金) 14:52時点における最新版
概要
次の表のとおりである。
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