Article View: comp.mail.sendmail
Article #3271Re: rulesets after resolved in ruleset 0
From: Larry Parmelee
Date: Thu, 16 Mar 1989 19:09
Date: Thu, 16 Mar 1989 19:09
61 lines
3030 bytes
3030 bytes
Ruleset processing for Sendmail 5.61 (I actually traced this out
for sendmail 5.59, but I've looked at 5.61 close enough to be 99.9%
certain it hasn't changed). Enjoy. (If you saw my first posting of
this, this is an update with a couple corrections/clarifications.)
-Larry Parmelee
parmelee@cs.cornell.edu
EF -> 3,0,2,r,4 -> (Save "@domains" for ruleset "D".)
EF -> 3,1,4 -> ($f) -> 3,D,1,S,4 -> ($g) -> New EF
ET -> 3,0,2,R,4 -> A/F -> SMTP delivery ? Yes: -> 3,D,2,R,4 -> New ET
^ v No: -> New ET
+--- <------ <-----+
MF -> 3,D,1,S,4 -> New MF
MT -> 3,D,2,R,4 -> New MT
A/F == Aliasing and .forward file processing for Local addresses
($?) == Definition of $? macro.
EF == Envelope "From:" address
ET == Envelope "To:" address
MF == Message From-type addresses
MT == Message To-type addresse
R == Mailer (determined per ET) "Recipient" ruleset
r == Mailer (determined from EF) "Recipient" ruleset
S == Mailer (determined per ET) "Sender" ruleset
D == Application of "@Domains" saved from the EF, if EF mailer flag 'C'
is given and the address doesn't already have @domains applied.
Message headers associated with From-type addresses:
Errors-To: Resent-From: Return-Receipt-To:
From: Resent-Reply-To: Sender:
Reply-To: Resent-Sender:
Message headers associated with To-type addresses:
To: Cc: Bcc:
Resent-To: Resent-Cc: Resent-Bcc:
Approximate High-level sendmail ruleset processing algorithm:
The actual process is a bit more complicated; Showing that here
would only confuse things...
1.) Process EF for "@domains" and upto ($f).
2.) Process all ETs upto the A/F point (including additional ETs
resulting from the A/F processing of the local addresses)
producing a list of ET address 3-tuples; (mailer, host, user).
3.) Foreach ET address 3-tuple:
a.) Define $h and $u macros: host -> ($h), user ->($u)
b.) Finish EF processing from $f yielding New EF for this ET.
c.) Finish ET processing for this tuple yielding New ET.
d.) Connect to mailer.
e.) Do MF/MT processing as the message is written to the mailer.
Notes:
1.) After ruleset 0 processing, only the "user" part is passed on
to the other rulesets for further re-writing.
2.) It is often useful to think of a "mailer" as the network or transport
mechanism being chosen for the next hop the message will take.
-LCParmelee <parmelee@cs.cornell.edu> 16-Mar-89 sendmail:5.61
Technical Details
Message-ID:
<26161@cornell.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!parmeleeReferences:
<44@crdgw1.crd.ge.com> <8119@csli.STANFORD.EDU> <2615@decuac.DEC.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!parmelee From: parmelee@wayback.cs.cornell.edu (Larry Parmelee) Newsgroups: comp.mail.sendmail Subject: Re: rulesets after resolved in ruleset 0 Message-ID: <26161@cornell.UUCP> Date: 16 Mar 89 19:09:33 GMT References: <44@crdgw1.crd.ge.com> <8119@csli.STANFORD.EDU> <2615@decuac.DEC.COM> Sender: nobody@cornell.UUCP Reply-To: parmelee@wayback.cs.cornell.edu (Larry Parmelee) Organization: Cornell Univ. CS Dept, Ithaca NY Lines: 61