postfix
インストール
# yum -y postfix
dovecotが使えるか確認
# postconf -a
cyrus
dovecot
saslauthdの起動設定
# chkconfig --list saslauthd
saslauthd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
saslauthd が起動している場合には停止します。
# service saslauthd stop
saslauthd を停止中: [ OK ]
/etc/postfix/main.cf
# smtpd
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
# chkconfig --add postfix
# chkconfig postfix on
Dovecot
Dovecot(ダヴコット)
インストール
# yum -y dovecot
# doveconf -n > dovecot-new.conf
/etc/dovecot/conf.d/10-auth.conf
auth_mechanisms = plain login
!include auth-passwdfile.conf.ext |~
/etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/mail
/etc/dovecot/conf.d/10-ssl.conf
ssl = no
# dovecotpw -s CRAM-MD5
Enter new password:
Retype new password:
{CRAM-MD5}9bde2235538debe003(適当。実際はもっと長い)
service auth {
# auth_socket_path points to this userdb socket by default. It's typically
# used by dovecot-lda, doveadm, possibly imap process, etc. Its default
# permissions make it readable only by root, but you may need to relax these
# permissions. Users that have access to this socket are able to get a list
# of all usernames and get results of everyone's userdb lookups.
#unix_listener auth-userdb {
#mode = 0600
#user =
#group =
#}
# Postfix smtp-auth
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
# Auth process is run as this user.
#user = $default_internal_user
}
# doveadm pw -s CRAM-MD5 -p password_text
{CRAM-MD5}b886583547b95cdc00787f360498c3c37ac6eed08ec910b5b4bd1484e8ec2b26