
나는 postfix를 사용하여 매우 간단한 이메일 설정을 가지고 있습니다. 내 라우터가 모든 포트를 전달하는 라즈베리 파이에서 실행되는 내 집 내에서. 들어오는 메일을 볼 수 있는 postfix 인스턴스가 있습니다. 내 이메일 도메인(hartley-consultants.com)에 대한 MX 레코드는 이 (외부) IP 주소를 가리킵니다. 자주 변경되지는 않지만 보내는 메일이 차단될 수 있으므로 자체 전용 IP 주소가 있는 클라우드의 가상 인스턴스에 두 번째 서버가 있습니다. 이것은 또한 postfix를 실행하고 IP 주소를 가리키는 hartley-consultants.com에 대한 MX 레코드도 가지고 있습니다. 내 홈 인스턴스에서 나가는 모든 메일은 해당 클라우드 서버를 통해 라우팅됩니다. 오랫동안(최소 5년) 이런 방식으로 설정되어 왔습니다.
hartley-consultants.com의 내 DNS 서버에도 다음 내용이 포함된 TXT 레코드가 있습니다.v=spf1 mx -all
한 달쯤 전부터 갑자기 이런 식으로 거절을 받기 시작했어요.
This is the mail system at host asgard.hartley-consultants.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<[email protected]>: host
gmail-smtp-in.l.google.com[2a00:1450:400c:c1b::1a] said: 550-5.7.26 This
message fails to pass SPF checks for an SPF record with a hard 550-5.7.26
fail policy (-all). To best protect our users from spam and 550-5.7.26
phishing, the message has been blocked. Please visit 550-5.7.26
https://support.google.com/mail/answer/81126#authentication for more 550
5.7.26 information. k13-20020a5d66cd000000b002185e450efbsi9129616wrw.664 -
gsmtp (in reply to end of DATA command)
postfix에 의해 추가된 이 메시지의 헤더 부분은 다음과 같습니다.
Reporting-MTA: dns; asgard.hartley-consultants.com
X-Postfix-Queue-ID: 68A463A2807
X-Postfix-Sender: rfc822; [email protected]
Arrival-Date: Mon, 13 Jun 2022 21:49:42 +0100 (BST)
Final-Recipient: rfc822; [email protected]
Original-Recipient: rfc822;[email protected]
Action: failed
Status: 5.7.26
Remote-MTA: dns; gmail-smtp-in.l.google.com
Diagnostic-Code: smtp; 550-5.7.26 This message fails to pass SPF checks for an
SPF record with a hard 550-5.7.26 fail policy (-all). To best protect our
users from spam and 550-5.7.26 phishing, the message has been blocked.
Please visit 550-5.7.26
https://support.google.com/mail/answer/81126#authentication for more 550
5.7.26 information. k13-20020a5d66cd000000b002185e450efbsi9129616wrw.664 -
gsmtp
저는 이제 거의 은퇴했기 때문에 이 이메일 도메인은 한 달에 몇 통의 이메일만 보내므로 수정이 필요하지만 긴급하지는 않습니다. 그러나 Google 도움말에 갔는데 내가 뭘 잘못하고 있는지 전혀 알 수 없었습니다.
여기 누군가 Google이 잘못 생각하는 것과 이 문제를 해결하기 위해 무엇을 해야 하는지 설명할 수 있습니까?
답변1
내 생각에 이 문제에 대한 답은 아마도 다음과 같을 것이다.
gmail-smtp-in.l.google.com[2a00:1450:400c:c1b::1a] said:
이는 IPv6을 통해 Gmail과 통신하고 있었지만 MX 레코드의 호스트는 DNS에 IPv4 주소만 가지고 있으므로 MX 레코드를 따르는 SPF 레코드에서 다루는 모든 것입니다.
답변2
hartley-consultants.com의 SPF 레코드에는 이메일을 보내는 호스트의 IP 주소가 포함되어야 합니다.
Google은 귀하가 보내는 IP 주소가 승인되지 않았다고 불평합니다. (귀하의 질문에 IP 주소가 표시되지 않아 확인할 수 없습니다.)
귀하의 도메인에 대한 SPF 레코드를 살펴보니 두 개의 IP 주소가 승인된 것으로 나타났습니다.
$ spftrace hartley-consultants.com
hartley-consultants.com
│ "v=spf1 mx -all"
├── mx → hartley-consultants.com (lookups: 1/10, nested: 2/10)
│ ├── mail.hartley-consultants.com
│ │ └── 94.173.170.110
│ └── asgard.hartley-consultants.com
│ └── 213.138.108.48
│ not-match
└── all match result=fail
fail
SPF 정책에 전송하려는 IP 주소를 포함해야 합니다. 예를 들어 현재 SPF 정책에 특정 IPv4 주소를 추가할 수 있습니다."v=spf1 mx ip4:11.22.33.44 -all"