-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Zenon Panoussis wrote:
> Is there any way to tell one instance of esmtpd to have multiple
> personalities on different IP addresses? E.g. to bind to 1.2.3.4
> and report itself as mail.domain.com and to also bind to 11.22.33.44
> and there report itself as mail.otherdomain.com?
>
> It would be very useful for serving customers who require their own
> identity in public, but don't mind sharing resources and costs behind
> the scenes.
If you don't mind patching courier and recompiling, it ought to be
pretty simple.
Add '-accesslocal' to the "TCPDOPTS=" line in your 'esmtpd' config file.
Then in your smtpaccess file add:
1.2.3.4<TAB>ME=mail.domain.com
11.22.33.44<TAB>ME=mail.otherdomain.com
and run makesmtpaccess.
Then in the courier sources edit the "courier/libs/cme.c" file (which is
just one function - config_me), and somewhere near the top (before it
reads the 'me' file) add something like:
const char *m=getenv("ME");
if (m && *m) return (m);
Recompile and reinstall or just replace the courieresmtpd file. (You'll
have to run 'esmtpd stop; esmtpd-ssl stop; cp ...; esmtpd start;
esmtpd-ssl start' if you just want to replace the file.)
- -accesslocal makes courier look up the local side of the interface in
the smtpaccess file and will create the environmental variable ME with
the contents we specified. Then when courier goes to look up the name
of your server for the HELO response, it will pick up the contents of
that variable instead of the 'me' config file. But any time that
variable is not set, then it will respond with the contents of the 'me'
file like normal.
Now if you want that same ip address and hostname to be used on the
OUTGOING connections and messages forwarded by sendmail, etc., then
that's a good bit more complicated; but I imagine it's doable as well.
HTH
Jeff Jansen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGlkuWGfIHDMaiC9cRAjAfAJ9MAQA6Hu4m2Ijf+TomNYZxkAkw4ACfZWQD
hloxfIoLR3WZS+FzQk2cyLU=
=FuLg
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users