>>>>A customer reported a problem where some of the emails sent by my ASP.NET application are rejected. The error message is:
>>>>
>>>>The server response was: 4.4.62 Mail sent to the wrong Office 365
>>>>
>>>>
>>>>I noticed that all emails that were rejected have a common domain. For example "@country.gov"
>>>>
>>>>I don't know how email servers work. But do you think the organization IT should whitelist this domain ("@country.gov") in the email server?
>>>
>>>No. The problem is being caused by an incomplete configuration or misconfiguration of
your customer's mail sending infrastructure. Here's what's happening when your app is sending a message:
>>>
>>>1. The message has a "from" field, let's say it's SomeAddress@DLCustomer.com
>>>2. The message is sent to AnotherAddress@country.gov
>>>3. When the message is sent your app is using DLCustomer's mail sending infrastructure (you haven't specified the details, this can make a big difference)
>>>4. country.gov's mail receiving infrastructure will perform various checks against the incoming mail message. Any missing or mis-configuration of DLCustomer's mail sending infrastructure will increase the spam score of the message and may cause it to be rejected
>>>5. If country.gov's mail is received by M365/Exchange Online then there are additional checks. I haven't encountered the exact message you're seeing but you could get DLCustomer's tech support to go through
https://docs.microsoft.com/en-us/exchange/troubleshoot/email-delivery/wrong-office-365-region-exo>>>
>>>It sounds like the "whitelisting" you're asking about would be to ask country.gov to whitelist mail from DLCustomer.com:
>>>
>>>- No sysadmin in their right mind would do that to work around a misconfiguration at DLCustomer.com
>>>- Even if the whitelisting was put in place, there's a lower level routing issue/rejection happening per the link above. The mail will not get to country.gov to be accepted or rejected until that specific issue is addressed
>>
>>First, thank you. I will try to condense your message into a couple of sentences that both I and the customer can understand. The point is that they - the customer - told me what email setting to use (the SMTP, username, etc.). And I use their email configuration. And I know - from the error log - that my application sends emails successfully to most emails. But some, and I found the @country.gov to the common denominator - are rejected. I hope the customer understands that it is not my application problem but something else. It would be helpful if I could write to them exactly what they need to do. But I don't know.
>>Your message is very detailed and I will read it again (and again).
>>Again, thank you.
>
>For troubleshooting you could ask the customer to send an e-mail to @country.gov from some other mail client, using the same credentials you were given for your app.
Thank you. I am in discussion with the customer IT now.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham