linux – Postfix – Opendkim – 无法连接到本地套接字
当postfix尝试连接到opendkim的unix套接字时,我被拒绝错误,实际错误:
Sep 24 15:41:43 service-a-4 postfix/cleanup[17414]: warning: connect to Milter service unix:var/run/opendkim/opendkim.sock: Permission denied 根据postfix docs,默认情况下postfix在“chroot模式”下运行,因此postfix被锁定到/ var / spool / postfix /,根据postfix docs,如果在“chroot模式”下运行,所有milter(套接字)引用都是relative(到/ var / spool / postfix). 所以我的配置看起来像: # /etc/opendkim.conf Socket local:/var/spool/postfix/var/run/opendkim/opendkim.sock # /etc/postfix/main.cf smtpd_milters = unix:/var/run/opendkim/opendkim.sock 现在,当我尝试发送测试邮件时,我收到了权限被拒绝错误,所以我尝试了一些权限测试: # Correctly lists the socket file sudo su -s /bin/bash postfix -c "ls /var/spool/postfix/var/run/opendkim/opendkim.sock" 但是当我尝试连接为postfix时,没有任何反应: # Does not work sudo su -s /bin/bash postfix -c "nc -U -D /var/spool/postfix/var/run/opendkim/opendkim.sock" # Does work (as root) nc -U -D /var/spool/postfix/var/run/opendkim/opendkim.sock 在调试此sitch时,SELinux暂时被禁用(允许).我在每次配置更改后重启两个进程(opendkim和postfix). 我还缺少什么? 版本: CentOS 6.5 Postfix v2.6.6 Opendkim v2.9 解决方法
在我的CentOS6上测试过postfix似乎并没有真正“chrooted”.
我的设定: # /etc/opendkim.conf Socket local:/var/run/opendkim/opendkim.sock # /etc/postfix/main.cf smtpd_milters = unix:/var/run/opendkim/opendkim.sock 这将产生:连接到Milter服务unix:/var/run/opendkim/opendkim.sock:权限被拒绝. 环境: centos 6.5 2.6.32-573.7.1.el6.x86_64 postfix 2.6.6-6.el6_5 @updates opendkim 2.10.3-1.el6 @epel (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |