无法让SASL auxprop / sasldb与postfix / Ubuntu 12.04一起使用

前端之家收集整理的这篇文章主要介绍了无法让SASL auxprop / sasldb与postfix / Ubuntu 12.04一起使用前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个运行Postfix 2.5.1的Ubuntu 8.04LTS系统.在该系统上,SMTP AUTH运行正常.的内容
/etc/postfix/sasl/smtpd.conf是:
pwcheck_method: auxprop
auxprop_plugin: sasldb
mech_list: PLAIN

与SASL相关的属性是:

smtpd_sasl_type = cyrus
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain = $myhostname

当我做sudo sasldblistusers2时,我得到:

authusername@mail.mydomain.com: userPassword

就像我说的那样,在8.04LTS系统上一切正常.

但是,我试图将其迁移到运行Postfix 2.9.3的Ubuntu 12.04LTS系统,我无法让它工作.我正在做同样的事情,但postfix每次都会给出身份验证失败.

它不是/ etc / sasldb2文件.我试过从旧系统带来文件,但这不起作用.我使用以下方法创建了一个新文件

saslpasswd2 -c -u mail.mydomain.com authusername

虽然它可以在旧系统上运行,但这不起作用
如果我将它复制到旧系统,这就是我所知道的
这个文件没有错.

同样,我知道postfix正在查看smtpd.conf文件.
如果我向文件的mech_list行添加更多机制,
我看到在连接时广告的那些额外机制
到smtpd守护进程.当我删除它们时它们会消失
再次.所以/etc/postfix/sasl/smtpd.conf很清楚
习惯.

我正在测试两者使用实际的邮件客户端和
生成令牌后,手动与服务器通话:

perl -MMIME::Base64 -e 'print encode_base64("\000authusername\000thePassword");'

然后:

openssl s_client -quiet -starttls smtp -connect the.newsystem.com:587

由此产生的对话是:

250 DSN
EHLO example.com
250-the.newsystem.com
250-PIPELINING
250-SIZE 20971520
250-ETRN
250-AUTH PLAIN
250-AUTH=PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH PLAIN theBase64EncodedToken
535 5.7.8 Error: authentication Failed: authentication failure

但是,如果我改为连接到the.oldsystem.com:587并做了
同样的事情,我得到:

235 2.7.0 Authentication successful

saslfinger在新机器上的输出是:

# sudoh saslfinger -s
saslfinger - postfix Cyrus sasl configuration Sat Jul 21 00:24:24 EDT 2012
version: 1.0.4
mode: server-side SMTP AUTH

-- basics --
Postfix: 2.9.3
System: Ubuntu 12.04 LTS \n \l

-- smtpd is linked to --
        libsasl2.so.2 => /usr/lib/i386-linux-gnu/libsasl2.so.2 (0xb76c5000)


-- active SMTP AUTH and TLS parameters for smtpd --
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = cyrus
smtpd_tls_CAfile = /etc/ssl/certs/MyCA.pem
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/postfix/ssl/server.crt
smtpd_tls_key_file = /etc/postfix/ssl/server.key
smtpd_tls_loglevel = 1
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s


-- listing of /usr/lib/sasl2 --
total 16
drwxr-xr-x  2 root root 4096 Jul 20 23:00 .
drwxr-xr-x 67 root root 8192 Jul 20 21:25 ..
-rw-r--r--  1 root root    1 May  4 00:17 berkeley_db.txt

-- listing of /etc/postfix/sasl --
total 20
drwxr-xr-x 2 root root 4096 Jul 20 21:29 .
drwxr-xr-x 5 root root 4096 Jul 20 23:58 ..
-rw-r--r-- 1 root root   64 Jul 20 21:29 smtpd.conf



-- content of /etc/postfix/sasl/smtpd.conf --
pwcheck_method: auxprop
auxprop_plugin: sasldb
mech_list: PLAIN

-- content of /etc/postfix/sasl/smtpd.conf --
pwcheck_method: auxprop
auxprop_plugin: sasldb
mech_list: PLAIN


-- active services in /etc/postfix/master.cf --
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
smtp      inet  n       -       -       -       -       smtpd
submission inet n       -       -       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING

[snipping the rest of the services]

-- mechanisms on localhost --

-- end of saslfinger output --

我能错过什么/做错什么?据我所知,所有的配置都是一样的,但它不适用于新系统.

赠品在这里:
-- active services in /etc/postfix/master.cf --
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
smtp      inet  n       -       -       -       -       smtpd
submission inet n       -       -       -       -       smtpd

提交端口上的smtpd进程以chroot模式运行(因为在该列中有 – 表示默认值(即是),因此无法查看/ etc / sasldb2.

当我将/ etc / sasldb2复制到/ var / spool / postfix / etc时,认证开始正常工作.

原文链接:https://www.f2er.com/ubuntu/348820.html

猜你在找的Ubuntu相关文章