I am the main programmer of an ecommerce store based in Italy called kokoart.it
I'm having difficulties sending the messages to outlook inbox from an internal php script (no problems with other providers).
- The website is hosted on plesk and emails are sent using a postfix
server.
- The emails are sent from a php script, using the mail() function
when registering, forgetting the password or completing a purchase
order.
- The emails received a pass for spf, dkim, dmarc.
- Bonus: mail-tester.com rates them 10/10
(https://www.mail-tester.com/test-cve6g63i6)
So what exactly is going on here? How can I improve the reliability of these emails in order to get them delivered correctly ?
Please help out, I'm out of ideas.
Here I attach the origin of an example message:
Received: from HE1EUR04HT078.eop-eur04.prod.protection.outlook.com
(2603:10a6:6:29::29) by DB7PR03MB3579.eurprd03.prod.outlook.com with HTTPS
via DB6P193CA0019.EURP193.PROD.OUTLOOK.COM; Wed, 27 Jan 2021 13:33:03 +0000
Received: from HE1EUR04FT027.eop-eur04.prod.protection.outlook.com
(2a01:111:e400:7e0d::44) by
HE1EUR04HT078.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0d::102)
with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.11; Wed, 27 Jan
2021 13:33:03 +0000
Authentication-Results: spf=pass (sender IP is 212.227.193.184)
smtp.mailfrom=kokoart.it; live.it; dkim=pass (signature was verified)
header.d=kokoart.it;live.it; dmarc=pass action=none
header.from=kokoart.it;compauth=pass reason=100
Received-SPF: Pass (protection.outlook.com: domain of kokoart.it designates
212.227.193.184 as permitted sender) receiver=protection.outlook.com;
client-ip=212.227.193.184; helo=kokoart.it;
Received: from kokoart.it (212.227.193.184) by
HE1EUR04FT027.mail.protection.outlook.com (10.152.27.30) with Microsoft SMTP
Server id 15.20.3784.11 via Frontend Transport; Wed, 27 Jan 2021 13:33:03
+0000
X-IncomingTopHeaderMarker:
OriginalChecksum:2058771F4AE1E5566B7DBACE5724416D246C304E5C8A0B682244EFC8D48E4374;UpperCasedChecksum:2AC0BCD85F92251DA8EE83273E1C49AE8F3B8D9AC24305B48316C45A8F9601D1;SizeAsReceived:744;Count:9
Received: by kokoart.it (Postfix, from userid 10000)
id DC3B865476; Wed, 27 Jan 2021 14:33:02 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kokoart.it;
s=default; t=1611754382;
bh=nBTZ4TjvBgORbLML+2Pg2c+dx4/CJsYz7hy4BiQ/zJ4=; h=To:Subject:From;
b=LtAoTwk3VjPUDf39U2azRFVbZLDQrp7g2zRrR64N5d3VnlgGBY4KNSnHxp1J/fqW2
rwOzHOVacaClw0oEJO8D2BVhrlX54k+Qc3oO5c0R2MZSqiv6tXn0QpFQ7pBhpvmp2I
IyF8JD8CZzYHoMdVU5srikXhCJGL7l1pDki2niJE=
To: [email protected]
Subject: Thank you for your purchase.
From: kokoart.it <[email protected]>
Content-Type: multipart/alternative; boundary="60116b8ecdbc1"
Message-Id: <[email protected]>
Date: Wed, 27 Jan 2021 14:33:02 +0100 (CET)
X-IncomingHeaderCount: 9
Return-Path: [email protected]
X-MS-Exchange-Organization-ExpirationStartTime: 27 Jan 2021 13:33:03.3233
(UTC)
X-MS-Exchange-Organization-ExpirationStartTimeReason: OriginalSubmit
X-MS-Exchange-Organization-ExpirationInterval: 1:00:00:00.0000000
X-MS-Exchange-Organization-ExpirationIntervalReason: OriginalSubmit
X-MS-Exchange-Organization-Network-Message-Id:
c6645106-bd08-4ce7-6717-08d8c2c8128a
X-EOPAttributedMessage: 0
X-EOPTenantAttributedMessage: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa:0
X-MS-Exchange-Organization-MessageDirectionality: Incoming
X-MS-PublicTrafficType: Email
X-MS-Exchange-Organization-AuthSource:
HE1EUR04FT027.eop-eur04.prod.protection.outlook.com
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-UserLastLogonTime: 1/27/2021 1:27:27 PM
X-MS-Office365-Filtering-Correlation-Id: c6645106-bd08-4ce7-6717-08d8c2c8128a
X-MS-TrafficTypeDiagnostic: HE1EUR04HT078:
X-MS-Exchange-EOPDirect: true
X-Sender-IP: 212.227.193.184
X-SID-PRA: [email protected]
X-SID-Result: PASS
X-MS-Exchange-Organization-PCL: 2
X-MS-Exchange-Organization-SCL: 0
X-Microsoft-Antispam: BCL:0;
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jan 2021 13:33:03.2723
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: c6645106-bd08-4ce7-6717-08d8c2c8128a
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-AuthSource:
HE1EUR04FT027.eop-eur04.prod.protection.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: Internet
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg:
00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1EUR04HT078
X-MS-Exchange-Transport-EndToEndLatency: 00:00:00.4768981
X-MS-Exchange-Processed-By-BccFoldering: 15.20.3784.017
X-Microsoft-Antispam-Mailbox-Delivery:
abwl:0;wl:0;pcwl:0;kl:0;iwl:0;dwl:0;dkl:0;rwl:0;ucf:0;jmr:0;ex:0;auth:1;dest:J;OFR:SpamFilterAuthJ;ENG:(5062000282)(90000117)(90005022)(91005020)(91035115)(9000001)(9005001)(9015001)(9025001)(9030002)(9050020)(9100273)(5061607266)(5061608174)(4900115)(2008001094)(2008000189)(2008019284)(2008120284)(8390226)(98390106)(58390106)(8391040)(4920090)(6350099)(4950131)(4990090)(9140004);RF:JunkEmail;
X-Message-Info:
qoGN4b5S4yrrb8vqK2fp63ec1Rx80448A0SJoP+at5caOhjbAPLieusISQ9KycDL1ksqODtUi1ASZnKpQCz9mAp2qD2RCT4/l0/Ytil25BosptM6sTMxafRr/AiXpVY1Ya7q0lRNXSb65tgXP416NYpnRDJkhNCnd/vHEdVGbd7aQcAAaOrZhR1VjnULN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hY2th
Z2UgaXMgYmVpbmcgcHJlcGFyZWQgYW5kIGlzIGdvaW5nIHRvIGJlIHNlbnQgd2l0aGluIG9uZSBi
dXNpbmVzcyBkYXkuIFdlIGhvcGUgdG8gc2VlIHlvdSBzb29uIGFnYWluIQ==
--60116b8ecdbc1
Content-Type: text/html; UTF-8
Content-Transfer-Encoding: base64
RGVhciBjdXN0b21lciwgd2UgdGhhbmsgeW91IGZvciB5b3VyIHB1cmNoYXNlLiBZb3VyIHBhY2th
Z2UgaXMgYmVpbmcgcHJlcGFyZWQgYW5kIGlzIGdvaW5nIHRvIGJlIHNlbnQgd2l0aGluIG9uZSBi
dXNpbmVzcyBkYXkuIFdlIGhvcGUgdG8gc2VlIHlvdSBzb29uIGFnYWluIQ==
--60116b8ecdbc1--
I always used PHPMailer library, and worked wonders but for some obscure reason, the messages could not get a correct DKIM signature anymore. This prevented to be actually delivered to any outlook inbox.
So I opted for a simpler approach and now emails are being sent, but flagged as spam without a reason.
I'm open to any kind of solution, advice, anything.
Thank you in advance.
question from:
https://stackoverflow.com/questions/65920726/internal-php-script-sending-reliable-emails-to-junk-outlook 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…