Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!uhura.cc.rochester.edu!msir From: msir@uhura.cc.rochester.edu (Mark Sirota) Newsgroups: comp.mail.sendmail Subject: Re: rulesets after resolved in ruleset 0 Message-ID: <1181@ur-cc.UUCP> Date: 23 Mar 89 19:21:21 GMT References: <44@crdgw1.crd.ge.com> <8119@csli.STANFORD.EDU> <2615@decuac.DEC.COM> <49@crdgw1.crd.ge.com> Reply-To: Mark Sirota Organization: Univ. of Rochester, Computing Center Lines: 42 > I know the debug option (sendmail -bt -d21.12) always calls ruleset 3 to > start. Therefore from your note I believe the proper way to test > each address is to use the combinations: > > From (Envelope): 1,4,3,1,S,4 user@local > To (Envelope): 0,4 user@local > From: 1,S,4 user@local > To:, Cc: 2,R,4 user@local > > Assuming I pick the correct rules for R and S, will this > test each of the above cases? Two comments: The "-d21.12" on the command line is just a nicety which provides you with more specific output; the sendmail -bt is the important part. Secondly, calling rulesets after S0 from sendmail -bt won't do quite what you want it to do. The problem is that S0 resolves to something like $# tcp $@ host $: user < @ host > And if you pass that into S4, it won't necessarily behave right. You have to explicitly pass only the $: portion. So the sequence for To: (Envelope) is more like this. (Note that this takes advantage of the IDA feature that -bt does not automatically call S3 first. It's more challenging without this. % /usr/lib/sendmail -bt > 3,0 user@host rewrite: ruleset 3 input: "user" "@" "host" rewrite: ruleset 3 returns: "user" "<" "@" "host" ">" rewrite: ruleset 0 input: "user" "<" "@" "host" ">" rewrite: ruleset 0 returns: $# "tcp" $@ "host" $: "user" "<" "@" "host" ">" > 2,n,4 user<@host> ... You get the idea. -- Mark Sirota - University of Rochester, Rochester, NY Internet: msir@cc.rochester.edu Bitnet: msir_ss@uordbv.bitnet UUCP: ...!rochester!ur-cc!msir