home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / mail / sendmail / 1950 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  1.9 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!mips!zaphod.mps.ohio-state.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!mp.cs.niu.edu!rickert
  2. From: rickert@mp.cs.niu.edu (Neil Rickert)
  3. Newsgroups: comp.mail.sendmail
  4. Subject: Re: Why does buildaddr() [parseaddr.c] rewrite using the R= rules?
  5. Message-ID: <1992Jul27.152444.26405@mp.cs.niu.edu>
  6. Date: 27 Jul 92 15:24:44 GMT
  7. References: <1992Jul26.101046.962@csus.edu>
  8. Organization: Northern Illinois University
  9. Lines: 40
  10.  
  11. In article <1992Jul26.101046.962@csus.edu> eps@futon.SFSU.EDU (Eric P. Scott) writes:
  12. >I was under the impression that the recipient rewriting rules
  13. >only applied to headers (To: and Cc:).  However, sendmail also
  14. >runs the "RCPT TO:" address through the same rules!  (This is
  15. >not clear from the documentation.)
  16.  
  17. >Am I Unclear On The Concept or is this a design stupidity?
  18.  
  19.   This is not design stupidity.  There is an assumption in the design
  20. that if a different address format is required, it is required for the
  21. envelope as well as for the header.  Generally this is a reasonable
  22. assumption, although it happens this is not always true, and as Paul
  23. Vixie has pointed out, the IDA versions of sendmail specifically separate
  24. the header rewrite from the envelope rewrite.
  25.  
  26.   However, the envelope recipient should not give you a problem.  Even
  27. without IDA versions, you can treat the envelope and header recipients
  28. differently.  IDA is really needed to do the same for the sender addresses
  29. which are difficult to treat separately in a non-IDA sendmail.
  30.  
  31.   All you need to is make sure that your ruleset 0 puts the recipient
  32. address in a distinguishable form, and then make use of that in your
  33. other rewrite rules.  For example,
  34.  
  35.     Ruleset 0:
  36.  
  37.         R$+<@$+.uucp>    $#uucp $@$2 $: <$1>
  38.  [this makes the address distinguishable by <bracketing it>
  39.  
  40.     Ruleset 2:
  41.  
  42.         R<$+>        $@ <$1>        Leave bracketed address alone
  43.  
  44.     Ruleset R=:
  45.  
  46.         (same as above)
  47.  
  48.     Ruleset 4:
  49.  
  50.         R<$+>        $@ $1        Return fully bracketed address
  51.