Re: [EXIM] Case of local parts

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Bruce Bowler
CC: exim-users
Subject: Re: [EXIM] Case of local parts
On Wed, 24 Feb 1999, Bruce Bowler wrote:

> Just because "tradition" says so, doesn't make it right, nor is what he did
> "wrong".


Agreed! Agreed! I'm with you, but *I don't know what to do*!

> As I stated at the top of my original note, I'm not a Unix system
> programming guru or even a wiz-in-training so I don't have a good feel for
> how to implement it but what Chad says makes sense as a start as does,
> perhaps, an option to either use getpwent or a "user (or PH) supplied"
> serial read thru passwd routine that does a "truly caseless match" (with
> the caveat that it'll slow things down, perhaps even name the option
> "slow_caseless_match".


The problem is that the "correct" way to check that xXxX is a user is to
call getpwnam(xXxX). This may read through /etc/passwd, or it may call
NIS or NIS+ or it may invoke some other kind of check now or in the
future. Or even some private parochial scheme on somebody's home-brewed
system. I don't want Exim to have to know. I don't want to make Exim
dependent on any particular method - I just want to use the Front Door
interface, namely, getpwnam(). Given that, I cannot see any sensible
alternatives to trying either or both of getpwnam(xxxx) and
getpwnam(xXxX) when mail comes in for xXxX. Currently, you get one or
the other, depending on the setting of locally_caseless. It could try
both, which would give you bbowler and BBowler, but not Bbowler or
bBowler and I don't think that is satisfactory.

The one other possibility is perhaps a user-supplied function, as you
suggest. In fact, you could do this right now using a smartuser director
instead of localuser, and using an embedded Perl call in a "condition"
option or maybe even in a local_parts option. You would need another
Perl call in the transport to turn the local part into canonical form in
order to find the user's home directory - indeed, you'd also need this
if you are handling .forward files in home directories. Also not entirely
satisfactory, I feel. Certainly costly.

Logically, what is needed is a means of turning any incoming local part
into the correctly cased form as early as possible, so that it can be
used by all these things (forward file handling, user checking). I
believe that is in fact what you currently do by means of an alias file.
I can't see any better way of doing this. Such an alias file can clearly
be built automatically from /etc/passwd if that is required.

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



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