11 月 27
FreeBSD (smtp-auth)
Read 105 viewssasl2を入れてsmtp-authを有効にするために/usr/local/etc/postfix/main.cfに以下を追加。
CODE:
-
####################
-
# SMTP AUTH w/SALS2
-
#
-
smtpd_sasl_auth_enable = yes
-
smtpd_sasl_local_domain = $myhostname
-
broken_sasl_auth_clients = yes
-
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
/usr/local/lib/sasl2/smtpd.confを作る。
CODE:
-
# cat /usr/local/lib/sasl2/smtpd.conf
-
pwcheck_method: auxprop
-
auxprop_plugin: sasldb
-
mech_list: cram-md5 digest-md5 plain login
/etc/sasldb2を用意しておく。
CODE:
-
# touch /etc/sasldb2
-
# chown postfix:postfix /etc/sasldb2
smtp-authのユーザーを作る。
CODE:
-
# saslpasswd2 -c -u `postconf -h myhostname` username
パスワードを二回訊いてくるので入力する。
ユーザーのパスワードの変更
CODE:
-
# saslpasswd2 -u `postconf -h myhostname` username
同じくパスワードを二回訊いてくるので入力する。
ユーザーの削除
CODE:
-
# saslpasswd2 -u `postconf -h myhostname` -d username
ユーザーの確認
CODE:
-
# sasldblistusers2



