Re: [EXIM] Appendfile Buglet

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: Jochen Topf
Cc: exim-users
Asunto: Re: [EXIM] Appendfile Buglet
On Wed, 15 Jul 1998, Jochen Topf wrote:

> Following transport:
>
> t_pop:
>   driver                = appendfile
>   directory             = "/var/spool/pop/${lookup{$local_part@$domain}\
>                                 dbm*@{/etc/exim/localbox.db} {$value} fail}"
>   [...]

>
> A Mail to "test/x@???" failes with
> 1998-07-15 10:31:31 0ywMyJ-0002oW-00 == test/x@??? T=t_pop defer (-2): appendfile: user name contains /
>
> Why this test? Obviously the test is not against any "user name", but against
> the local part. But the local part itself is not used in the filename, so I
> don't care about the / in it.


This was a bit of paranoia. The comment in the code says

(2f) If the file name to be expanded contains a reference to
$local_part, check that the user name doesn't contain a / because that
would cause a reference to another directory.

This was written in the early days when I was thinking of simple file
names, and I was being very paranoid about everything in sight.

Normal login names don't contain slashes. I guess this would only bite
with a configuration that was delivering arbitrary local parts into some
file whose name was based on the local part, and even then only if there
were an existing sub-directory that matched the first part of the local
part.

I now think this is all sufficiently obscure that the test isn't
particularly helpful, and so I will remove it. If you want to do so
yourself, the code is about 10 lines at line 703 of
src/transports/appendfile.c.


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



--
*** Exim information can be found at http://www.exim.org/ ***