Sunday, 23 April 2017

Why was my email rejected ?


It's been rejected!. OK so I made up this completely rubbish address but if you get an email that has been rejected, a so-called "bounced" mail, you can do some good analysis of the reason if you can read the SMTP logs. SMTP being the Simple Mail Transfer Protocol that sends mail between servers and other places too.

Before you yawn this is what you get back.

Generating server: AM5EUR02HT096.mail.protection.outlook.com
kbmregregkrgrgktrgrtb@hotmail.co.uk
SNT004-MC5F20.hotmail.com
Remote Server returned '550 5.1.351 Remote server returned unknown recipient or mailbox unavailable -> 550 Requested action not taken: mailbox unavailable'
Original message headers:
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com;
 s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version;
 bh=lURfIqW7JBVRaKyNHMwqLzWn5AAyxsprWeqWekgSchc=;
 b=rH8HpA6mqgsmvED575S7sZZ3m6fy36WII+18d68flJNvd0IaNC+lLUb7bpDA90kQ7JH3DJEX5hbER4tORPoZfJW51WYKlGZdFfjBBvTkph4HD3u+yXavkOWhdYK1uTPMKV8DxJusJNWJcX+7uK7zs6cWWaHLm0X4LjHozOhbR71dFXREGzI1eODcOHj7rw0Eb6JtCA7xPwNdCP7GBrfJjhBGX5VfwI0ld1EPPPEeNst3fiIvu2rzfy35uregBnhzZlqKmZDGbel2HeE7bDsO8a8Ix9HdQSIsjEBKBnzNGuKyoma4AKyOUtp/dgUFPgeVhjq+9Dd3rTQbw6eoAXxZRw==
Received: from AM5EUR02FT045.eop-EUR02.prod.protection.outlook.com
 (10.152.8.60) by AM5EUR02HT096.eop-EUR02.prod.protection.outlook.com
 (10.152.9.222) with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1019.14; Sun, 23
 Apr 2017 13:13:40 +0000
Actually it goes on a lot longer than this little segment. However this gives you a clue it's not easy to read.
If you use Outlook this is hidden inside the email. You have to expand the message and view the 'properties' of the message and the 'internet headers'. It's in a slightly different menu for different versions of Outlook so you will have to search.
To make the rejection reason a bit more readable go to the Microsoft Remote Connectivity Advisor at this URL; https://testconnectivity.microsoft.com/ 
Once there pick the tab option called Message header Analyzer.
Insert the entire SMTP rejection message. Click on "Analyze headers" and then you will get a neatly formatted mail failure report.

It's a good little email tool for rejected mail.