如何使用saslpasswd2生成不同机制的条目?

我努力在sasldb2.db创build满意的loggingsasldb2.db 。 如果我使用正规的

 saslpasswd2 -c user 

根据sasldblistusers2,我得到了一个logging:

 [email protected]: userPassword 

而这个页面让我相信,每个机制都应该有一条线( DIGEST-MD5CRAM-MD5 ,等等)。

如果我添加-n以避免存储纯文本(我只需要CRAM-MD5):

 saslpasswd2 -n -c user 

那么sasldblistusers2根本找不到任何logging。 我的saslpasswd.conf由两行组成:

 mech_list: cram-md5 digest-md5 ntlm plain log_level: 9 

我在FreeBSD上使用cyrus-sasl-2.1.26_12和使用2.1.25的Ubuntu来试试这个…我在做什么错误?


我需要CRAM-MD5因为在不进一步重新configuration的情况下,我的sendmail只列出了和DIGEST-MD5作为可接受的AUTH 。 而iPhone显然不支持DIGEST-MD5 。 而我只是为了一些iPhone手机而做所有这些 – 正常的电脑已经通过我自己的权威机构颁发的客户端SSL证书进行身份validation。


好的,显然, CRAM-MD5authentication一直在成功 – 尽pipe没有被sasldblistusers2列出。 我创build了一个新的问题 – 为什么sendmail拒绝中继,尽pipeauthentication的成功。

我设法使它与以下工作:

/etc/mail/sendmail.mc有以下设置:

 define(`confLOG_LEVEL', `13')dnl define(`confAUTH_OPTIONS', `A')dnl TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5')dnl define(`confAUTH_MECHANISMS', `DIGEST-MD5 CRAM-MD5')dnl 

/etc/sasl2/Sendmail.conf包含以下内容:

 pwcheck_method: auxprop auxprop_plugin: sasldb mech_list: cram-md5 digest-md5 log_level: 9 

将用户添加到/ etc / sasldb2中:

 # saslpasswd2 -c -u mail.example.com -a Sendmail test <password> <password> 

然后testing:

 # sendmail -O LogLevel=14 -bs -Am 220 server.example.com ESMTP Sendmail 8.14.7/8.14.7; Tue, 24 Oct 2017 09:24:44 +0100 ehlo localhost 250-server.example.com Hello root@localhost, pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-AUTH DIGEST-MD5 CRAM-MD5 250-DELIVERBY 250 HELP AUTH CRAM-MD5 334 <challenge> <generate response using [email protected], password and the above challenge text> 235 2.0.0 OK Authenticated 

你可以减less绝对最低限度的设置,但上面的工作对我来说。 这是在RHEL 7主机上。