Re: [Dovecot] authentication with mysql - problem with table name escaping
On 26.8.2007, at 3.41, XhE wrote: Found a problem with dovecot 1.0.3 and mysql authentication I got a problem with escaping of mysql table names. Usually, when a mysql table name has some special character (in my case there is a table beginning with the # character) one has to put into these special quotes --- ` ---; others like ' oder are not recognized. But dovecot somehow doesn't allow me to do that. I don't know what you mean by putting into special quotes. Can you given an example? But if you tried to use # it would be treated as a comment, so you'd have to put the whole setting inside quotes: password_query = select password, from #table where .. PGP.sig Description: This is a digitally signed message part
Re: [Dovecot] authentication with mysql - problem with table name escaping
Hi, for more info see: http://dev.mysql.com/doc/refman/5.0/en/identifiers.html where is stated: The identifier quote character is the backtick (`): greetings, Luuk On 26.8.2007, at 3.41, XhE wrote: Found a problem with dovecot 1.0.3 and mysql authentication I got a problem with escaping of mysql table names. Usually, when a mysql table name has some special character (in my case there is a table beginning with the # character) one has to put into these special quotes --- ` ---; others like ' oder are not recognized. But dovecot somehow doesn't allow me to do that. I don't know what you mean by putting into special quotes. Can you given an example? But if you tried to use # it would be treated as a comment, so you'd have to put the whole setting inside quotes: password_query = select password, from #table where ..
Re: [Dovecot] authentication with mysql - problem with table name escaping
Luuk you're absolutely right - I have to use the backtick. But unfortunately dovecot doesn't let me do that. And further as an example (actually a pretty complicate one): user_query = SELECT CONCAT('/home/vmail/', domain.name, '/', address.local, '/.maildir/') AS home, 1101 AS uid, 1101 AS gid FROM user, `#user_address`, address, domain WHERE user.id = `#user_address`.user_id AND `#user_address`.address_id = address.id AND address.domain_id = domain.id AND user.name=LEFT('%u', LOCATE(@,'%u')-1) AND CONCAT(address.local, '@', domain.name) = MID('%u', LOCATE(@,'%u')+1) If I change the table's name to one, which doesn't need backtick escaping the upper query works. Dovecot somehow doesn't get along with the backtick Regards, XhE Luuk wrote: Hi, for more info see: http://dev.mysql.com/doc/refman/5.0/en/identifiers.html where is stated: The identifier quote character is the backtick (‘`’): greetings, Luuk On 26.8.2007, at 3.41, XhE wrote: Found a problem with dovecot 1.0.3 and mysql authentication I got a problem with escaping of mysql table names. Usually, when a mysql table name has some special character (in my case there is a table beginning with the # character) one has to put into these special quotes --- ` ---; others like ' oder are not recognized. But dovecot somehow doesn't allow me to do that. I don't know what you mean by putting into special quotes. Can you given an example? But if you tried to use # it would be treated as a comment, so you'd have to put the whole setting inside quotes: password_query = select password, from #table where ..
Re: [Dovecot] authentication with mysql - problem with table name escaping
should u not do this; user_query = SELECT CONCAT('/home/vmail/', domain.name, '/', address.local, '/.maildir/') AS home, 1101 AS uid, 1101 AS gid FROM user, `#user_address`, address, domain WHERE user.id = `#user_address`.user_id AND `#user_address`.address_id = address.id AND address.domain_id = domain.id AND user.name=LEFT('%u', LOCATE('@','%u')-1) AND CONCAT(address.local, '@', domain.name) = MID('%u', LOCATE('@','%u')+1) so, also change: LOCATE(@,'%u') to: LOCATE('@','%u') (two times in yout query) Luuk Luuk you're absolutely right - I have to use the backtick. But unfortunately dovecot doesn't let me do that. And further as an example (actually a pretty complicate one): user_query = SELECT CONCAT('/home/vmail/', domain.name, '/', address.local, '/.maildir/') AS home, 1101 AS uid, 1101 AS gid FROM user, `#user_address`, address, domain WHERE user.id = `#user_address`.user_id AND `#user_address`.address_id = address.id AND address.domain_id = domain.id AND user.name=LEFT('%u', LOCATE(@,'%u')-1) AND CONCAT(address.local, '@', domain.name) = MID('%u', LOCATE(@,'%u')+1) If I change the table's name to one, which doesn't need backtick escaping the upper query works. Dovecot somehow doesn't get along with the backtick Regards, XhE Luuk wrote: Hi, for more info see: http://dev.mysql.com/doc/refman/5.0/en/identifiers.html where is stated: The identifier quote character is the backtick (`): greetings, Luuk On 26.8.2007, at 3.41, XhE wrote: Found a problem with dovecot 1.0.3 and mysql authentication I got a problem with escaping of mysql table names. Usually, when a mysql table name has some special character (in my case there is a table beginning with the # character) one has to put into these special quotes --- ` ---; others like ' oder are not recognized. But dovecot somehow doesn't allow me to do that. I don't know what you mean by putting into special quotes. Can you given an example? But if you tried to use # it would be treated as a comment, so you'd have to put the whole setting inside quotes: password_query = select password, from #table where ..
Re: [Dovecot] authentication with mysql - problem with table name escaping
Actually the answer is NO. The backtick are only used for identifiers like table names, databases, etc. The thing you were showing up, @, is just a usual string. Of course I could replace it with single quotes instead of the double ones I was using in order to have consistent quoting, but it doesn't affect the problem ... :( XhE Luuk wrote: should u not do this; user_query = SELECT CONCAT('/home/vmail/', domain.name, '/', address.local, '/.maildir/') AS home, 1101 AS uid, 1101 AS gid FROM user, `#user_address`, address, domain WHERE user.id = `#user_address`.user_id AND `#user_address`.address_id = address.id AND address.domain_id = domain.id AND user.name=LEFT('%u', LOCATE('@','%u')-1) AND CONCAT(address.local, '@', domain.name) = MID('%u', LOCATE('@','%u')+1) so, also change: LOCATE(@,'%u') to: LOCATE('@','%u') (two times in yout query) Luuk Luuk you're absolutely right - I have to use the backtick. But unfortunately dovecot doesn't let me do that. And further as an example (actually a pretty complicate one): user_query = SELECT CONCAT('/home/vmail/', domain.name, '/', address.local, '/.maildir/') AS home, 1101 AS uid, 1101 AS gid FROM user, `#user_address`, address, domain WHERE user.id = `#user_address`.user_id AND `#user_address`.address_id = address.id AND address.domain_id = domain.id AND user.name=LEFT('%u', LOCATE(@,'%u')-1) AND CONCAT(address.local, '@', domain.name) = MID('%u', LOCATE(@,'%u')+1) If I change the table's name to one, which doesn't need backtick escaping the upper query works. Dovecot somehow doesn't get along with the backtick Regards, XhE Luuk wrote: Hi, for more info see: http://dev.mysql.com/doc/refman/5.0/en/identifiers.html where is stated: The identifier quote character is the backtick (‘`’): greetings, Luuk On 26.8.2007, at 3.41, XhE wrote: Found a problem with dovecot 1.0.3 and mysql authentication I got a problem with escaping of mysql table names. Usually, when a mysql table name has some special character (in my case there is a table beginning with the # character) one has to put into these special quotes --- ` ---; others like ' oder are not recognized. But dovecot somehow doesn't allow me to do that. I don't know what you mean by putting into special quotes. Can you given an example? But if you tried to use # it would be treated as a comment, so you'd have to put the whole setting inside quotes: password_query = select password, from #table where ..
Re: [Dovecot] Migrate 0.99 MBox into 1.0rc15-2
--On Saturday, August 25, 2007 7:07 PM -0400 Charles Marcus [EMAIL PROTECTED] wrote: Also - why rc15? Thats really old now. If your're doing a migration, why not migrate to the newest version? Perhaps the latest his distro offers? Perhaps we need a wiki page showing alternate repos that offer a more up-to-date Dovecot for the more conservative distros (like RHEL and CentoOS).
Re: [Dovecot] Kmail client desconnection
Check what logs show as the disconnection reason for the user. If there is only Disconnected, it means the connection somehow got disconnected. Ok Time, I will do and I will post any important info about ;) -- Thanks, Jordi Espasa Clofent
Re: [Dovecot] Migrate 0.99 MBox into 1.0rc15-2
Dave McGuire wrote: On Aug 26, 2007, at 4:00 PM, Kenneth Porter wrote: Several good centralized software management schemes have been around for a very, very long time. I don't use *any* package management systems...they are more trouble than they're worth. The very existence of this thread is an example. ;) Meh... That all depends on your vendor. Even if they include an older version, the better vendors keep everything secure and as bug free as possible. Package managers allow busy people to keep a system up to date with little effort. I would think security fixes are more important than new features any day. ** This message is intended for the addressee named and may contain privileged information or confidential information or both. If you are not the intended recipient please delete it and notify the sender. **
Re: [Dovecot] Log format question...
What about if %u were permanently changed... but %n and %d left with the original values. It would seem that those people relying on the behavior of %u being stripped would not likely be using nor caring about the values of %n and %d since they are essentially discarding them anyway? That way you have %u acting as the authentication username, and %n and %d containing the username and domain (as sent by the client). Maybe, but it's still an incompatible change that could break existing installations. Also you're thinking only about the case when you want to drop the domain. auth_username_format can be used for a lot of other things as well. It gets confusing if %n and %d sometimes change, but sometimes don't. True, I hadn't thought about that. I'm not much of a C programmer especially in the scheme of something as complex as Dovecot... but if you could be so kind as to point me within a couple of metres of the location in the code where the changes to %n and %d get made by auth_username_format, I'll try to patch something myself locally on my servers to get the result I need for now and leave it up to you to decide if it's worthwhile adding additional variables at some point down the road to expose the original values. Cheers, Mike
Re: [Dovecot] Sieve Vacation cause deliver to die
I have deleted the compiled script (.dovecot.sievec) and send myself a message, there is a new .dovecot.sievec created. When I intentionally make an errorous script, turn out a compile error log is created. So I think the compilation process is fine. I will try your instruction on 13 Aug again. Thanks. Regards, Steve Steffen Kaiser [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 24 Aug 2007, kc wrote: Still having error with vacation. Compile ok, but run error! At 13. Aug I gave you some hints in order to debug the permissions of your setup. I do not see no reply on it. The script is ok, otherwise it cannot be compile. It will generate an error log instead. Aha. I hinted whether or not the compiled script used really is the compilation of the script. Didst you verified it using sieved? Bye, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBRs6B2S9SORjhbDpvAQJ0WAf+IRoF+M85LEh/sWcLQZqnfZRYdGHbcaAM xbInorNg+WQMly84vvEged/vIFLPjbCULz+sSp32DH2GVljEdGu8VpSIRVpmpHS+ ocdwWw3V8VlE1YEWQqf4wFgFBrmsfcr5DD2ksEoQzGow9yL5+SNhZ8fF0qmUnoyG WScrFFGkiMmHxYxyeVK3ZPgJvhK0ljiweIa+m7s7L86Oj/N+JlxKbjol1aH6lR/+ dpBCtG+z3wufXe3z1TscBb0rdUZH4/tCW8lba0bmDHjJG+m53P089PM7QTafn+HS EZ/gaKmF52E+jUupJDLDe8wiTv8vCEjlT9UNWIFP9tBJSoXZyaoLtw== =6SYE -END PGP SIGNATURE-