<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; dovecot-sql.conf  не правильный синтаксис SQL]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=15762&amp;type=atom" />
	<updated>2011-08-12T06:13:06Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=15762</id>
		<entry>
			<title type="html"><![CDATA[Re: dovecot-sql.conf  не правильный синтаксис SQL]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=202568#p202568" />
			<content type="html"><![CDATA[<p>Что-то не заработало. Убирал знак \</p>]]></content>
			<author>
				<name><![CDATA[AlfaStriker]]></name>
				<uri>https://linuxforum.ru/profile.php?id=15778</uri>
			</author>
			<updated>2011-08-12T06:13:06Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=202568#p202568</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: dovecot-sql.conf  не правильный синтаксис SQL]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=202404#p202404" />
			<content type="html"><![CDATA[<p>Насколько я помню, dovecot очень плохо воспринимает переносы строк в конфиге. Попробуйте строку с запросом SQL не разбивать, а просто в одну строку запрос писать, без \</p>]]></content>
			<author>
				<name><![CDATA[Hrafn]]></name>
			</author>
			<updated>2011-08-11T12:50:48Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=202404#p202404</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: dovecot-sql.conf  не правильный синтаксис SQL]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=202398#p202398" />
			<content type="html"><![CDATA[<p>Первый запрос проходит&nbsp; - <br /></p><div class="codebox"><pre><code>user_query = SELECT &#039;/var/vmail/%d/%n&#039; as home, &#039;maildir:/var/vmail/%d/%n&#039;as mail, 1151 AS uid, 12 AS gid, concat(&#039;dirsize:storage=&#039;, quota) AS quota \ FROMmailbox WHERE username = &#039;%u&#039; AND active = &#039;1&#039;</code></pre></div><p>А второй запрос, не проходит -<br /></p><div class="codebox"><pre><code>password_query = SELECT username as user, password, &#039;/var/vmail/%d/%n&#039; asuserdb_home, &#039;maildir:/var/vmail/%d/%n&#039; as userdb_mail, 1151 as \ userdb_uid, 12 asuserdb_gid FROM mailbox WHERE username = &#039;%u&#039; AND active = &#039;1&#039;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[AlfaStriker]]></name>
				<uri>https://linuxforum.ru/profile.php?id=15778</uri>
			</author>
			<updated>2011-08-11T12:39:21Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=202398#p202398</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[dovecot-sql.conf  не правильный синтаксис SQL]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=202396#p202396" />
			<content type="html"><![CDATA[<p>Добрый вечер!</p><p><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">cat /var/log/mailog.log</div></p><p><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">Aug 11 08:36:09 mx dovecot: Dovecot v1.2.17 starting up (core dumps disabled)<br />Aug 11 08:36:10 mx dovecot: auth-worker(default): mysql: Connected to localhost (mail)<br />Aug 11 08:36:10 mx postgrey[2383]: Process Backgrounded <br />Aug 11 08:36:10 mx postgrey[2383]: 2011/08/11-08:36:10 postgrey (type Net::Server::Multiplex) starting! pid(2383) <br />Aug 11 08:36:10 mx postgrey[2383]: Using default listen value of 128 <br />Aug 11 08:36:10 mx postgrey[2383]: Binding to UNIX socket file /var/spool/postfix/postgrey/socket using SOCK_STREAM&nbsp; <br />Aug 11 08:36:10 mx postgrey[2383]: Setting gid to &quot;104 104&quot; <br />Aug 11 08:36:10 mx postgrey[2383]: Setting uid to &quot;103&quot; <br />Aug 11 08:36:11 mx dovecot: auth(default): new auth connection: pid=2424<br />Aug 11 08:36:11 mx dovecot: auth(default): new auth connection: pid=2423<br />Aug 11 08:36:11 mx dovecot: auth(default): new auth connection: pid=2425<br />Aug 11 08:36:11 mx dovecot: auth(default): new auth connection: pid=2426<br />Aug 11 08:36:11 mx dovecot: auth(default): new auth connection: pid=2431<br />Aug 11 08:36:11 mx dovecot: auth(default): new auth connection: pid=2432<br />Aug 11 08:36:11 mx postfix/postfix-script[2470]: starting the Postfix mail system<br />Aug 11 08:36:11 mx postfix/master[2471]: daemon started -- version 2.8.4, configuration /etc/postfix<br />Aug 11 08:36:54 mx dovecot: auth(default): client in: AUTH&nbsp; &nbsp; 1&nbsp; &nbsp; PLAIN&nbsp; &nbsp; service=pop3&nbsp; &nbsp; secured&nbsp; &nbsp; lip=10.168.50.42&nbsp; &nbsp; rip=10.168.50.42&nbsp; &nbsp; lport=110&nbsp; &nbsp; rport=43119&nbsp; &nbsp; resp=AGFkbWluQHBvaW50LmxvY2FsADFRMnczZTRy<br />Aug 11 08:36:54 mx dovecot: auth-worker(default): sql(admin@point.local,10.168.50.42): query: SELECT username as user, password, &#039;/var/vmail/point.local/admin&#039; asuserdb_home, &#039;maildir:/var/vmail/point.local/admin&#039; as userdb_mail, 1151 as \ userdb_uid, 12 asuserdb_gid FROM mailbox WHERE username = &#039;admin@point.local&#039; AND active = &#039;1&#039;<br />Aug 11 08:36:54 mx dovecot: auth-worker(default): sql(admin@point.local,10.168.50.42): Password query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#039;\ userdb_uid, 12 asuserdb_gid FROM mailbox WHERE username = &#039;admin@point.local&#039; &#039; at line 1<br />Aug 11 08:36:55 mx dovecot: auth(default): new auth connection: pid=3361<br />Aug 11 08:36:56 mx dovecot: auth(default): client out: FAIL&nbsp; &nbsp; 1&nbsp; &nbsp; user=admin@point.local&nbsp; &nbsp; temp<br /></div></p><p>Сам dovecot-sql.conf<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">cat /etc/dovecot-sql.conf</div></p><p><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">driver = mysql<br />connect = host=localhost dbname=mail user=postfix password=password<br />default_pass_scheme = MD5<br />user_query = SELECT &#039;/var/vmail/%d/%n&#039; as home, &#039;maildir:/var/vmail/%d/%n&#039;as mail, 1151 AS uid, 12 AS gid, concat(&#039;dirsize:storage=&#039;, quota) AS quota \ FROMmailbox WHERE username = &#039;%u&#039; AND active = &#039;1&#039;<br />password_query = SELECT username as user, password, &#039;/var/vmail/%d/%n&#039; asuserdb_home, &#039;maildir:/var/vmail/%d/%n&#039; as userdb_mail, 1151 as \ userdb_uid, 12 asuserdb_gid FROM mailbox WHERE username = &#039;%u&#039; AND active = &#039;1&#039;<br /></div></p><p>Не подскажите как подправить dovecot-sql.conf чтобы он нормально работал с базой MySQL</p>]]></content>
			<author>
				<name><![CDATA[AlfaStriker]]></name>
				<uri>https://linuxforum.ru/profile.php?id=15778</uri>
			</author>
			<updated>2011-08-11T12:36:47Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=202396#p202396</id>
		</entry>
</feed>
