dce@smsc.sony.com (David Elliott) (11/28/89)
Here's an interesting problem:
We have a number of machines offsite that we talk to via uucp. We can
send mail to the people on these machines by simply using login names
because they are all listed in our aliases file.
They, on the other hand, don't have our aliases file, so they must
be explicit when they send us mail. They don't feel this is
acceptable.
The result is that we'll have to set up some system for sending out
new aliases files every day or so to keep these sites up to date,
and we'll have to change from the relatively simple
user: user@workstation
entries in our aliases file to using
user: user@workstation.smsc.sony.com
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?
--
David Elliott
dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
(408)944-4073
"It's bigger than a breadbox, and smaller than the planet Jupiter."ecf_hap@jhunix.HCF.JHU.EDU (Andrew Poling) (11/30/89)
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