Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'm running sendmail and I've appeared on the CBL. I've already fixed a couple issues, but I can't figure out how to get rid of these last two localhost mentions. I commented out the localhost line in my /etc/hosts file and I made sure that there's a line in my that reads:

I'm going to keep looking for other things to do, but I'd really like my messages to not be flagged as spam because I'm a sendmail newbie. Thanks in advance!

Here are the message headers from an email I sent to my gmail account:

Received: by with SMTP id s19cs391179aga;
        Fri, 26 Feb 2010 17:18:08 -0800 (PST)
Received: by with SMTP id t20mr692104wff.88.1267233488585;
        Fri, 26 Feb 2010 17:18:08 -0800 (PST)
Return-Path: <>
Received: from ([999.999.999.999])
    by with ESMTP id 36si1793616pxi.21.2010.;
    Fri, 26 Feb 2010 17:18:08 -0800 (PST)
Received-SPF: pass ( domain of designates 999.999.999.999 as permitted sender) client-ip=999.999.999.999;
Authentication-Results:; spf=pass ( domain of designates 999.999.999.999 as permitted sender)

**This one***

Received: from (ip6-localhost [])


    by (8.14.2/8.14.2/Debian-2build1) with ESMTP id o1R1ICwB015625
for <>; Fri, 26 Feb 2010 17:18:12 -0800

**And this one:**

Received: (from me@localhost)


    by (8.14.2/8.14.2/Submit) id o1R1IC5W015624
for; Fri, 26 Feb 2010 17:18:12 -0800
Date: Fri, 26 Feb 2010 17:18:12 -0800
From: me <>
Message-Id: <>
Subject: test again


I just tried commenting out a few lines in /etc/hosts having to do with ipv6 and I got this:

Received: from (localhost [] (may be forged))
share|improve this question

These look related to how you are connecting to sendmail (as in, opening a TCP/IP connection to it from the local machine). Do they look any different when you send mail through that sendmail instance from a different machine? If so, then your solution is to connect to the local machine differently when sending mail from itself.


share|improve this answer
up vote 0 down vote accepted

I decided to uninstall sendmail and install postfix.

For some reason, uninstalling sendmail does not stop the MTA, so run

ps aux | grep mail

and kill the process manually. Postfix works great right out of the box.


Also, to prevent local delivery (unless you actually deliver email from the server using pop etc), in just get rid of the domain name reference. Works like a charm.

Another benefit of Postfix: mailq command shows bounces and replies from server if they deny the message. I could never figure this out with sendmail, but with postfix the mailq is very useful.

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.