On Sun, Feb 18, 2024 at 11:46 AM Mark <markbsdmail2...@gmail.com> wrote:
> Odhiambo Washington <odhia...@gmail.com>, wrote: > > Thank you, Sebastian. After knowing that I can use /etc/sogo/sogo.conf >> and after installing sope-mysql-5.9.1, life should be a lot easier for Mark. >> It's a matter of creating the VIEW to be used by SOGo for authenticating >> the users from the MySQL database. >> In my database I created it as follows: >> USE exim4u; >> CREATE VIEW sogo_auth_view AS SELECT user_id AS sogo_id, username AS >> c_uid, username AS c_name, crypt AS c_password, realname AS c_cn, username >> AS mail, realname AS displayName FROM users WHERE enabled='1'; >> EXIT; >> >> The VIEW is used in sogo.conf as per the tutorial referred to before. >> >> > > Thank you so much, Odhiambo for the idea. > > Two questions; > 1- My password scheme in my database is BLF-CRYPT (blowfish), should I > mention this for the CREATE VIEW command? > (reading that you put crypt AS c_password) > You just need the password field. The password scheme does not matter. > 2- You created "sogo_auth_view" it seems, however the tutorial you sent > does it for "sogo_view", why so? > You can name the VIEW anything you want. Just make sure you use whatever you name it in the SOGoUserSources block in sogo.conf: SOGoUserSources = ( { type = sql; id = directory; viewURL = "mysql://DBUSERNAME:{userpassword}@127.0.0.1:3306/DBNAME/ *VIEW_NAME*"; canAuthenticate = YES; isAddressBook = YES; userPasswordAlgorithm = blf-crypt; } ); -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]