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.

My program sends daily emails to users. I recently switched servers and once we setup the email job on the new server, one of our users complained that they are receiving the email in plan text. No other user has this problem.

The header that most users receive is as follows (replaced sensitive info with <> tags):

Delivered-To: <email>
Received: by 10.229.215.75 with SMTP id hd11cs31754qcb; Fri, 8 Jul 2011 06:00:20 -0700 (PDT)
Received: by 10.150.236.18 with SMTP id j18mr2060469ybh.84.1310130019825; Fri, 08 Jul 2011 06:00:19 -0700 (PDT)
Return-Path: <return path>
Received: from <server> ([<ip address>])
    by mx.google.com with ESMTP id f14si8302490ybc.25.2011.07.08.06.00.18;
    Fri, 08 Jul 2011 06:00:18 -0700 (PDT)
Received-SPF: neutral (google.com: <ip address> is neither permitted nor denied by best guess record for domain of <return path) client-ip=<ip address>;
Authentication-Results: mx.google.com; spf=neutral (google.com: <ip address> is neither permitted nor denied by best guess record for domain of <return path>) smtp.mail=<return path>
Received: by <server name> (Postfix, from userid 1001)
id 41B4C162FFA; Fri,  8 Jul 2011 08:00:17 -0500 (CDT)
To: <user email address>
Subject: <subject>
X-PHP-Originating-Script: 33:Email.php
From: <from email address>
Content-Type: text/html; charset=utf-8
Message-Id: <20110708130018.41B4C162FFA@<server>>
Date: Fri,  8 Jul 2011 08:00:17 -0500 (CDT)

However, the user with the errors receives the following header:

Return-Path: <return path>
Received: from <server> (UnknownHost [<ip address>]) by seriousw1.seriousw1.com with SMTP; Mon, 11 Jul 2011 08:00:26 -0500
Received: by <server> (Postfix, from userid 1001)
   id 72F2A163F34; Mon, 11 Jul 2011 08:00:09 -0500 (CDT)
To: <user email address>
Subject: <subject>
X-PHP-Originating-Script: 33:Email.php
From: <from email>
Message-ID: <809141a1b4f842e0a015f20c000dab91@com>
X-SmarterMail-Spam: SPF_None, Reverse DNS Lookup, ISpamAssassin 3 [raw: 2], DK_None, DKIM_None
X-SmarterMail-TotalSpamWeight: 5

As you can see above, the Content-Type declaration is not contained within the second header, resulting in the message being interpreted as plain text.

I have tried various things but am now completely stuck. Any help or thoughts are much appreciated.

Thanks!

share|improve this question

1 Answer 1

First important note: This is not a Postfix problem. Unless you explicitly configure Postfix to remove the header it should be kept in the header. Your problem may arise in one of these situations:

  1. Your software that generates the mail (not Postfix which forwards the mail) does not create the header field. So other mail servers try to add missing fields. Others don't.
  2. The mail server or the spam filter of the recipient deletes the header field before delivering.

So first check if you get mails from you with the correct header field. If yes then it should be all OK and a problem of the receiver. But it really looks like a problem of your Email.php as it has some more problems:

  • invalid Message-ID:
  • missing Date:
  • missing Content-Type:
  • missing Content-Transfer-Encoding:
  • missing MIME-Version:

So this may also cause the high spam rating of 5.

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.