8

I run postfix my servers to allow websites to send email. I'm using it as a drop-in for sendmail proper.

When an email is sent the HELO string seems to contain localhost. This wouldn't be a problem except that one of my clients has just said that an email was returned to them from a spam blocker saying that localhost cannot feature inside the HELO string. Awesome.

So I edited /etc/mailname to be my main domain name. And I edited /etc/postfix/main.cf so that:

smtpd_banner = ESMTP $mail_name

Yet this is what I see in the header of a sent email (after restarting postfix):

Delivered-To: oli@example.com
Received: by 22.194.173.22 with SMTP id bi10csp117521wjc;
        Tue, 2 Apr 2013 07:24:18 -0700 (PDT)
X-Received: by 10.68.22.168 with SMTP id pt8mr24540246pbb.10.1364912657736;
        Tue, 02 Apr 2013 07:24:17 -0700 (PDT)
Return-Path: <oli@example.com>
Received: from localhost (example.com. [22.22.22.22])
        by mx.google.com with ESMTP id l6si2328296pao.283.2013.04.02.07.24.16;
        Tue, 02 Apr 2013 07:24:17 -0700 (PDT)

I've subbed my domain with example.com.

What do I need to edit to quash the evil reign of localhost?!

10

Hurrrrrr.

I've just noticed that in /etc/postfix/main.cf there was a line that read:

myhostname = localhost

I've changed that to :

myhostname = example.com

And restarted. All is fixed.

  • 2
    I am trying this on Fedora 16.04 and even after a restart this does not work. I have set both hostname and myorigin to a real domain and the "evil regin" of localhost continues. Any ideas? – Startec Aug 17 '16 at 6:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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