Ok, It might need to deliver to the local machine, but the MX will be one of the other three ip's, this specific ip will solely be used as relay host for our web platform. I'll give this a try tomorrow. Thanks.
Marc van Duivenvoorde Kingsquare information services. On Mon, Sep 24, 2012 at 6:41 PM, Wietse Venema <wie...@porcupine.org> wrote: > Kingsquare.nl - Marc van Duivenvoorde: >> Hi, I've got a question. Let's say I have a machine with 4 ipnumbers, >> all of which are being used to send e-mail. Is it possible to enforce >> that whenever someone connects to smtp on one of these numbers, that >> the smtpd will use the same ip? >> >> I have a shared machine, only for one mail account I use a dedicated >> ip as it's the relayhost for my web platform. The web platform has >> local postfix instances which use relayhost and sasl authentication to >> connect to my box and send off all possible e-mail. The only thing is, >> all mail being relayed from this box has another outgoing hostname and >> ip number than the dedicated incoming one. > > This works if you don't need to deliver mail on that machine. > > /etc/postfix/master.cf: > 1.2.3.4:smtp inet n - n - - smtpd > -o content_filter=smtp_1.2.3.4: > > smtp_1.2.3.4 unix - - n - - smtp > -o smtp_bind_address=1.2.3.4 > > http://www.postfix.org/FILTER_README.html#domain_dependent > http://www.postfix.org/postconf.5.html#smtp_bind_address > http://www.postfix.org/master.5.html > > Or use multiple Postfix instances, where each instance has: > > /etc/postfix/main.cf: > myhostname=hostname.example.com > inet_interfaces=$myhostname > > References: > http://www.postfix.org/INSTALL.html#send_receive > http://www.postfix.org/MULTI_INSTANCE_README.html > > Wietse