IP aliasing and Postfix

Joe Auty joe at netmusician.org
Tue Oct 26 17:52:31 UTC 2010


Hello,

I have a few IP aliases setup:

em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:0c:29:79:d5:66
        inet <address1> netmask 0xffffff80 broadcast <broadcast address>
        inet <address2> netmask 0xffffff80 broadcast <broadcast address>
        inet <address3> netmask 0xffffff80 broadcast <broadcast address>
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active


How do I make address3 the ifconfig default over its aliases?


The problem is, as far as mail sending goes the IP address that should
be used is address3, when what is presented to my relayhost is address1.
My rc.conf:

ifconfig_em0="inet address3  netmask 255.255.255.128"
ifconfig_em0_alias0="inet address1  netmask 255.255.255.128"
ifconfig_em0_alias1="inet address2  netmask 255.255.255.128"


How do I get Postfix to use address3 in sending out mail? If I set
Postfix's myhostname to a FQDN that resolves as address3,
inet_interfaces will not work when set to:

inet_interfaces = $myhostname

it needs to be set to:

inet_interfaces = $myhostname, localhost


I see nothing in Postfix that would explain why Postfix is gleaming onto
address1, which makes me think that perhaps this is a BSD ifconfig thing
and it is gleaming onto the first address it finds associated with my
em0 interface, which if the ifconfig and its IP order means anything, is
address1? Does this make sense?

Anyway to set the default here?





-- 
Joe Auty, NetMusician
NetMusician helps musicians, bands and artists create beautiful,
professional, custom designed, career-essential websites that are easy
to maintain and to integrate with popular social networks.
www.netmusician.org <http://www.netmusician.org>
joe at netmusician.org <mailto:joe at netmusician.org>



More information about the freebsd-questions mailing list