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

Disable DKIM in exim for mailing lists

· 52CE 我爱测

I am subscribed to a number of mailing lists that don't remove my DKIM signature but mutate messages (change From ) and add their own DKIM. Resulting messages have 2 DKIM signatures, one failing and one passing. DMARC is perhaps …

问题原文

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

I am subscribed to a number of mailing lists that don't remove my DKIM signature but mutate messages (change From) and add their own DKIM. Resulting messages have 2 DKIM signatures, one failing and one passing.

DMARC is perhaps the biggest problem for me. When I send a message via such a mailing list I started to receive dozens of DMARC reports stating that my message contains a failed DKIM signature.

How can I disable my DKIM signatures when sending messages to these mailing lists?

I have standard DKIM-related configuration for exim:

DKIM_CANON = relaxed
DKIM_SELECTOR = default
DKIM_DOMAIN = ${lc:${domain:$h_from:}}
DKIM_FILE = /etc/exim4/DKIM_DOMAIN/DKIM_SELECTOR.private.pem
DKIM_PRIVATE_KEY = ${if exists{DKIM_FILE}{DKIM_FILE}{0}}

As far as I understand I cannot check $recipients, right?

So I think I will configure my MUA (mutt) to change local part and check the local part. Something like

DKIM_PRIVATE_KEY = ${if and {!eq{$local_part}{phd+list}}{exists{DKIM_FILE}} {DKIM_FILE}{0}}

Is there a better way to do it?

Upd. I decided to go a slightly different way: add/check a custom header X-Skip-DKIM-Sig. So in my .muttrc I add the header for known mailing lists:

send-hook ~u "\
    unmy_hdr Reply-To; \
    my_hdr X-Skip-DKIM-Sig: mailing list"

and in exim I check it:

DKIM_PRIVATE_KEY = ${if and{{!def:h_x-skip-dkim-sig:}{exists{DKIM_FILE}}} {DKIM_FILE}{0}}

已采纳解答

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

There's no need. The falling DKIM signature does not impair delivery. It's only important whether or not a valid DKIM signature is present.

For the purposes of DMARC, it is important that the domain that the DKIM signature relates to is the same as in the From MIME Header. If the mail server modifies the subject or body, it also has to modify the From header in order to be able to send something that passes DMARC. This is problematic, and many if not most mail servers fail. Explaining this to users is an ongoing problem.

ARC attempts to fix this. It's relatively new though, so adoption is patchy.

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

资料来源与适用范围

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

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

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