On Thu, Apr 07, 2011 at 01:31:10AM +0200, Darko Hojnik wrote:
> Am 06.04.2011, 23:58 Uhr, schrieb Mark Adams <[email protected]>:
> 
> >
> >On 6 Apr 2011, at 20:02, "Darko Hojnik" <[email protected]> wrote:
> >
> >>Hi there,
> >>
> >>Currently we are using Postfix and DBmail with an LDAP backend.
> >>SOGo uses this LDAP backend too. In the future we maybe want
> >>migrate to Apache James as the solution for the mailserver. And
> >>if we do it, then we want do it without a LDAP Server.
> >>So I've got an testinstallation with Apache James 3 Milsestone3
> >>compiled SVN using a PostgreSQL 9 Database. SOGo should be
> >>installed soon on the next days. We want that SOGo will
> >>authenticate against the Database from James
> >>
> >>
> >>
> >>The Database,
> >>
> >>james=> \dt
> >>                  Liste der Relationen
> >>Schema |           Name           |   Typ   | Eigentümer
> >>--------+--------------------------+---------+------------
> >>public | james_domain             | Tabelle | james
> >>public | james_mail               | Tabelle | james
> >>public | james_mail_header        | Tabelle | james
> >>public | james_mail_property      | Tabelle | james
> >>public | james_mailbox            | Tabelle | james
> >>public | james_mailbox_membership | Tabelle | james
> >>public | james_subscription       | Tabelle | james
> >>public | james_user               | Tabelle | james
> >>public | james_virtual_user_table | Tabelle | james
> >>public | openjpa_sequence_table   | Tabelle | james
> >>(10 Zeilen)
> >>
> >>
> >>
> >>Select of the table james_user,
> >>
> >>james=> SELECT column_name FROM information_schema.columns WHERE
> >>table_name = 'james_user';
> >>      column_name
> >>-------------------------
> >>user_name
> >>password_hash_algorithm
> >>password
> >>version
> >>(4 Zeilen)
> >>
> >>james=>
> >>
> >>
> >>
> >>Now I'm asking me is that the correct Syntax for SOGoUserSources
> >>to authenticate against the database from Apache James?
> >>
> >>SOGoUserSources =
> >>(
> >>{
> >>type = sql;
> >>id = directory;
> >>viewURL = "postgresql://james:[email protected]:5432/james/james_user";
> >>canAuthenticate = YES;
> >>isAddressBook = NO;
> >>userPasswordAlgorithm = md5;
> >>}
> >>);
> >>
> >>
> >>thanks for help and suggestions
> >>
> >
> >You have to pass the fields from the db to sogo specifically, as
> >detailed in the documentation (for example name should be c_name).
> >You can achieve this with a view in your db that sogo can call.
> >
> >>best regards
> >>Darko Hojnik
> >>--
> >>[email protected]
> >>https://inverse.ca/sogo/lists
> 
> 
> Hello Mark,
> 
> After I've taken a look in the manual again, I'm a little bit
> confused because I didn't understand it.So I'm not shore how I have
> to write it correct. It's possible to write me an example for
> viewURL and c_name?
> 
> 
> kind regards
> Darko Hojnik
> -- 

This is my view, but it obviously only works with my DB. You will need
create the view dependant on the column names in your existing DB...

create view sogo_auth as (select userid || '@' || domain as c_uid,
userid || '@' || domain as c_name, password as c_password, fullname as
c_cn, userid || '@' || domain as mail from users where status in (1,2));

sogo is looking for c_uid, c_name, c_password, c_cn and mail.
-- 
[email protected]
https://inverse.ca/sogo/lists

Reply via email to