Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!aplcen!jhunix!ecf_hap From: ecf_hap@jhunix.HCF.JHU.EDU (Andrew Poling) Newsgroups: comp.mail.sendmail Subject: Re: Unknown user forwarding? Summary: not hard at all Message-ID: <3447@jhunix.HCF.JHU.EDU> Date: 30 Nov 89 04:35:37 GMT References: <1989Nov28.062023.19391@smsc.sony.com> Reply-To: ecf_hap@jhunix.UUCP (Andrew Poling) Followup-To: comp.mail.sendmail Organization: The Johns Hopkins University - HCF Lines: 48 In article <1989Nov28.062023.19391@smsc.sony.com> dce@smsc.sony.com (David Elliott) writes: [...] >What would be great is if we could have sendmail on these machines >notice that the user being sent to is not a local user or local >alias and rewrite the address as "user@smsc.sony.com". > >Does anyone know of a good way to do this with sendmail, or is my >best bet to put a wrapper around /bin/mail that would do this >for me? I do exactly this on my machine for historical (hysterical) reasons. It's not hard at all. IMHO, it's easier to have sendmail do these sorts of jobs than re-invent the wheel... At the top of your .cf file, do something like: # # /etc/local_logins is simply a list of logins cut(1) from /etc/passwd # FU/etc/local_logins Then in Ruleset 0, where you handle local mail, do something like: # # If a simple username and not in /etc/local_logins, send to other_host # R$~U $#ether $@other_host $:$1@other_host non-local users # # Else-wise, it must be a local user # R$- $#local $:$1 local users Hope this helps and if you have further questions, feel free to mail me. -Andy Andy Poling Internet: andy@gollum.hcf.jhu.edu Network Services Group Bitnet: ANDY@JHUVMS Homewood Academic Computing Voice: (301)338-8096 Johns Hopkins University UUCP: mimsy!aplcen!jhunix!gollum!andy