[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[postfix-jp:01756] Re: NIS環境でsmtp authでのpasswdの認証方法について



#SASLのPLAIN認証をpwcheckで行う件は、うまく行ったようでよかったです。

メールサーバが既にNISクライアントとして設定されているならば、
pwcheckを使うことでNISのpasswdマップも参照されていると思いますので、
PLAIN認証に限定できるならば、OS側のNIS設定をするだけでよいと思います。
http://www.linux.or.jp/JF/JFdocs/NIS-HOWTO/

しかし、PLAIN認証以外への対応も考えないと、うまくゆかないと思います。
以前の謝さんのメール中では、次のように、
メールサーバは受け入れ可能な認証機構を提示していました。

> 250-AUTH LOGIN PLAIN DIGEST-MD5 CRAM-MD5

クライアント側の選択によってはPLAIN以外のDIGEST-MD5やCRAM-MD5が
利用される可能性もあります。
cyrus-saslの付属文書sysadmin.htmlでは、DIGEST-MD5やCRAM-MD5認証は
直接/etc/sasldbデータベースを参照すると書かれています。
これではNISは参照されません。

Postfixのsample-auth.cfにはsmtpdが提示する認証機構を制御する
smtpd_sasl_security_optionsについての記述がありますが、
残念ながらPLAIN認証に限定するパラメータの組合わせは選べませんでした。

# The smtpd_sasl_security_options parameter controls what authentication
# mechanisms the Postfix SMTP server will offer to the client.  The
# list of available authentication mechanisms is system dependent.
#
# Specify zero or more of the following:
#
# noplaintext:  disallow methods that use plaintext passwords
# noactive:     disallow methods subject to active (non-dictionary) attack
# nodictionary: disallow methods subject to passive (dictionary) attack
# noanonymous:  disallow methods that allow anonymous authentication
#
# By default, the Postfix SMTP server accepts plaintext passwords but
# not anonymous logins.
#
# HORROR! It appears that clients try authentication methods in the
# order as advertised by the server (e.g., PLAIN ANONYMOUS CRAM-MD5)
# which means that if you disable plaintext passwords, clients will
# log in anonymously, even when they should be able to use CRAM-MD5.
# So, if you disable plaintext logins, disable anonymous logins too.
# Postfix treats anonymous login as no authentication.
#
#smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_security_options = noanonymous

最後の手段として、cyrus-saslを{DIGEST,CRAM}-MD5を無効にして
再ビルドするしかないかもしれません。
configure --disable-cram --disable-digest ...

References
[postfix-jp:01753] NIS環境でsmtp authでのpasswdの認証方法について, XIE from LAB

[検索ページ] [Postfix-JP ML Home]