When my mailserver sends mail here are the headers:

Received: from example.com (localhost [])
    by example.com (Postfix) with ESMTP id EB14D48159
    for <oli@myemaildomain.com>; Thu, 26 Dec 2013 11:56:12 +0000 (GMT)

This usually really isn't an issue apart from one customer's Postini filter is being particularly violent and seems to class this as an illegal address. I could fight them but it seems like it would be easier to just send email from the legal IP, right..?

So I've been through practically every Postfix setting. I have already set the following variables to example.com: masquerade_domains, smtp_helo_name, myhostname, myorigin, and I've set smtp_bind_address to our external IP. I don't know what else I can change that might have an effect.

How can I change the address/IP to our external address/IP?

I'm using Ubuntu 12.04, Postfix 2.9.6. I have seen and tried (as noted above) answers like those on How to make Postfix use another IP address? and I don't have any bind addresses in my master.cf file (I think that was the old way of doing things?)

  • 1
    What is sending the mail? – Michael Hampton Dec 26 '13 at 16:33
  • @MichaelHampton It's a Django website but I'd like it to be system wide. – Oli Dec 26 '13 at 22:35

Michael Hampton got me wondering if the client had something to do with this. Django by default uses localhost as the email host.

I added this to my settings.py

EMAIL_HOST = "example.com"

And BOOM. Right domain, right IP. Emails aren't blocked.


sending email with sendmail - django

Have you considered sending email using sendmail program/ (look alike) provided by postfix?

StackOverflow question below provides link to django snipet:

It starts one process per one message.

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.