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 <[email protected]>; 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?)
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
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:
https://stackoverflow.com/questions/10450748/sending-email-with-sendmail-django
https://djangosnippets.org/snippets/1864/
It starts one process per one message.