Re: [EXIM] OK here goes...

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: Greg A. Woods
Cc: exim-users
Asunto: Re: [EXIM] OK here goes...
On Fri, 16 Jan 1998, Peter Radcliffe wrote:

> [I read the list, I don't need to be Cc:ed list mail, ta]


OK, but I'm afraid I am not able to remember everybody's wishes in this
respect, expecially in the heat of answering n messages per day, so
forgive me if I don't always get it right. [There is a heated debate
raging on another list about the use of "Reply-To" in this regard.]

> strncmp() ?
>
> I know its not as portable - have a copy within exim to use if its not
> found ?


There is a strncmp() function in Exim, but I don't see how it helps at all.

> > I think you need to build a user list in a file and look up against that.  
> > You can preprocess the file how you like (ie downcase all the keys, so you 
> > end up with:-
> >    bob        Bob
> >    sillycasing    SiLLyCasing
> > and then do lookups for downcased keys).

>
> If I understand you correctly, you're suggesting having (for example)
> something in system_aliases for the casefull people.
> Wouldn't this just get lowercased before it is compared against local_user ?


Not if you set not_locally_caseless. You need an alias file for *all*
users, not just the caseful ones. It needn't polute the system aliases
file. Exim does allow you to have several different alias files. In
fact, you probably need to do something like

get_case_correct:
driver = smartuser
new_address = ${lookup{$lc:$local_part}dbm{/list/of/users}{$value}fail}

as your first director, with new_director set as well, to save it wasting time
doing it twice for each caseful local part.

On Sun, 18 Jan 1998, Greg A. Woods wrote:

> Actually the whole suggestion is pretty well useless unless you first
> re-implement some or all of getpw*() functions since there's no way to
> tell them what string comparison function to use. ;-)


Quite.

> In fact it gets even trickier if other user databases are in use, such
> as YP/NIS/NIS+. In the end you have to scan the whole thing anyway, and
> that can quickly go from expensive to *very* costly if it's not done
> carefully.


Exactly. The only sensible thing to do would be periodically to use the
functions for getting a complete list of users (getpwent() etc) and
build an "alias list" as described above.

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



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