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.

Bit of a strange one,

recently we have been told that a few emails sent from our servers occasionally are including the mail headers within the body content, example below, however I have done various test scripts and sent test emails from the servers in question only not to experience this. Does anyone else have any ideas?

Our setup is Windows 2003 R2 servers running IIS 6 ASP.Net 3.5 SP1 however we use the old CDONTS.Newmail mailer

X-Priority: 3 

X-MSMail-Priority: Normal 

Importance: Normal 

X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4325
share|improve this question
    
Did you ever figure anything out here? I'm curious about the outcome... –  jj33 Jul 13 '09 at 13:03
    
I decided that supporting CDONTS was wasting time, especially as ever new server had to be setup to use it. So I upgraded the various ASP code to use CDO.Message and it appears the issue has gone away Magic ;) –  mjjames Aug 3 '09 at 11:37
add comment

2 Answers

An improperly quoted header that includes two embedded newlines, or CR/NL, could cause this. The only difference between the header and the body in the spec is two connsecutive newline characters (in other words, there can't be any blank lines in the header).

share|improve this answer
    
Isn't CR/LF the Internet standard? –  grawity Jul 10 '09 at 14:55
    
\r\n is, yeah. The problem is that on most systems I personally work on, that's not the native line ending. (\r for mac os, \n for unix). However, the software usually handles this for you, which is why I was so ambiguous about it. That said, that can sometimes be the source of a problem like this - the sending software doesn't see a bare linefeed as an "end of line" indicator, but something in the middle does, resulting in sent email that's "fine" and received email that's "broken". –  jj33 Jul 10 '09 at 16:47
add comment

Can you archive the SMTP traffic anywhere? You might be able to temporarily route mail through an SMTP server with an archive facility e.g. a quickly knocked together Linux machine. The point of this is that you'll be able to examine what was actually sent out from your server and if the mail format is getting muddled you'll be able to see exactly what is happening.

We use a mail filter (Mail Marshal, which is excellent, though I've also used MIMESweeper and that's just as good) and use this to keep all mails for a bit. Mail Marshal has a 30 day eval period, which would be long enough for your puposes.

JR

share|improve this answer
add comment

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.