에 따르면http://opendkim.org/opendkim.conf.5.html, ExternalIgnoredHosts
및 옵션은 다음과 같이 옵션 InternalHosts
과 동일한 형식을 지원합니다 .PeerList
세트에는 각 줄에 호스트 이름, 도메인 이름(예: ".example.com"), IP 주소, IPv6 주소(IPv4 매핑 주소 포함) 또는 CIDR 스타일 IP 사양(예: "192.168.1.0/")이 포함되어야 합니다. 24").
IP 주소와 서브넷은 내부 호스트로 올바르게 식별되지만 모든 호스트 이름과 도메인이 선택되지는 않습니다.
여기는/etc/opendkim.conf
LogWhy yes
Syslog yes
SyslogSuccess yes
UMask 002
UserID opendkim:opendkim
KeyTable refile:/etc/opendkim/key.table
SigningTable refile:/etc/opendkim/signing.table
ExternalIgnoreList refile:/etc/opendkim/trusted.hosts
InternalHosts refile:/etc/opendkim/trusted.hosts
AutoRestart yes
AutoRestartRate 10/1M
Background yes
Canonicalization relaxed/simple
DNSTimeout 5
Mode sv
Nameservers 192.168.100.1,192.168.100.2
OversignHeaders From
SignatureAlgorithm rsa-sha256
SubDomains no
Socket local:/var/spool/postfix/opendkim/opendkim.sock
PidFile /run/opendkim/opendkim.pid
그리고/etc/opendkim/trusted.hosts
127.0.0.1
::1
localhost
mailserver # mail server hostname
192.168.100.50 # test server
webserver.domain.local # web server
.domain.local # entire local domain
*.testdomain.local # entire local test domain
그리고 main.cf
다양한 옵션:
milter_default_action = accept
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_type} {auth_authen}
milter_protocol = 6
smtpd_milters = local:opendkim/opendkim.sock
non_smtpd_milters = $smtpd_milters
보낸 메일이 192.168.100.50
예상대로 서명되었습니다.
mailserver postfix/qmgr[5406]: 59CA920E11: removed
mailserver postfix/smtpd[5412]: connect from testserver.mydomain.com[192.168.100.50]
mailserver postfix/smtpd[5412]: 41BD520E11: client=testserver.mydomain.com[192.168.100.50]
mailserver postfix/cleanup[5436]: 41BD520E11: message-id=<>
mailserver opendkim[5427]: 41BD520E11: DKIM-Signature field added (s=default, d=contoso.com)
mailserver postfix/qmgr[5406]: 41BD520E11: from=<[email protected]>, size=371, nrcpt=1 (queue active)
mailserver postfix/smtp[5437]: 41BD520E11: to=<[email protected]>, relay=ASPMX.L.GOOGLE.COM[173.194.76.27]:25, delay=0.4, delays=0.01/0/0.13/0.26, dsn=2.0.0, status=sent (250 2.0.0 OK 1610364907 k20si14443742wrc.23 - gsmtp)
mailserver postfix/qmgr[5406]: 41BD520E11: removed
webserver.domain.local
그러나 클라이언트 이름이 확인되었음에도 불구하고 보낸 메일은 내부 메일로 선택되지 않습니다.
mailserver postfix/smtpd[5846]: connect from webserver.domain.local[192.168.100.51]
mailserver postfix/smtpd[5846]: 4F00620E11: client=webserver.domain.local[192.168.100.51]
mailserver postfix/cleanup[5850]: 4F00620E11: message-id=<>
mailserver opendkim[5840]: 4F00620E11: webserver.domain.local [192.168.100.51] not internal
mailserver opendkim[5840]: 4F00620E11: not authenticated
mailserver opendkim[5840]: 4F00620E11: no signature data
mailserver postfix/qmgr[5821]: 4F00620E11: from=<[email protected]>, size=371, nrcpt=1 (queue active)
mailserver postfix/smtp[5851]: 4F00620E11: to=<[email protected]>, relay=ASPMX.L.GOOGLE.COM[74.125.133.27]:25, delay=0.83, delays=0.01/0/0.43/0.39, dsn=2.0.0, status=sent (250 2.0.0 OK 1610365309 g124si15021166wma.170 - gsmtp)
mailserver postfix/qmgr[5821]: 4F00620E11: removed
호스트 이름을 확인하는 방법이나 이 기능이 구현되는 방법에 대한 보다 근본적인 내용과 관련된 내용이 누락되었습니까? 또한 도메인 조합을 시도했지만 성공 하지 *.domain.local
못했습니다 ..domain.local
/etc/opendkim/trusted.hosts
모든 도움을 감사히 받아들일 것입니다.
버전 번호:
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
~$ postconf mail_version
mail_version = 3.3.0
opendkim -V
~$ opendkim -V
opendkim: OpenDKIM Filter v2.11.0
Compiled with OpenSSL 1.1.1 11 Sep 2018
SMFI_VERSION 0x1000001
libmilter version 1.0.1
Supported signing algorithms:
rsa-sha1
rsa-sha256
Supported canonicalization algorithms:
relaxed
simple
Active code options:
POLL
QUERY_CACHE
USE_DB
USE_LDAP
USE_LUA
USE_ODBX
USE_UNBOUND
_FFR_ATPS
_FFR_RBL
_FFR_REPLACE_RULES
_FFR_SENDER_MACRO
_FFR_STATS
_FFR_VBR
libopendkim 2.11.0: atps query_cache
답변1
이 문제는 .NET의 도메인 와일드카드에서 선행 별표를 제거하여 해결되었습니다 /etc/opendkim/trusted.hosts
. 별표가 있으면 도메인 와일드카드가 작동하지 않을 뿐만 아니라 파일의 다른 모든 문자열 항목도 작동하지 않습니다. 단, IP 주소는 영향을 받지 않습니다.
IP 주소는 작동하지만 문자열은 작동하지 않습니다.
127.0.0.1
::1
localhost
mailserver # mail server hostname
192.168.100.50 # test server
webserver.domain.local # web server
.domain.local # entire local domain
*.testdomain.local # entire local test domain
IP 주소와 문자열이 모두 작동합니다.
127.0.0.1
::1
localhost
mailserver # mail server hostname
192.168.100.50 # test server
webserver.domain.local # web server
.domain.local # entire local domain
.testdomain.local # entire local test domain