I'm trying to send an email via some C# ASP.NET code. This is being sent to our internal mailrelay server, with our standard "from" address (e.g.
[email protected]). In some instances, this is getting through OK, in others, it's getting blocked by the Spam
Filter.
An example of our Web.config
<mailSettings>
<smtp from="
[email protected]">
<network host="mailrelay.domain.com" defaultCredentials="true" />
</smtp>
</mailSettings>
I've spoken with our Exchange Server team and they inform me that on occasions, our mail looks sufficiently like spam and is automatically blocked. The algorithm appears to be points based and blocks on a score of 45. 20 points are instantly added because our system is not sending the hostname with the domain name suffixed. e.g. the server is hoping for myServerName.domain.com, but despite being part of that domain, the server is sending from myServerName.
I've been asked to look at altering the EHLO string that is sent and/or influencing the host so that it is its fully qualified name. However, this makes little sense to me, and although I understand the concept of what I need to change - I don't know where to begin looking for the fix.