On Wed, Nov 16, 2005 at 12:07:03PM -0700, Craig Coles wrote:
I have been using courier and sqwebmail with userdb virtual users for a
while now and it works very well. I am wondering now how I can use
courier-authlib as the authentication piece for other processes...
I would like to obtain the 'home' field for users that also want to have a
personal webpage (a location so they can push updated webpages to their
'home page'). Can Apache use this to know where 'home' is? Can Apache
check for proper authentication with courier-authlib like some kind of
mod-auth??
Sorry, a little OT but need to know how to bring everything together. Even
if I need to change the location for authenticating users (userdb to
something else) for a virtual hosting environment.
The authdaemon protocol is documented (see authpipe documentation, and also
older postings to this list which gave a protocol description and perl code
/ exim configs for sending queries to authdaemond)
However if you want Apache to authenticate against it, you'll have to write
your own mod_auth_courier. And you can't add your own custom fields, apart
from extra values in the OPTIONS field (which are a bit limited as they
can't contain commas)
In my opinion, you are probably better writing a script which extracts your
userdb information and converts it into an alternative form which Apache can
authenticate against, or vice versa (e.g. have a master database which
writes out userdb and also Apache configs). It's easy to write out a
mod_auth_text file, which is
username:encrypted-password
However, I'm not sure exactly how you want to use this extra 'home'
directory attribute in Apache. Perhaps you want to use it in mod_rewrite
(which is OK since mod_rewrite can lookup in .db files), or you want to read
and use it in a PHP script or whatever. Both are fine, but both are totally
off-topic for this list.
Regards,
Brian.