Hi Christian, I managed to wade past the authentication stage, actually. I used an MD5 encrypted password in that field and changed the userPasswordAlgorithm = crypt, which worked for me after a suggestion from another member of this list.
Thanks for the follow up. Do you by any chance use Resource Configurations. I am at that stage of the SOGo learning curve. I posted a question today. Hopefully you have ideas on that too:) On 3 July 2013 15:20, Christian Mack <[email protected]> wrote: > Hello Odhiambo Washington > > > Am 2013-06-26 14:46, schrieb Odhiambo Washington: > > > > I am almost bald trying to get authentication using mysql working. The > > difficult part is how to tell what SOGo is exactly doing (debugging) so > > that I can fix it. > > > > I have in my sogo.conf: > > > > /* MySQL Authentication */ > > SOGoUserSources = ( > > { > > type = sql; > > canAuthenticate = YES; > > displayName = "Staff Members"; > > id = users; > > isAddressBook = YES; > > userPasswordAlgorithm = md5; > > viewURL > > ="mysql://exim4u:[email protected]:3306/exim4u/sogo_auth_view > > <http://exim4u:[email protected]:3306/exim4u/sogo_auth_view>"; > > } > > ); > > > > > > And I created a view on my DB as follows: > > > > CREATE VIEW sogo_auth_view AS SELECT user_id AS sogo_id, username AS > > c_uid, realname AS c_name, clear AS c_password, username AS c_cn, use > > rname AS mail, realname AS displayName FROM users WHERE enabled='1'; > > > > Which gives me: > > mysql> select * from exim4u.sogo_auth_view where c_name like '%wash%'; > > > +---------+---------------------+---------------------+------------+---------------------+---------------------+---------------------+ > > | sogo_id | c_uid | c_name | c_password | > > c_cn | mail | displayName | > > > +---------+---------------------+---------------------+------------+---------------------+---------------------+---------------------+ > > | 3 | [email protected] <mailto:[email protected]> | Odhiambo > > WASHINGTON | secret1 | [email protected] > > <mailto:[email protected]> | [email protected] > > <mailto:[email protected]> | Odhiambo WASHINGTON | > > > +---------+---------------------+---------------------+------------+---------------------+---------------------+---------------------+ > > > > > > I am trying to login using [email protected] > > <mailto:[email protected]> and password=whateveritis but I always get > > failure... wrong username or password. > > > < .. > > > > > Is there something I am doing wrong?? Is it wrong password format? > > > > In your SOGo configuration you say userPasswordAlgorithm = md5, but it > seems you have plain text passwords in your Mysql view. > Is that correct? > Then just use md5 hashed passwords in your view and it should work. > > > My assumption is that SOGo is supposed to be sending these login details > > to my IMAP (Dovecot), right? Looking at my dovecot logs, I see no > > connection attempts... > > > > It will do that, but it will check your username and password against > the mysql view first. > As that isn't working, it will not try to connect to the IMAP server at > all. > > > Kind regards, > Christian Mack > > > -- > Christian Mack > Gruppe Informationsdienste > Rechenzentrum Universität Konstanz > -- > [email protected] > https://inverse.ca/sogo/lists > -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223 "I can't hear you -- I'm using the scrambler." -- [email protected] https://inverse.ca/sogo/lists
