On 20/04/12 13:36, Sam Varshavchik wrote:
> Yes, well, it's really more than just that. I now understand
> what's going on here, and there's a bit more stuff here in play.
> You can listen on multiple IPs just fine. What also needs to be
> done is also to save which IP address each message was received
> from, and then use that IP address in case that message ever
> goes out via SMTP again, in addition to using an IP
> address-specific configuration.
Perhaps if SOURCE_ADDRESS is a single IP then it behaves as it does
now and sends all outgoing traffic via the interface associated
with that IP. If...
AND the incoming connection is authenticated then Courier looks
for one single extra bit of information in the message stored in
the mailq for the IP associated with the incoming SMTP connection.
It would take one extra field in the data files in /var/lib/courier/
and it may as well be reflected in the Received header if it doesn't
break any RFCs, something like...
Received: from mypc (adsl.pigpond.com [::ffff:xx.xx.xx.xx])
(AUTH: LOGIN jo@blo...., SSL: TLSv1/SSLv3,128bits,AES128-SHA)
by vdomain1.com ([::ffff:188.8.131.52]) with esmtp; Tue, 17 Apr 2012 16:40:15 +1000
Courier has to work out the default interface versus whatever
SOURCE_ADDRESS is set to so around that part of the code it could
"just" do a bit of extra fiddling to make a call on sending the
queued massage out the same IP it came in on. vdomain1.com is also
in the queued data file so use that in the SMTP exchange as well.