🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.mail.sendmail
Article #3073

Ruleset 4

#3073
From: Mark Sirota
Date: Fri, 06 Jan 1989 21:43
51 lines
2831 bytes
This was posted April 1, 1988:
In message <Apr.1.18.00.05.1988.14969@athos.rutgers.edu> hedrick@athos.rutgers.edu (Charles Hedrick) writes:
> To see how sendmail is going to deliver mail to a given address, a
> reasonable thing to type is
> 	sendmail -bt
> 	0,4 address
> ...
> Finally, here is the exact sequence in which these rules are used.
> For example, the first line means that the destination specified in
> the envelope is processed first by rule 3, then rule 0, then rule 4.
> 
> envelope recipient:    3,0,4  [actually rule 4 is applied only to the
> 				user name portion of what rule 0 returns]
> envelope sender:       3,1,4
> header recipient:      3,2,xx,4  [xx is the rule number specified in R=]
> header sender:         3,1,xx,4  [xx is the rule number specified in S=]
>
> I have the impression that the sender from the envelope (the
> return-path) may actually get processed twice, once by 3,1,4 and the
> second time by 3,1,xx,4.  However I'm not sure about that.

Would anyone care to comment on any of that?

If I try this in ruleset 4:

# Insure entire address is in UUCP (!) format
R$+%$+.UUCP$*           $1@$2.UUCP$3            Change all %'s to @'s
R$+@$+.UUCP$*           $2!$1$3                 Change to UUCP format

This should work fine for sender and recipient addresses, but not for
envelope addresses.  Using /usr/lib/sendmail -bt, I get the following:
> 0,4 c%b.uucp@a.uucp
[From ruleset 0 down:]
rewrite: ruleset  0   input: "c" "%" "b" "." "uucp" "<" "@" "a" "." "uucp" ">"
rewrite: ruleset  0 returns: "^V" "uucp" "^W" "a" "^X" "c" "%" "b" "." "uucp"
rewrite: ruleset  4   input: "^V" "uucp" "^W" "a" "^X" "c" "%" "b" "." "uucp"
rewrite: ruleset  4 returns: "b" "!" "^V" "uucp" "^W" "a" "^X" "c"

I am finding that ruleset 4 is putting the "b!" before the entire
specification, not just at the beginning of the user portion.  ($1 includes
*everything* before the @, not just what's in the "user" portion.)

Looking through lots of other sendmail.cf's, which do similar things
to what I've described above, I'm beginning to doubt that ruleset 4 is
indeed called after ruleset 0.  What is the truth on this matter?
(Perhaps Mr. Hedrick was April Fools'-ing?)
-- 
Mark Sirota - University of Rochester, Rochester, NY
 Internet: msir@cc.rochester.edu
 Bitnet:   msir_ss@uordbv.bitnet
 UUCP:     ...!rochester!ur-cc!msir
Technical Details
Message-ID: <619@ur-cc.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!cornell!rochester!uhura.cc.rochester.edu!msir

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!cornell!rochester!uhura.cc.rochester.edu!msir
From: msir@uhura.cc.rochester.edu (Mark Sirota)
Newsgroups: comp.mail.sendmail
Subject: Ruleset 4
Summary: Is it called after ruleset 0?
Message-ID: <619@ur-cc.UUCP>
Date: 6 Jan 89 21:43:49 GMT
Reply-To: msir@cc.rochester.edu (Mark Sirota)
Organization: Univ. of Rochester, Computing Center
Lines: 51