我希望有人能帮我一下。似乎无法使check_policy_service工作。我在10031端口上运行policyd, postfix甚至没有连接到它。
已经完成了下面的线程,我的问题几乎是类似的,除了我的系统上的防火墙已经禁用,因此端口10031没有被防火墙阻塞。
http://marc.info/?l=postfix-users& m = 143886189409700, w = 2
下面是postconf -n的输出:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
inet_interfaces = localhost
lmtp_host_lookup = native
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname
mydomain = mydomain.com
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
notify_classes = resource, software, policy
queue_directory = /var/spool/postfix
relayhost = [mail-relay.mydomain.com]
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_fallback_relay = [mail-relay.mydomain.com]
smtp_host_lookup = native
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10031
smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:10031, reject_unauth_destination, reject_unlisted_recipient
transport_maps = hash:/etc/postfix/transport unknown_local_recipient_reject_code = 450
后缀2.3.3
操作系统:RHEL5.4
啊!这应该标记为resolved/closed
我犯了一个错误。我使用sendmail/mailx等在服务器上本地生成邮件,这导致该邮件由拾取守护进程拾取而不是由smtpd拾取,即本地服务器上的sendmail直接将队列文件写入"maildrop"目录,该目录由后缀"拾取"而不是smtpd拾取。因此,为了根据check_policy_service检查邮件,邮件必须通过SMTP提交(使用任何SMTP客户端,如mini_sendmail)。一旦我这样做了,就建立了到策略服务器的连接,并根据throttling检查并得到了预期的结果。使用下面的命令向smtp发送邮件,从而根据设置的策略进行验证:
cat /tmp/mail.txt | mini_sendmail -ffoo@bar.com -s127.0.0.1 -p25 foo2@ybar.com
谢谢。