Re: [EXIM] gecos (fuzzy) matching with exim?

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Thies Lehmann
CC: exim-users
Subject: Re: [EXIM] gecos (fuzzy) matching with exim?
On Thu, 4 Jun 1998, Thies Lehmann wrote:

> I'm searching for a possibility to match the gecos field from /etc/passwd
> with the userid when receiving mail (like sendmails MatchGECOS option).
> As I understand it, lsearch works only the other way round (from userid to
> full Name).


Indeed, because that is the way the passwd file is organized. I can't
offhand think of a way of doing this directly in Exim. What you can do
is pipe undeliverable messages off to a script or program which can then
do its own searching and possibly re-inject the messages if it likes
them. Of course, this requires you to accept all local parts, which may
not be the best plan.

It would be necessary to write a new search type to do the kind of
searching you are suggesting. You would also want to be sure that only
*one* record in the file matched. What if you have

ph10:x:100:100:Philip Hazel:/home/ph10:/bin/bash
ph11:x:200:200:Paul Hazel:/home/ph11:/bin/bash

and somebody mails to P.Hazel? (I'm just pointing out some of the
dangers in this kind of thing.)


-- 
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/ ***