Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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: "donotreply@domainofsmtp.com" <donotreply@domainofsmtp.com>
...

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: "donotreply@domainofsmtp.com" <donotreply@domainofsmtp.com>
...

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.

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

2 Answers 2

up vote 2 down vote accepted
+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.

share|improve this answer
    
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 '12 at 7:15

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.