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.

When my mailserver sends mail here are the headers:

Received: from example.com (localhost [127.0.0.1])
    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?)

share|improve this question
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

2 Answers 2

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.

share|improve this answer

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:
http://stackoverflow.com/questions/10450748/sending-email-with-sendmail-django
https://djangosnippets.org/snippets/1864/

It starts one process per one message.

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.