3

I've been looking through questions on Stackoverflow and Serverfault but haven't found the same problem mentioned - though that may be because I just don't know enough about how email works to understand that some of the questions are really the same as mine ... here's my situation:

I have a web application that uses .Net's SmtpClient to send email. The configuration of the SmtpClient uses a smtp server, username and password. The SmtpClient code executes on a server that has an ip address not in the domain the smtp server is in.

In most cases the emails go without a problem - but not AOL (and maybe others - but that is one we know for sure right now).

When I look at the headers in the message that was kicked back from AOL it has one less line than the successful messages hotmail gets:

AOL Bad Message:

Received: from WEBSVRNAME ([##.###.###.###]) by domainofsmtp.com with MailEnable ESMTP; Mon, 18 Jun 2012 09:48:24 -0500
MIME-Version: 1.0
From: "[email protected]" <[email protected]>
...

Good Hotmail Message:

Received: from mail.domainofsmtp.com ([###.###.###.###]) by subdomainsof.hotmail.com with Microsoft SMTPSVC(6.0.3790.4900); Thu, 21 Jun 2012 09:29:13 -0700
Received: from WEBSVRNAME ([##.###.###.###]) by domainofsmtp.com with MailEnable ESMTP; Thu, 21 Jun 2012 11:29:03 -0500
MIME-Version: 1.0
From: "[email protected]" <[email protected]>
...

Notice the hotmail message headers has an additional line.

I'm confused as to why the Web server's name and ip address are even in the headers since I thought I was using the SmtpClient to go through the smtp server (hence the need for the username and password of a valid email box).

I've read about SPFs, DKIM and SenderID's but at this point I'm not sure if I would need to do something with the web server (and its ip/domain) or the domain the smtp is coming from. Has anyone had to do anything similiar before?

Am I using the smtp server as a relay? Any help on how to describe what I'm doing would also help.

10
  • Where does your mailserver run? Is it from a provider like google or selfhosted? This looks like a misconfigured mailserver. Jun 22, 2012 at 0:25
  • Its not gmail or anything like that or exchange some other sort of mail server. Jun 22, 2012 at 0:30
  • So did you setup the mailserver? Where does it run? Jun 22, 2012 at 0:32
  • 1
    Can the server send out mails to AOL if you just use SMTP? Maybe with a mail program Jun 22, 2012 at 0:39
  • 1
    Check to see if the smtp server somehow made it onto a blacklist mxtoolbox.com/blacklists.aspx
    – ZnArK
    Jun 25, 2012 at 17:39

2 Answers 2

3
+50

Here are some things you can do to troubleshoot your issue with AOL and others:

First, know that AOL, and others, use methods to prevent spam such as refusing email from email domains that do not have a reverse lookup record, graylisting or by using SPF records. You should check each of these. The graylisting one would return an error when smtpclient send method is executed.

Next, if you can check the server that is executing the send method to see if it is throwing any errors or if errors are being ignored in a try catch block.

Also, you can telnet to your SMTP server and do an EHLO test to see if you can view any problems.

See more information on AOL blocking policy here: http://postmaster.aol.com/Postmaster.Errors.php

Other email domains may use similar methods to prevent spam so you may need to follow the same troubleshooting with those as well.

1
  • I'd also recommend these steps. Since your original sender uses the smtp-server as a relay, you've to check the smtp-server.
    – ppuschmann
    Jun 29, 2012 at 7:15
1

Some points:

By default, most SMTP servers include a Received: header for the originating host even though it is not an SMTP server.

Anytime you send a message through an SMTP server, you are using it as a relay.

Most spam filters will look at all of the Received: headers. Each of them is usually run through a blacklist and checked for reverse mapping validity, as well as domainkeys and SPF checks. You will therefore need to ensure that both of them are permitted in your SPF record and have valid reverse mapping, and that neither of them are listed in a blacklist.

I suspect the difference you are seeing is that AOL has not added a Received: header referencing your mail server because it bounced the message (as the terminology implies, that header is added by each server the message passes through to indicate who it was received from last). It appears that the hotmail SMTP server did add it in this case. This isn't really important for troubleshooting purposes.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .