postfix+DovecotでIMAPメールサーバー

postfixをインストール
vi /etc/postfix/main.cf
・myhostname = mail.ドメイン名
・mydomain = ドメイン名
・myorigin = $mydomain
・inet_interfaces = all
・mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
・home_mailbox = Maildir/
・smtpd_banner = $myhostname ESMTP unknown
・SMTP-Auth設定
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination
・message_size_limit = 10485760

SMTP-Auth設定
vi /usr/lib/sasl2/smtpd.conf
・pwcheck_method: auxprop

ユーザー用ディレクトリの作成設定
mkdir -p /etc/skel/Maildir/{new,cur,tmp}
chmod -R 700 /etc/skel/Maildir/

メールサーバーの切り替え
alternatives –config mta
postfix選択

/etc/rc.d/init.d/postfix start

Dovecotインストール
・protocols = imap imaps pop3 pop3s
・mail_location = maildir:~/Maildir

Dovecot起動
/etc/rc.d/init.d/dovecot start

メールユーザー作成 mailusr
useradd -s /sbin/nologin mailusr

echo パスワード(?) | saslpasswd2 -p -u サーバー名(?) -c mailusr

確認
sasldblistusers2 

sasldb2所有グループをpostfixに変更
# chgrp postfix /etc/sasldb2

まだ接続できていない。
DNSに問題があるか、設定を理解できていなくて間違っている。

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です