OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: How to change outgoing hostname and IP based on sender's domain?

From: Adam Jacob Muller (lists-postfixadam.gs)
Date: Mon Dec 11 2006 - 04:37:05 CST


You don't need to be sending mail from the same IP that you are
receiving http/https connections on.

If you have userdomain.com, a remote mail server in considering the
legitimacy of your connection is not going to say:
domain.com resolves to 1.2.3.4 and they are connecting to me from
1.2.3.5, so they must be a spammer!

They may look at:
domain.com's mx is mail.otherdomain.com, which resolves to 1.2.3.5,
and they are connecting to me from 1.2.3.5, this is good!

What may be tripping you up:
if you have inet_interfaces=all and you are simply sending mail to
the domain name (either with omitted MX or MX back to the root of the
domain or mx to an A record that points to a different IP on the same
machine) then mail is probably being delivered TO multiple different
IP addresses on that same machine, it's a far better thing to do to
correct THAT, and have all mail delivered to one, properly PTR'd host
on a single machine than to attempt to get mail from that domain,
delivered OUT via a particular IP, with a particular [HE]{2}LO.

-Adam

On Dec 10, 2006, at 8:02 PM, Postfix User wrote:

> Thanks everybody for the helpful advice. It's clear now that it's
> okay and even proper (because of the bi-directional DNS issue Rene
> brought up) to just have a single hostname as the "relay identity"
> for all my domains.
>
>
>> As Tonni Earnshaw said:
>>> There's no point in listening to multiple IPs (waste of IP
>>> numbers) if the DNS for your domains is set up correctly. The MX
>>> entries should merely list your domain's MTA as destination for
>>> the other domains you administer.
>> If you really want to go the route of giving customers their own
>> unique
>> identity right down to the IP address then you really need to be
>> running
>> completely separate hosts for each customer (even if they're just
>> set up
>> as virtual machines running within something like Xen or whatever).
>
> Some of my domains are on separate IPs because of the HTTPS
> requirement otherwise like you guys said it wouldn't be necessary
> just for email purposes.
>
>
> Michael Wang