In my case, the tmda-ofmipd program is run under a particular username
(--username foo).  There are no real accounts on the system.  Authentication
is done against a MySQL database for all users.  But it is then handy to
load user specific files as I showed you.

LOGNAME would be "foo" in all cases.  (Well, I haven't tested that, but I
don't see anything in the TMDA code that would make it otherwise)

----- Original Message ----- 
From: "Jason R. Mastaler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 29, 2003 7:41 PM
Subject: Re: tmda-ofmipd patch to get LOGIN information into environment


> Bernard Johnson <[EMAIL PROTECTED]> writes:
>
> > If you're running tmda-ofmipd as a single user id, it then lets you do
> > things in your config files like look up per user information.
> >
> > login = string.lower(os.environ['LOGIN'])
> > user, domain = login.split('@')
> > userdir = os.path.join("/my/path", domain, user)
> >
> > then a bunch of stuff like:
> > CONFIRM_APPEND = os.path.join(userdir, "lists/confirmed")
> >
> > Or is there a better way?
>
> Isn't the LOGNAME environment variable already available?
> _________________________________________________
> tmda-workers mailing list ([EMAIL PROTECTED])
> http://tmda.net/lists/listinfo/tmda-workers

_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers

Reply via email to