Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a customer that is complaining about emails marked as spam.

I'm looking at the header. It shows the correct From:

However, it doesn't like the return-path.

Return-Path: <>
Received-SPF: neutral ( x.x.x.x is neither permitted nor denied by domain of client-ip=x.x.x.x;
Authentication-Results:; spf=neutral ( x.x.x.x is neither permitted nor denied by domain of

How do I configure sendmail to use the From address for the Return-Path?

share|improve this question

From the bat book (page 1165):

The Return-Path: header is intended to show the envelope address of the real sender as opposed to the sender used for replying (the From: and Reply-To: headers). In posting Usenet news, for example, the Return-Path: shows “news” and the From: shows the address of the posting user. But in general, Return-Path: should never be used for replying to mail. It is intended to be used solely for notification of delivery errors.

Your client is not having problems with the Return-Path: header. Neither with SPF since the result is neutral as the headers tell us. You client must accept the fact that the intended recipients consider what he sends as spam.

If this is indeed a false positive consider setting up proper SPF and DKIM records for the domain and see if the situation improves.

share|improve this answer

It looks like you email is from an automated sender which is sending using one of Google's server. It may be connecting to GMail to send the message. Your server appears to have an SPF record, which neither includes the Google SPF list nor indicates that it should be enforced. Including a Sender header for may help.

There are a number of factors that will make you email look like Spam before you even start sending it.

  • Do you have a static address with a PTR record returning your hostname, or name on another A record for the address? (Does reverse DNS validation work?)
  • Does your mail server announce itself using the same name the PTR record returns?
  • Does you mail server have a SPF record permitting itself to send email?
  • Is your address listed in

Failing the first two tests are strongly indicative of Spam, or an automated mail source. Person to person e-mail almost always pass these tests, while Spam often fails. The next two tests are indicative of non-Spam.

Once you have started sending the email there are other tests that apply.

  • Both the return path address (envelope address) and From address should have an MX record pointing to a working mail server.
  • The return path address should match the From or Sender address header.
  • Both domains (if different) should have a working postmaster address.
  • Both domains (if different) should have SPF records permitting mail from the sending server.
  • Previous history of both email addresses and their domains may be considered (autowhitelisting / autoblacklisting).
  • Does the message have a valid DKIM signature.
  • Any other rules that the email administrator deems appropriate.

I find I get a relatively high failure rate on DKIM signed documents from automated senders. This is mainly related to the public keys not being available from DNS.

share|improve this answer

Your Answer


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.