Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!mp.cs.niu.edu!rickert From: rickert@mp.cs.niu.edu (Neil Rickert) Newsgroups: comp.mail.sendmail Subject: Re: Envelope-To and Envelope-From in PROG mailer? Message-ID: <1991May24.155540.2967@mp.cs.niu.edu> Date: 24 May 91 15:55:40 GMT References: <1991May23.195333.27759@iwarp.intel.com> <1991May23.212448.8455@mp.cs.niu.edu> <1991May24.143629.17892@iwarp.intel.com> Organization: Northern Illinois University Lines: 41 In article <1991May24.143629.17892@iwarp.intel.com> merlyn@iwarp.intel.com (Randal L. Schwartz) writes: >Right now, I have a PROG mail agent parsing all the headers to get the >"From:" and "Reply-to:" address. However, I hotwired my sendmail.cf >in ruleset 0 so that "user.foo" is delivered to "user", via the following >declarations (in ease): > >field > something: match(1*); >[...] > /* remaining names must be local */ > /* protect filenames from subfunction interpretation */ > if ("/" something) > resolve(mailer(local), user("/" $1)); > /* allow username.subfunction, ala Andrew */ > if (something "." something) > resolve(mailer(local), user($1)); Basically, at this point you are throwing away information ($2), and it is thereafter lost for good. >so I can get mail delivered to "merlyn.server" delivered to me. Now, Unless you need to deal with large numbers of distinct addresses in this format (user.word) your easiest approach is to just deliver the whole thing to the local mailer - that is, the complete merlyn.server should be the user value. This causes an aliases database lookup. You then can create an aliases entry for 'merlyn.server' which resolves to a specific program, and this will distinguish it from mail just to 'merlyn'. If you have a large number of addresses of the form 'user.word', your other choice is to create your own special purpose mailer to deal with it. If your system grok's shell scripts with '#!', this can be a script. You get to design the argument list yourself. Or check out Chip Salzenberg's 'deliver' package as a very flexible special purpose mailer. It should be available at archive sites. -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science Northern Illinois Univ. DeKalb, IL 60115 +1-815-753-6940