Hi Wietse, I tried your solution with the content-filter option and I have the following in master.cf:
127.0.0.1:25 inet n - n - - smtpd -o content_filter=smtp:[wp180.webpack.hosteurope.de:25] -o local_recipient_maps= -o relay_recipient_maps= -o relay_domains= -o transport_maps= -o virtual_alias_maps= -o mynetworks=127.0.0.0/8 -o mynetworks_style=host -o inet_interfaces=127.0.0.1 #-o smtpd_recipient_restrictions=permit_mynetworks #-o parent_domain_matches_subdomains= -o smtp_sasl_auth_enable=yes #-o smtp_sasl_security_options=noplaintext noanonymous -o smtp_sasl_password_maps=hash:/etc/postfix/sasl_gr_smarthost -o relayhost=wp180.webpack.hosteurope.de:25 and in this file (/etc/postfix/sasl_gr_smarthost) you see wp180.webpack.hosteurope.de <user> <password> and now in the log I can now see some thing like this: Sep 25 14:11:17 h1866372 postfix/qmgr[17899]: warning: connect to transport [wp180.webpack.hosteurope.de: No such file or directory Does anybody has any ideas? I double checked it, but can't find the solution... Thanks a lot in advance, Thomas > Thomas Trepper: >> Hi all, >> >> I hope I am right here, I have the following problem and can't find a >> solution so I would like to ask you for this: >> >> I have a server (ubuntu 8.04.3-server) with one network interface and >> two >> IPs on it and on top one postfix (2.5.1 installation. I would like >> postfix >> to relay to different relayshost per interface like this: >> >> interface 10.0.0.1 ----> relay to mx0.abc.com (depending on domains the >> relay is accepting) >> interface 10.0.0.2 ----> relay to mx0.xyz.com (just all) >> >> Does anbody know, if and how this might be possible? > > There are many ways. > > First, there is no need to use multiple server IP addresses. > Normally, people use a standard Postfix gateway configuration and > choose the down-stream MX host based on the recipient address. > http://www.postfix.org/STANDARD_CONFIGURATION_README.html#backup > > If you must insist on using multiple server IP addresses, Postfix > 2.6 provides tools to manage multiple Postfix instances (each having > their own relayhost etc. settings). With 2.5 you'd have to roll > your own support. > http://www.postfix.org/MULTI_INSTANCE_README.html > > Otherwise, you may be able to fake this with one Postfix instance > and the content_filter command (content filters override relayhost). > > /etc/postfix/master.cf: > 10.0.0.1:smtp .. .. .. .. .. .. smtpd -o > content_filter=smtp:[mx0.abc.com] > 10.0.0.2:smtp .. .. .. .. .. .. smtpd -o > content_filter=smtp:[mx0.xyz.com] > > If you are trying to do clever things with Postfix on a multi-homed > firewall with IP forwarding turned off, don't fall into this trap: > http://www.postfix.org/postconf.5.html#inet_interfaces > > Wietse >