views:

73

answers:

1

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.

A: 

They should be able to simply allow emails from your web server IP:

http://technet.microsoft.com/en-us/library/bb125225.aspx

jvenema
This is great and will probably be fine for our live and staging servers, but it would still pose an issue for our development boxes. We currently run XP and I guess we could run an SMTP server via IIS for that still (Win7 upgrades might cause and issue - but I guess that's a bridge to cross at a later time...)
Amadiere
For dev boxes, just set up your web.config to drop the files locally; it'll just write them to a file, and you can inspect them at your leisure. See the highest voted response (not the accepted answer) here http://stackoverflow.com/questions/495790/smtp-server-that-saves-all-mail-to-a-folder
jvenema