Postfix和DKIMproxy的困扰:拒绝连接

我有我的服务器设置完全像这篇文章在这里: 获取DKIMproxy安装和configuration ,但我有以下问题。

当我通过端口587发送电子邮件到我的服务器时,我在我的mail.log中得到以下内容:

Sep 1 16:49:38 mailer postfix/smtpd[9974]: connect from unknown[xxx.xxx.xxx.xxx] Sep 1 16:49:39 mailer postfix/smtpd[9974]: 0B6C5301BC: client=unknown[xxx.xxx.xxx.xxx] Sep 1 16:49:39 mailer postfix/cleanup[9970]: 0B6C5301BC: message-id=<[email protected]> Sep 1 16:49:39 mailer postfix/qmgr[9949]: 0B6C5301BC: from=<[email protected]>, size=552, nrcpt=1 (queue active) Sep 1 16:49:39 mailer postfix/smtp[9953]: connect to 127.0.0.1[127.0.0.1]:10027: Connection refused Sep 1 16:49:39 mailer postfix/smtp[9953]: 0B6C5301BC: to=<[email protected]>, relay=none, delay=0.14, delays=0.14/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10027: Connection refused) 

我有/etc/dkimproxy/dkimproxy_out.conf设置如下:

 # specify what address/port DKIMproxy should listen on listen 127.0.0.1:10027 # specify what address/port DKIMproxy forwards mail to relay 127.0.0.1:10028 # specify what domains DKIMproxy can sign for (comma-separated, no spaces) # Note that this is set in /etc/init.d/dkimproxy in this Debian package # unactivate it there if you want to use the config file domain mailer.xxx.com # specify what signatures to add signature dkim(c=relaxed) signature domainkeys(c=nofws) # specify location of the private key keyfile /etc/dkimproxy/keys/email.key # specify the selector (ie the name of the key record put in DNS) selector mail 

然后,我的/etc/postfix/master.cf文件附有以下内容(根据教程):

 submission inet n - n - - smtpd -o smtpd_etrn_restrictions=reject -o smtpd_sasl_auth_enable=yes -o content_filter=dksign:[127.0.0.1]:10027 -o receive_override_options=no_address_mappings -o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject dksign unix - - n - 10 smtp -o smtp_send_xforward_command=yes -o smtp_discard_ehlo_keywords=8bitmime,starttls 

我似乎无法弄清楚的是为什么我一直在DKIMproxy应该监听的端口上收到“拒绝连接”。 任何人都可以帮我解决这个问题吗? 我不需要在防火墙中打开任何东西,是吗? 既然它应该只是在本地连接内部?

我觉得我好得近乎这个工作!

在post中添加了2条评论,但是您确定已将以下部分添加到master.cf中

 # service for accepting messages FROM the DKIM signing proxy 127.0.0.1:10028 inet n - n - 10 smtpd -o content_filter= -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks -o smtpd_helo_restrictions= -o smtpd_client_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o smtpd_authorized_xforward_hosts=127.0.0.0/8 

Postfix需要在10028上进行监听,以便DKIM在完成其部分后可以传递连接。

得到它了。

我有一个防火墙规则限制本地主机的stream量,并阻止这些端口(或者我认为):

 REJECT all -- anywhere 127.0.0.0/8 reject-with icmp-port-unreachable 

删除这让我运行dkimproxy并使用指定的端口。 谢谢您的帮助!