Re: No Home Directory.....

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: William Craven
Cc: exim-users
Asunto: Re: No Home Directory.....
On Thu, 9 Jan 1997, William Craven wrote:

> Some users on our staff mail server do not have their home directories
> on the system but do have their incoming mailboxes stored there. Exim
> appears not to like this and defers the delivery. The appropriate entry
> in the main log is as follows
>
> 1997-01-09 06:34:34 0vhmLn-0003ml-00 == fung@??? T=local_default
>    defer (2): No such file or directory: failed to chdir to
>    /home/cheddar/fung


Exim always chdirs to something before doing a local delivery. One of
the reasons for this is that some systems have problems if you run as
one uid/gid with a current directory that is not accessible to that
uid/gid.

> I appreciate this is maybe a security feature but I need to get round
> this otherwise I will not be able to implement Exim on our main
> mailserver where the home directories are not mounted.


The very next item on the list of new features I am currently working on
says:

"specify explicit home directory in appendfile"

which will enable you to specify in the transport which directory you
want it to chdir to. At the moment you have three choices:

(a) Hack deliver.c so as to chdir to something innocuous (e.g. "/") if 
    the chdir fails; the code is around line 696:


      if (chdir(working_directory) < 0)
        {                                             
        addr->transport_return = DEFER;               
        addr->errno = errno;                          
        addr->message = string_sprintf("failed to chdir to %s", deliver_home);
        }                                  


      else                    


    Hmm. That looks like a buglet in the error message that needs fixing...


(b) Don't use the localuser director, because that always sets the home 
    directory to what it finds in the passwd file. The alternative is a 
    lot of work: you have to set up separate files of username/uid/gid
    and then use an aliasfile director to detect which local parts you 
    want to accept; aliasfile has a "directory" option, which allows you 
    to specify a home directory. This is the way people run Exim when
    the users don't even have accounts on the machine. Each line in the 
    aliasfile is of the form:


    username: uid=1234 gid=5678 home=/some/file


    and the bits can be picked out by suitable subkeys in lookup 
    expansions for the user, group, and directory options of aliasfile.


(c) Wait for release 1.60...

Philip

--
Philip Hazel                   University Computing Service,
ph10@???             New Museums Site, Cambridge CB2 3QG,
P.Hazel@???          England.  Phone: +44 1223 334714