Re: OpenWebMail support
André Schild <[email protected]> Mon, 22 Aug 2011 15:31:15 +0200
| Newsgroups | gmane.mail.jamm.user |
|---|---|
| Organization | Aarboard AG |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============5630538070709336717==
Content-Type: multipart/alternative;
boundary="------------040507040805020200010501"
This is a multi-part message in MIME format.
--------------040507040805020200010501
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable
Hello Sel=E7uk,
we don't use OpenWebMail, we use it with Horde/IMP and Roundcube.
Can't OpenWebMail authenticate against the IMAP server ?
That would probably be simplest....
In your setup, are you sure that there is a OU between the mail and the=20
jvd in ldap ?
Andr=E9
Am 22.08.2011 14:59, schrieb Selcuk Yazar:
> Hi,
>
> How can we user OpenWEbMail with Jamm schemas ?
>
>
>
> sub check_userpassword {
> # 0 : ok
> # -2 : parameter format error
> # -3 : authentication system/internal error
> # -4 : password incorrect
> my ($r_config, $user, $password) =3D @_;
>
> return (-2, 'User or password is null')
> if !defined $user || $user eq '' || !defined $password ||=20
> $password eq '';
>
> my $ldap =3D Net::LDAP->new($ldapHost) or return(-3, "LDAP error $@"=
);
> $ldap->bind (dn=3D>"$cn, $dc1, $dc2", password =3D>$pwd) or return(=
-3,=20
> "LDAP error $@");
>
> # Attempt to bind using the username and password provided.
> # (For a secure LDAP config, only auth should be allowed for
> # any user other than self and rootdn.)
> #mail=3Dselcukyazar@*******.edu.tr=20
> <http://edu.tr>,ou=3D**********,jvd=3Dtrakya.edu.tr=20
> <http://trakya.edu.tr>,o=3Dhosting,dc=3Dmyhosting,dc=3Dexample
>
> my $list =3D $ldap->search(
> base =3D> $ldapBase,
> filter =3D>=20
> "(&(objectClass=3DJammMailAccount)(mail=3D$user\@********.edu.tr=20
> <http://edu.tr>)(accountActive=3DTRUE)(delete=3DFALSE))",
> attrs =3D> ['ou']
> ) or return(-3, "LDAP error $@");
>
>
> my $entry =3D $list->entry(0);
> my $ou_t =3D $entry->get_value('ou');
>
> undef($ldap); # disconnect
>
> my $mesg =3D $ldap->bind(
> dn =3D> "mail=3D$user\@***.edu.tr=20
> <http://edu.tr>, $ou_t, jvd=3D**********.edu.tr=20
> <http://edu.tr>,o=3Dhosting,dc=3Dmyhosting,dc=3Dexample",
> password =3D> $password
> );
>
> undef($ldap); # disconnect
>
> thanks in advance.
>
>
> --=20
> Sel=E7uk YAZAR
> http://www.selcukyazar.blogspot.com
>
>
> -----------------------------------------------------------------------=
-------
> uberSVN's rich system and user administration capabilities and model
> configuration take the hassle out of deploying and managing Subversion =
and
> the tools developers use with it. Learn more about uberSVN and get a fr=
ee
> download at: http://p.sf.net/sfu/wandisco-dev2dev
>
>
> _______________________________________________
> Jamm-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jamm-users
--=20
Aarboard AG Phone: +41 32 332 97 14
Egliweg 10 Fax: +41 32 332 97 14
2560 Nidau
Switzerland www.aarboard.ch
--------------040507040805020200010501
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello Selçuk,<br>
<br>
we don't use OpenWebMail, we use it with Horde/IMP and Roundcube.<br>
Can't OpenWebMail authenticate against the IMAP server ?<br>
That would probably be simplest....<br>
<br>
In your setup, are you sure that there is a OU between the mail and
the jvd in ldap ?<br>
<br>
André<br>
<br>
Am 22.08.2011 14:59, schrieb Selcuk Yazar:
<blockquote
cite="mid:CACBG-R3+4nFyrbmmfrDYwENanMTpmfAOQzYjTwfY3TfRm9VFjA@mail.gmail.com"
type="cite">Hi,
<div><br>
</div>
<div>How can we user OpenWEbMail with Jamm schemas ?</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div>sub check_userpassword {</div>
<div> # 0 : ok</div>
<div> # -2 : parameter format error</div>
<div> # -3 : authentication system/internal error</div>
<div> # -4 : password incorrect</div>
<div> my ($r_config, $user, $password) = @_;</div>
<div><br>
</div>
<div> return (-2, 'User or password is null')</div>
<div> if !defined $user || $user eq '' || !defined
$password || $password eq '';</div>
<div><br>
</div>
<div> my $ldap = Net::LDAP->new($ldapHost) or return(-3,
"LDAP error $@");</div>
<div>
$ldap->bind (dn=>"$cn, $dc1, $dc2", password
=>$pwd) or return(-3, "LDAP error $@");</div>
<div><br>
</div>
<div> # Attempt to bind using the username and password
provided.</div>
<div> # (For a secure LDAP config, only auth should be allowed
for</div>
<div> # any user other than self and rootdn.)</div>
<div> #mail=selcukyazar@*******.<a moz-do-not-send="true"
href="http://edu.tr">edu.tr</a>,ou=**********,jvd=<a
moz-do-not-send="true" href="http://trakya.edu.tr">trakya.edu.tr</a>,o=hosting,dc=myhosting,dc=example</div>
<div><br>
</div>
<div> my $list = $ldap->search(</div>
<div> base => $ldapBase,</div>
<div> filter =>
"(&(objectClass=JammMailAccount)(mail=$user\@********.<a
moz-do-not-send="true" href="http://edu.tr">edu.tr</a>)(accountActive=TRUE)(delete=FALSE))",</div>
<div> attrs => ['ou']</div>
<div> ) or return(-3, "LDAP error
$@");</div>
<div><br>
</div>
<div><br>
</div>
<div> my $entry = $list->entry(0);</div>
<div> my $ou_t = $entry->get_value('ou');</div>
<div><br>
</div>
<div> undef($ldap); # disconnect</div>
<div><br>
</div>
<div> my $mesg = $ldap->bind(</div>
<div> dn =>
"mail=$user\@***.<a moz-do-not-send="true"
href="http://edu.tr">edu.tr</a>, $ou_t, jvd=**********.<a
moz-do-not-send="true" href="http://edu.tr">edu.tr</a>,o=hosting,dc=myhosting,dc=example",</div>
<div> password => $password</div>
<div> );</div>
<div><br>
</div>
<div> undef($ldap); # disconnect</div>
</div>
<div><br>
</div>
<div>thanks in advance.</div>
<div><br clear="all">
<div><br>
</div>
-- <br>
Selçuk YAZAR<br>
<a moz-do-not-send="true"
href="http://www.selcukyazar.blogspot.com">http://www.selcukyazar.blogspot.com</a><br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: <a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/wandisco-dev2dev">http://p.sf.net/sfu/wandisco-dev2dev</a>
</pre>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Jamm-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/jamm-users">https://lists.sourceforge.net/lists/listinfo/jamm-users</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Aarboard AG Phone: +41 32 332 97 14
Egliweg 10 Fax: +41 32 332 97 14
2560 Nidau
Switzerland <a class="moz-txt-link-abbreviated" href="http://www.aarboard.ch">www.aarboard.ch</a></pre>
</body>
</html>
--------------040507040805020200010501--
--===============5630538070709336717==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model
configuration take the hassle out of deploying and managing Subversion and
the tools developers use with it. Learn more about uberSVN and get a free
download at: http://p.sf.net/sfu/wandisco-dev2dev
--===============5630538070709336717==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Jamm-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jamm-users
--===============5630538070709336717==--