Rambomst / PHP-Bounce-Handler

Parse bounce emails and returns response status, recipient, headers, etc.
Other
7 stars 6 forks source link

change regex in formatStatusCode #16

Open yoyoy opened 5 years ago

yoyoy commented 5 years ago

Hello sometimes i get a status code smtp;550 5.4.316 Message expired, connection refused from outlook cloud protect system

I suggest to change your regex in formatStatusCode function for '/([245].[01234567].\d{1,3})\s(.)/' instead of '/([245].[01234567].\d{1,2})\s(.)/'

this pose another problem. the code returned is 550 => hard fail, but this mailbox is existing. this is just my server which is refused by outlook system... So it cool be nice to deal with this special case...i don't know how ...


Delivery has failed to these recipients or groups:

xxxxxx@xxxxxpharma.com Your message wasn't delivered. Despite repeated attempts to deliver your message, the recipient's email system refused to accept a connection from your email system.

Contact the recipient by some other means (by phone, for example) and ask them to tell their email admin that it appears that their email system is refusing connections from your email server. Give them the error details shown below. It's likely that the recipient's email admin is the only one who can fix this problem.

For Email Admins No connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the remote host - that is, one with no server application running. For more information and tips to fix this issue see this article: https://go.microsoft.com/fwlink/?LinkId=389361

Diagnostic information for administrators:

Generating server: MWHPR1301MB2095.namprd13.prod.outlook.com Receiving server: MWHPR1301MB2095.namprd13.prod.outlook.com Total retry attempts: 6

xxxxxx@xxxxxpharma.com 5/22/2019 2:28:16 PM - Server at MWHPR1301MB2095.namprd13.prod.outlook.com returned '550 5.4.316 Message expired, connection refused(Socket error code 10061)' 5/22/2019 2:23:08 PM - Server at 207.96.208.197 (207.96.208.197) returned '450 4.4.316 Connection refused [Message=Socket error code 10061] [LastAttemptedServerName=207.96.208.197] [LastAttemptedIP=207.96.208.197:25] [CO1NAM04FT009.eop-NAM04.prod.protection.outlook.com](Socket error code 10061)'