5 messages in net.sourceforge.lists.courier-usersRe: [courier-users] FW: authmysql $(...
FromSent OnAttachments
Kóczán PéterJul 24, 2006 10:23 am 
Kóczán PéterJul 24, 2006 10:53 am 
Martin SchusterJul 25, 2006 12:40 am 
Kóczán PéterJul 25, 2006 12:58 am 
Kóczán PéterJul 26, 2006 11:24 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] FW: authmysql $(service)Actions...
From:Kóczán Péter (pet@koczan.org)
Date:Jul 26, 2006 11:24:19 am
List:net.sourceforge.lists.courier-users

Hi,

Finally I managed to solved the problem with some help.

The following query works perfectly, with the smtp column containing 1 or 0, depending on if you want the user to be able to use smtp through server or not.

MYSQL_SELECT_CLAUSE select id as username, crypt as cryptpw, clear as clearpw, uid, gid, home, if(strcmp('$(service)','courier'),maildir,''), quota, name as fullname from users where id='$(local_part)@$(domain)' and ((smtp='1' and '$(service)'='esmtp') or ('$(service)'!='esmtp'))

The only that only email addresses are ok for login names, no single logins, so us@something.com would work but simply user would not.

Thanks for the ones that helped again. Regards,

Peter

-----Original Message----- From: cour@lists.sourceforge.net [mailto:cour@lists.sourceforge.net] On Behalf Of Kóczán Péter Sent: Tuesday, July 25, 2006 9:58 AM To: Martin Schuster Cc: cour@lists.sourceforge.net Subject: Re: [courier-users] FW: authmysql $(service)

Sorry, somehow I did not receive it. I turned it on meanwhile and I saw that $(service) is not replaced by the service name, it is in the query as-is. What could be the reason for this?

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Kóczán Péter wrote:

Thanks, but as I see it does not log mysql query so I can't debug

Thanks for ignoring my mail :(

Again: You can turn on logging for the mysqld, it will then log all queries it gets. Put sth like log = /var/log/mysql.log in your my.cnf

iD8DBQFExcrr8/HiHhT8phIRAoAoAKCANTYNJrGVLm5gQRTs4JgzhUTiTgCfawxI S1vi5ZOiZ+rJZ5M9xTZF0fo= =kwDx -----END PGP SIGNATURE-----