Sendmail.cf wizard question - virtual-hosting
I have a question for any sendmail.cf wizards out there - a hack to a recent cf ruleset (mine is from 8.9.0) to circumvent what i consider a bug, or at least a misfeature, that interferes with using sendmail for "virtual hosting".
The problem was that no matter what i did (building the cf with masquerading, virtual user, whatever it was), the "to:" header of messages posted to a maillist was always transformed to the primary address of the host where the maillist was situated, even when the original message was addressed to one of the "virtual" host addrs. I eventually poked and prodded in the rulesets (shudder), and discovered that commenting out one rule, which is supposed to use the name server to canonicalize an address, prevents that transformation from happening. (It's part of ruleset 96, which was apparently is "the bottom half of ruleset 3" - boy, i *do not like* touching cf ruleset code!)
I've been running this change for a few weeks on my workstation and on python.org, and it doesn't seem to be causing any problems. Even better (:-), it does seem to prevent the unwanted transformation of the original "to:" addresses. However, i don't _really_ know that my change won't disrupt something that isn't exercised on my machines. So i'm hoping that informed sendmail folk out there might be able to do a sanity check on this change. I'm including, below, an artifical diff of the cf file before and after, to show the specific difference, for a sendmail 8.9.0 cf file. Please let me know what you think, if you have some clear knowledge of this stuff!
Ken Manheimer klm@python.org 703 620-8990 x268 (orporation for National Research |nitiatives
# If you appreciate Python, consider joining the PSA! #
# <http://www.python.org/psa/>. #
*** sendmail.cf 1998/08/03 21:27:06 1.6 --- sendmail.cf 1998/08/03 21:27:17
*** 516,522 **** R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3
# pass to name server to make hostname canonical ! R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4
# local host aliases and pseudo-domains are always canonical R$* < @ $=w > $* $: $1 < @ $2 . > $3 --- 516,524 ---- R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3
# pass to name server to make hostname canonical ! # klm - looks like this converts to primary canonical, which transforms ! # e.g. a virtual-hosted "to:" address when we don't want it to be... ! #R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4
# local host aliases and pseudo-domains are always canonical R$* < @ $=w > $* $: $1 < @ $2 . > $3
On Mon, 3 Aug 1998, Ken Manheimer wrote:
I have a question for any sendmail.cf wizards out there - a hack to a recent cf ruleset (mine is from 8.9.0) to circumvent what i consider a bug, or at least a misfeature, that interferes with using sendmail for "virtual hosting".
The problem was that no matter what i did (building the cf with masquerading, virtual user, whatever it was), the "to:" header of messages posted to a maillist was always transformed to the primary address of the host where the maillist was situated, even when the original message was addressed to one of the "virtual" host addrs. I eventually poked and prodded in the rulesets (shudder), and discovered that commenting out one rule, which is supposed to use the name server to canonicalize an address, prevents that transformation from happening. (It's part of ruleset 96, which was apparently is "the bottom half of ruleset 3" - boy, i *do not like* touching cf ruleset code!)
Hmmmm... I have a Debian linux system with Sendmail 8.8.5 on it,
and I actually have this working. I didn't have to change the sendmail.cf by hand, tho. My cf is generated by the sendmailconfig tool that comes with debian (tho' I do grok sendmail.cf's reasonabally well), which uses M4.
The keys to getting this to work are:
1) use the limited_masquerade feature (see sendmail.org website)
2) the vhost name must be in class w (i.e. in the sendmail.cw
file, usually)
3) The major key is your DNS setup. the vhost has to have an
Address record, or just an MX. It can't be a CNAME (I think
this is spec'ed in the RFC's somewhere. )
-The Dragon De Monsyne
participants (2)
-
Ken Manheimer
-
The Dragon De Monsyne