[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Usernames with dots in...



On Wed, 27 Sep 1995, Simon Brock wrote:

> Unlikely but true.  For various reasons I want usernames of the form
> xxx.yyy.  The trouble is that zmailer 2.99.15/16 get upset because they try
> to map that to a realname and if that fails then to a newsgroup.  By
> lightly hacking rrouter.cf in an obvious way I have got it to work but I
> was wondering if there was a better way to do it.

Which database are you using for your fullnames? ZMailer has a built in 
one (fullnamemap), separate from aliases. I defined it at our site to be:

z# db toc
...
fullnamemap   ndbm        0/10      l  /zmailer/db/fullnames
...

I have had no trouble at all using this. The fullnames file is a sorted
2 field file, all lowercase (this IS important! - upper -lower cases in
the search string will match if the db is all lowercase), in a simple
format:

dotted.entry.etc.etc	username

i.e. some examples from my domain:

anand.rao.kalvey                kalvey
charge.symm.breaking.exp        ex121
james.s.mackinnon               jmack
lake.louise.winter.institute    llwi


standard.cf will have:

# optional: Fullname database: <Full.Name>    <login>
if [ -f /zmailer/db/fullnames.pag ]; then
        relation -lmt ndbm -f /zmailer/db/fullnames fullnamemap
else
        fullnamemap () { return 1 }
fi


( <login> can be ANY entry in the aliases file and could point to other
          domains or functions as well)

rrouter.cf should look like:

        [^.:](\.[^.])+
                if [ $(fullnamemap "$address") ]; then
                        return $(rrouter $(fullnamemap "$address") "$origaddr" $A)
                fi
                if [ $(newsgroup "$address") ]; then
                        return (((usenet - "$address" $A)))
                fi
                return (((error norealname "$address" $A)))
                return (((error nonewsgroup "$address" $A)))
                ;;

 
The db is compiled with makendbm:

	sort -o fullnames fullnames; makendbm fullnames

and it all "just works" (at least in our production ZMailer - 2.99.10).
A trace on the db :

tshimshan# router -i
ZMailer router (2.99.10mea #1: Sat Jan 21 13:48:32 MST 1995)
  jmack@Phys.UAlberta.CA:/ZMdevel/zmailer2.99.10
Copyright 1992 Rayan S. Zachariassen
Copyright 1992,1993,1994 Matti Aarnio


z# trace db
z# router charge.symm.breaking.exp
<jmack.interactive@tshimshan.Phys.UAlberta.Ca>: address: charge.symm.breaking.exp
fullnamemap(charge.symm.breaking.exp)
fullnamemap(charge.symm.breaking.exp) = ex121
... terminating cache[0]
... added charge.symm.breaking.exp to cache
fullnamemap(charge.symm.breaking.exp)
... comparing charge.symm.breaking.exp and charge.symm.breaking.exp in cache
... found in cache
expansions(localcharge.symm.breaking.expex121)
aliases(ex121)
aliases(ex121) = ex121@sarcee.phys.ualberta.ca
... terminating cache[0]
... added ex121 to cache
thishost(sarcee.phys.ualberta.ca)
canon(sarcee.phys.ualberta.ca)
canon(sarcee.phys.ualberta.ca) = sarcee.phys.ualberta.ca
... terminating cache[0]
... added sarcee.phys.ualberta.ca to cache
thishost(sarcee.Phys.UAlberta.Ca)
hostexpansions(sarcee.Phys.UAlberta.Ca)
routesdb(sarcee.Phys.UAlberta.Ca)
routesdb(sarcee.Phys.UAlberta.Ca) = smtp!sarcee.phys.ualberta.ca
... terminating cache[0]
... added sarcee.Phys.UAlberta.Ca to cache
(((smtp sarcee.phys.ualberta.ca ex121@sarcee.Phys.UAlberta.Ca g0)))

(another which goes to a different domain):
z# router john.samson
<jmack.interactive@tshimshan.Phys.UAlberta.Ca>: address: john.samson
fullnamemap(john.samson)
fullnamemap(john.samson) = samson
... terminating cache[0]
... added john.samson to cache
fullnamemap(john.samson)
... comparing john.samson and john.samson in cache
... found in cache
expansions(localjohn.samsonsamson)
aliases(samson)
aliases(samson) = samson@space.ualberta.ca
... terminating cache[0]
... added samson to cache
thishost(space.ualberta.ca)
canon(space.ualberta.ca)
canon(space.ualberta.ca) = space.ualberta.ca
... terminating cache[0]
... added space.ualberta.ca to cache
thishost(space.ualberta.ca)
hostexpansions(space.ualberta.ca)
routesdb(space.ualberta.ca)
routesdb(space.ualberta.ca) = smtp!mars.space.ualberta.ca
... terminating cache[0]
... added space.ualberta.ca to cache
(((smtp mars.space.ualberta.ca samson@space.ualberta.ca g0)))
z#


--
James S. MacKinnon           Office: P-139 Avahd-Bhatia Physics Lab
Department of Physics        Voice : (403) 492-8226
University of Alberta        email : Jim.MacKinnon@Phys.UAlberta.CA
Edmonton, Canada T6G 2N5
        WWW:   http://www.phys.ualberta.ca/~jmack/jmack.html