>>But, if we're delivering outbound email through the IMGate server, we
>>assume IMail never looks at the host file. It just delivers straignt to
>>the smart host.
> I'm actually interested to hear what others have to say about this.
> I would have to have a separate instance of postfix running on a different
port
> (such as 26) and have my Imail box forward all outbound mail to port 26.
> I'm not all that versed in postfix, so I just found it easier to go ahead
and let Imail do the delivery.
> I think this would do what you want it to do,
> but you may want to wait and hear from some other more experienced
answers.
I run a completely independent instance of postfix for my imail/outbound
delivery,
Here's how I do it
mkdir /etc/postfix/out
FILES="main.cf master.cf post-install postfix-files postfix-script"
for required in $FILES
do
cp -p /etc/postfix/$required /etc/postfix/out/$required
done
Edit the smtp line in /etc/postfix/out/master.cf and specify your port
:26 inet n - n - - smtpd
Edit /etc/postfix/out/main.cf and give it a diff transport_maps entry &
queue dir
transport_maps = hash:/etc/postfix/out/transport.map
queue_directory = /var/spool/postfix-out
syslog_name = postfix-out
smtpd_banner = $myhostname - ESMTP - $mail_name - (out)
just run postmap on the new transport.map, create /var/spool/postfix-out
And use "-c /etc/postfix/out" as a parameter to any postfix command
whenever you want to control the new instance:
postfix -c /etc/postfix/out start # start the second instance
postfix -c /etc/postfix/out stop # stop the second instance
postfix -c /etc/postfix/out reload # reload the second instance
Telnet localhost 26 .. Should give you the banner from the second instance
(with the "(out)" at the end )
I do not think you can change the outgoing port in Imail however, I
recompiled my kernel (freebsd) with
options IPFIREWALL
options IPFIREWALL_FORWARD
And use ipfw to just redirect the packets from the Imail box
# block direct communications with port 26,
# send all imail traffic to it automatically
ipfw add deny tcp from any to me 26
ipfw add fwd localhost,26 tcp from my.imail.server to me 25