大网数据广告活动
服务器运维问答

Configure postfix to DKIM-sign emails generated from the system

· 52CE 我爱测

My web hosting server features a Postfix setup up and running. That postfix is also open with STARTTLS on port 587 for authorized users (only me, myself and I right now) to send emails to any domain after signing it with DKIM. Ev…

问题原文

原帖链接 · usr-local-ΕΨΗΕΛΩΝ · CC BY-SA 3.0

My web hosting server features a Postfix setup up and running. That postfix is also open with STARTTLS on port 587 for authorized users (only me, myself and I right now) to send emails to any domain after signing it with DKIM.

Every email I send via Outlook authenticating myself is fine. All DMARC reports display no error. The problem is when web applications send email via that Postfix.

Since I use Apache's mod-itk for PHP hosting, all emails are generated by [email omitted] and submitted to Postfix via standard means (sendmail???).

But in that way they are not DKIM-signed. Consider the following:

$ mail [email omitted]
Subject: Test DKIM
Hello
.
EOT

Port25 responded:

----------------------------------------------------------
DomainKeys check details:
----------------------------------------------------------
Result:         neutral (message not signed)
ID(s) verified: header.From=[email omitted]
DNS record(s):

----------------------------------------------------------
DKIM check details:
----------------------------------------------------------
Result:         neutral (message not signed)
ID(s) verified: 

Postfix logs don't show dkimproxy interaction.

Before posting my configuration, let's repeat the situation and ask the question.

Currently, when I send an email via SMTP/TLS on port 587 it gets DKIM-signed. When a process on the server sends an email using mail command or PHP builtin mail function, the mail dorsn't get signed by dkimproxy.

The question is: how to sign every email coming from the server itself with dkimproxy?

Configuration is pasted to http://pastebin.ca/2374363. Please note that I have only dkimproxy.out enabled for the moment

已采纳解答

原帖链接 · user102000 · CC BY-SA 3.0

You added dkim SIGNING to submission port only.

Postfix handles smtp separatly submission from pickup (mails submited by sendmail command are entering postfix via pickup)

In postfix You should use dkim milter in main.cf

smtpd_milters = inet:localhost:10027
non_smtpd_milters = inet:localhost:10027

First line is for SMTP submission (port 587)

Second line is for mails entering via pickup

One thing to note is that bounce messages and NDR reports generated internally by postfix will not be DKIM signed

Reference http://www.postfix.org/MILTER_README.html

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-05-05)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。