Re: [Exim] confusion over forwardfile directories

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Peter Galbavy
CC: exim-users
Betreff: Re: [Exim] confusion over forwardfile directories
On Mon, 27 Sep 1999, Peter Galbavy wrote:

> I am getting confused regarding the usage of the various *_directory
> values for forwardfile. The spec.txt file almost gives me a headache
> reading the "home directories" part of the forwardfile text.


Sorry about that. It got complicated as things got added and I attempted
to maintain backwards compatibility.

> userforward:
> driver = forwardfile
> file = ${lookup {$domain} dbm {EXIM_DB/domaindirs.db} {$value}}/var/mail/${local_part}/.forward
> check_ancestor
> check_local_user = false
> filter
> home_directory = ${lookup {$domain} dbm {EXIM_DB/domaindirs.db} {$value}}/var/mail/${local_part}
> file_transport = address_file
> pipe_transport = address_pipe
> reply_transport = address_reply
> user = ${lookup {$domain} dbm {EXIM_DB/domainusers.db} {$value}}
> group = ${lookup {$domain} dbm {EXIM_DB/domainusers.db} {$value}}


. You have unset "check_local_user". Therefore it won't look up a home
directory from the passwd file.

. You have set home_directory - if you read the spec it say that this
value is used "during the delivery process", that is when the message is
being delivered by a transport. It is *not* used during the forwarding.
(It's provided for overriding at transport time.) I will add more words
to make that absolutely clear.

. You have not set any other directory options. Therefore no directory
is considered as "home" during the forwarding.

> LOG: 0 MAIN
> == /gspam <peter@???> T=address_file defer (13): Permission denied: creating lock file hitching post /gspam.lock.knowledge.com.37ef527d.00003c2f


It's trying to write to the file /gspam.

>      save $home/gspam


and that's why, because $home is empty.

> I saw both file_directory and current_directory, but I still cannot
> make complete sense of the text. Which should I use ? How do they
> relate to $home etc.


current_directory also applies only at delivery time. All that controls
$home at forwarding time is check_local_user and file_directory. I'm
afraid I can't explain any better than the text in the spec, viz:

The home expansion variable can be used in a number of local options for
forwardfile. Its value depends on the way the options are set up, as follows:

   .   If check_local_user is set without file_directory, then the user's home
       directory is set in the home expansion variable when expanding the file
       option that specifies a forward or filter file.


   .   If file_directory is set without check_local_user, then the expanded
       value of file_directory is set in the home expansion variable when
       expanding the file option. If home appears in the string for
       file_directory, its substitution value is the empty string.


   .   If both check_local_user and file_directory are set, home in the string
       for file_directory is the user's home directory, but home in the file
       option is the expanded value of file_directory.


I suppose there ought to be a final one: "If neither check_local_user
nor file_directory are set, then $home is empty."


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.