AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-759338

Mike's questions

Martin Hope
Mike
Asked: 2021-06-25 11:13:29 +0800 CST

如何让 DKIM 为子域和根域地址签名?

  • 1

我在 Ubuntu 20.04 上使用最新版本的 DKIM + Postfix 我得到了 DKIM 来签署电子邮件 user@smtpmail.mydoamin.com。然而,它拒绝签署来自@mydomain.com 的电子邮件。是否可以为两个电子邮件地址签名,如果可以,我该怎么做?

下面是我的 opendkim.conf

# This is a basic configuration that can easily be adapted to suit a standard
# installation. For more advanced options, see opendkim.conf(5) and/or
# /usr/share/doc/opendkim/examples/opendkim.conf.sample.

# Log to syslog
Syslog          yes
# Added later
SyslogSuccess           Yes
LogWhy                  Yes

# Required to use local socket with MTAs that access the socket as a non-
# privileged user (e.g. Postfix)
UMask           007

# Sign for example.com with key in /etc/dkimkeys/dkim.key using
# selector '2007' (e.g. 2007._domainkey.example.com)
Domain          smtpmail.rapidseohost.com
KeyFile         /etc/dkimkeys/smtpmail.private
Selector        smtpmail

# Commonly-used options; the commented-out versions show the defaults.
Canonicalization    relaxed/simple
#Mode           sv
SubDomains      yes

# Socket smtp://localhost
#
# ##  Socket socketspec
# ##
# ##  Names the socket where this filter should listen for milter connections
# ##  from the MTA.  Required.  Should be in one of these forms:
# ##
# ##  inet:port@address           to listen on a specific interface
# ##  inet:port                   to listen on all interfaces
# ##  local:/path/to/socket       to listen on a UNIX domain socket
#
Socket                  inet:8891@localhost
#Socket         local:/run/opendkim/opendkim.sock

##  PidFile filename
###      default (none)
###
###  Name of the file where the filter should write its pid before beginning
###  normal operations.
#
PidFile               /run/opendkim/opendkim.pid


# Always oversign From (sign using actual From and a null From to prevent
# malicious signatures header fields (From and/or others) between the signer
# and the verifier.  From is oversigned by default in the Debian pacakge
# because it is often the identity key used by reputation systems and thus
# somewhat security sensitive.
OversignHeaders     From

##  ResolverConfiguration filename
##      default (none)
##
##  Specifies a configuration file to be passed to the Unbound library that
##  performs DNS queries applying the DNSSEC protocol.  See the Unbound
##  documentation at http://unbound.net for the expected content of this file.
##  The results of using this and the TrustAnchorFile setting at the same
##  time are undefined.
##  In Debian, /etc/unbound/unbound.conf is shipped as part of the Suggested
##  unbound package

# ResolverConfiguration     /etc/unbound/unbound.conf

##  TrustAnchorFile filename
##      default (none)
##
## Specifies a file from which trust anchor data should be read when doing
## DNS queries and applying the DNSSEC protocol.  See the Unbound documentation
## at http://unbound.net for the expected format of this file.

TrustAnchorFile       /usr/share/dns/root.key

##  Userid userid
###      default (none)
###
###  Change to user "userid" before starting normal operation?  May include
###  a group ID as well, separated from the userid by a colon.
#
UserID                opendkim
subdomain postfix domain dkim digital-signatures
  • 1 个回答
  • 446 Views
Martin Hope
Mike
Asked: 2021-06-24 15:07:07 +0800 CST

DKIM 似乎在工作,但我得到“dkim=temperror (no key for signature)”

  • 1

在 Ubuntu 20.04 上使用 Postfix 的 DKIM

电子邮件标题的一部分,因为它到达我的谷歌邮件帐户:

ARC-Authentication-Results: i=1; mx.google.com;
       dkim=temperror (no key for signature) header.i=@smtpmail.rapidseohost.com header.s=smtpmail header.b=MdGUxaPe;
       spf=pass (google.com: best guess record for domain of root@smtpmail.rapidseohost.com designates 147.182.132.193 as permitted sender) smtp.mailfrom=root@smtpmail.rapidseohost.com;
       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=rapidseohost.com
Return-Path: <root@smtpmail.rapidseohost.com>
Received: from smtpmail.rapidseohost.com (smtpmail.rapidseohost.com. [147.182.132.193])
        by mx.google.com with ESMTPS id k13si244481qvc.109.2021.06.23.15.53.37
        for <michael.rajhel@gmail.com>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Wed, 23 Jun 2021 15:53:37 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of root@smtpmail.rapidseohost.com designates 147.182.132.193 as permitted sender) client-ip=147.182.132.193;
Authentication-Results: mx.google.com;
       dkim=temperror (no key for signature) header.i=@smtpmail.rapidseohost.com header.s=smtpmail header.b=MdGUxaPe;
       spf=pass (google.com: best guess record for domain of root@smtpmail.rapidseohost.com designates 147.182.132.193 as permitted sender) smtp.mailfrom=root@smtpmail.rapidseohost.com;
       dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=rapidseohost.com
Received: by smtpmail.rapidseohost.com (Postfix, from userid 0) id 4ED14FC3C0; Wed, 23 Jun 2021 22:53:37 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=smtpmail.rapidseohost.com; s=smtpmail; t=1624488817; bh=WBggpZrfs7F0OzQkyE7LiZPHyfFFhl7N4CNav2f5YVw=; h=Subject:To:Date:From:From; b=MdGUxaPeNiXZrtSo91A2YQ/jZJPIAM6O9y+BBSS1vE51CIyZAR294V5Xpv2L3inK+
     66ocOYtKX27jE215AP5O71pHyCvy6HFC8bIDZ7s2MMAFlhywdQYXxvtAZ5hsbwllrA
     BHvG6gof1Ev33c8mLlArlt7Xcm3ra2oaAU6txHGk=

我认为这是一个子域问题,所以我尝试了两个不同的选择器记录。我的 DNS 中有 DKIM TXT 记录:

  • smtpmail._domainkey.rapidseohost.com
  • smtpmail._domainkey.smtp.rapidseohost.com

两者具有相同的 DKIM 值。

我还有一个带有 google 选择器的 gmail 套件的 DKIM 记录,效果很好:

  • google._domainkey.rapidseohost.com

非常感谢您的帮助。

ubuntu postfix dkim
  • 1 个回答
  • 491 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve