Re: Authenticating Neomail with Apache mod_auth

Christoph Lechleitner <[email protected]>
Newsgroups gmane.mail.neomail.general
Message-ID <[email protected]>
On Mon, 3 Feb 2003, Torsten Mueller wrote:

>> I run a number of Perl based applications e.g Calendar Scheduling,  and
>> authenticate using Apache mod_auth. Since I have captured the
>> authenticated user as an ENV var REMOTE_USER I wanted to then access
>> Neomail without further authentication. ( Note , new Linux users are
>> added are added automatically to my mod_auth password file )
>>
>> I thought I could do this by adding the following to checklogin.pl
>> my $remoteuser = $ENV{'REMOTE_USER'};
>> if (length($remoteuser)> 1) {exit 0;}
>> ( this is executed before check for ( $passwdfile && $username &&
>> $password )
>>
>> and call neomail with arguments
>> neomail.pl?action=login
>>
>> No Luck so far.
>>
>> I would appreciate any hints or tips
>
>This is not an easy task i doubt.
>You have to change the auth model and the
>session timout handling.
>
>As neomail currently uses a session id you have to
>substitute the sessionid-model or
>create the correct sessionid in checklogin.pl
>
>There is no ready to run solution available i know, so
>you are on your own.

Well, I must disagree.

First, it is an easy task, because neomail just has to take the user from
apache as done above with

  my $remoteuser = $ENV{'REMOTE_USER'}

The other line,

  if (length($remoteuser)> 1) {exit 0;}

is absolute useless, because only non-empty users whose password get apache to
execute the script at all.

Further more, data/checklogin.pl can be ignored.


Secondly, I can provide a ready-to-run solution:

We have adopted neomail not only to use apache's .htaccess based
authentication (which allows e.g. to use any authentication method
apache supports, LDAP in our case).

We have further changed it a bit to support our multi domain environment,
i.e. we do not force the user to use a certain domain in his sender email
address.

You can find our changed neomail.pl and neomail-prefs.pl at our Open Source
page http://www.ibcl.at/ossw/

Unfortunately, I do not have the time to seperate the to changes e.g. in
two .patch files, but I believe the changes concerning authentication does
only occur in the area of neomail.pl in which checklogin.pl is called
(or, better, is not called any more now ;->>>).

Finally I kind of apologize for not to have announced our work earlier ;-))


kr


Christoph Lechleitner

------------------------------------------------------------------------
 IBCL - IT Bureau Dipl.-Ing. C. Lechleitner
 Defreggerstr. 24, A-6020 Innsbruck, Austria, Europe
 http://www.ibcl.net/
 Tel.: +43 512 934060, Mobile: +43 676 3013818
------------------------------------------------------------------------






-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.