On Thu, Dec 07, 2000 at 09:13:06AM +1100, Rodos wrote:
> Ruleset 0 does the setting of the delivery agent, my sendmail.cf has this
> in it within ruleset 0.
[snip]
> # pass names that still have a host to a smarthost (if defined)
> R$* < @ $* > $* $: $>95 < $S > $1 < @ $2 > $3 glue on smarthost name
Corection. This is actually inside Parse1. Ruleset 0 calls Parse0,
then ruleset 98, then Parse1. Ruleset 98 is the place to put all your
local hacks. This can be done with `LOCAL_RULE_0' and `LOCAL_RULESETS'
in the .mc file.
Anyway, it doesn' help. Ruleset 0 works on the *recipient's* address.
If I understand correctly, you want to change the delivery based on the
sender's address.
Ruleset flow is like this:
+---+
-->| 0 |-->resolved address, recipient(s) only
/ +---+
/ +---+ +---+
/ ---->| 1 |-->| S |--
+---+ / +---+ / +---+ +---+ \ +---+
addr-->| 3 |-->| D |-- --->| 4 |-->msg
+---+ +---+ \ +---+ +---+ / +---+
--->| 2 |-->| R |--
+---+ +---+
D -- sender domain addition
S -- mailer-specific sender rewriting
R -- mailer-specific recipient rewriting
All addresses are passed through ruleset 3. The recipient's
address(es) are then passed through ruleset 0 to determine the mailers.
This is where you need to change the relay host. Unfortunately, if you
want to do this based on the sender's address, I think you're out of
luck.
A simpler alternative is to modify the recipient's addresses when you
want to relay via a different host. To send to `user@domain' via
`relay', try `user%domain@relay'. I've tested it here and it seems to
work OK, but only if `relay' will relay mail from your IP address. Be
careful you don't create an open relay for spammers to exploit.
Cheers,
John
--
whois [EMAIL PROTECTED]
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug