dkimproxy在多域场景中的有效configuration

我有一个postfix / dkimproxy安装程序不能按照我喜欢的方式工作。

我有SPF的exampledomain.org只允许从server.exampledomain.org (rDNS映射正确),这也是由smtp.exampledomain.org别名邮件。

目前,运行在服务器上的Web应用程序在发送出站电子邮件时使用Postfix的内置sendmail命令。 这些电子邮件来自[email protected] ,并且正确地使用DKIM签名。 那是对的!

当用户使用@exampledomain.org (me !!)从Outlook发送邮件时,它将连接到smtp.exampledomain.org并在STARTTLS命令之后进行身份validation。 不幸的是,电子邮件不是DKIM签名的。 日志显示电子邮件是自动转发的,不经过dkimproxy 。 dkimproxyconfiguration如下

 # 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) domain server.exampledomain.org,exampledomain.org # specify what signatures to add signature dkim(c=simple) signature domainkeys(c=nofws) # specify location of the private key keyfile /etc/ssl/private/dkim_server/dkim_server.key # specify the selector (ie the name of the key record put in DNS) selector server 

DNS TXTlogging已经设置。

Postfixconfiguration了一个大的master.cf文件,我不会将其完整粘贴。 相关的线是

 # # modify the default submission service to specify a content filter # and restrict it to local clients and SASL authenticated clients only # 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 # # specify the location of the DomainKeys signing filter # dksign unix - - n - 10 smtp -o smtp_send_xforward_command=yes -o smtp_discard_ehlo_keywords=8bitmime,starttls # # service for accepting messages FROM the DomainKeys signing filter # 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 

问题是

为什么不从外部得到的邮件得到由dkimproxy处理?

您需要确保Outlook连接到提交端口(端口587),而不是端口25.这是因为Postfixconfiguration工作是通过签名在端口587上收到的邮件(即从您的客户端发送外发邮件),而不是邮件在端口25上收到(因为这是由其他MTA传送到您的服务器的邮件)。 这是由main.cfcontent_filter行来实现的,你会注意到它在submission inet定义的submission inet ,而不是smtp inet定义。