rh26@prism.gatech.EDU (Robert L. Howard) (02/22/90)
This is probably a simple minded sendmail question, but here goes... How does sendmail (on machine A) determine if a particular user exists on that machine (when receiving mail for delivery)? There are two considerations here: 1. Will it just (blindly) write the message to /var/spool/mail without consulting anything? Or, what does it consult? 2. How (assuming it accepts the message) does it determine the location of the home directory for that user in order to consult the .forward file? Here is the scenario. SunOS 4.x running YP, so that there are no local passwd or aliases files. We want all mail to go to mailhost and then mount /var/spool/mail on the clients. The problem I imagine here is that home directories not on mailhost won't be searched for .forward. (We do run the automounter.) Is any of this possible? (or is this a stupid question?) Thanks for your attention, Robert (reply via mail is adequate) ---- -- Robert L. Howard (GTRI/STL/MSD) (404) 528-7165 Georgia Institute of Technology, Atlanta Georgia, 30332 uucp: ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!rh26 Internet: rh26@prism.gatech.edu
parmelee@wayback.cs.cornell.edu (Larry Parmelee) (02/22/90)
In article <6241@hydra.gatech.EDU> rh26@prism.gatech.EDU (Robert L. Howard) writes: > This is probably a simple minded sendmail question, but here goes... <Query about mail setup on Suns - All suns forwarding mail <to a central "mailhost", which exports its ...spool/mail/ < to the rest of the suns. What we do is to put dummy aliases in YP for all valid mail targets (i.e. login ids, aliases, and mailing lists) of the form: target: target@mailhost Since the order of searching for a "local" id is: 1) Check YP aliases 2) Check Local aliases 3) Check for .forward 4) deliver to /whatever/spool/mail/user the presense of the dummy alias in YP will cause all "local" mail on the mail clients to be sent to the mailhost. The sendmail on the mailhost must be configured to recognize its own name and also all the names of it's mail-clients as "local names". The mailhost also has a real aliases file (lives in /etc/aliases) that contains the real aliases, mail lists, what-have-you; not just the dummy aliases in the YP map. > How does sendmail (on machine A) determine if a particular user exists On a mail client, it doesn't matter. Since all valid mail targets are given a dummy alias in YP map, it'll be passed to the mailhost. On the mailhost, I'd presume it checks the YP passwd map, assuming it doesn't find something else in the local alias file. It would also get the home directory from there. > The problem I imagine here is that > home directories not on mailhost won't be searched for .forward. (We > do run the automounter.) We don't run the automounter, so I'm not sure what that impact would be. ".forward" files are a problem area - I do not know exactly how sun sendmail handles things, but this is certainly a tricky area. 1) Sendmail typically runs as "root", and "root" gets "nobody" priviledges on NFS mounted file systems, so an in-appropriate protection mode on either a user's home directory or .forward file could prevent root/sendmail from seeing the ".forward" file. 2) An NFS mounted file system may be temporarily un-available at the instant sendmail chooses to look for a .forward file; hence it may think that there is none. Both these problems will result in mail being delivered locally to spool/mail, when prehaps it should have been forwarded elsewhere. I don't know how or if Sun sendmail addresses these problems. I think that by appropriate careful coding, sendmail could work around both these problems. -Larry Parmelee parmelee@cs.cornell.edu