<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Linux Forum &mdash; dovecot-sql.conf  не правильный синтаксис SQL]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=15762</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=15762&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «dovecot-sql.conf  не правильный синтаксис SQL».]]></description>
		<lastBuildDate>Fri, 12 Aug 2011 06:13:06 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: dovecot-sql.conf  не правильный синтаксис SQL]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=202568#p202568</link>
			<description><![CDATA[<p>Что-то не заработало. Убирал знак \</p>]]></description>
			<author><![CDATA[null@example.com (AlfaStriker)]]></author>
			<pubDate>Fri, 12 Aug 2011 06:13:06 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=202568#p202568</guid>
		</item>
		<item>
			<title><![CDATA[Re: dovecot-sql.conf  не правильный синтаксис SQL]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=202404#p202404</link>
			<description><![CDATA[<p>Насколько я помню, dovecot очень плохо воспринимает переносы строк в конфиге. Попробуйте строку с запросом SQL не разбивать, а просто в одну строку запрос писать, без \</p>]]></description>
			<author><![CDATA[null@example.com (Hrafn)]]></author>
			<pubDate>Thu, 11 Aug 2011 12:50:48 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=202404#p202404</guid>
		</item>
		<item>
			<title><![CDATA[Re: dovecot-sql.conf  не правильный синтаксис SQL]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=202398#p202398</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (AlfaStriker)]]></author>
			<pubDate>Thu, 11 Aug 2011 12:39:21 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=202398#p202398</guid>
		</item>
		<item>
			<title><![CDATA[dovecot-sql.conf  не правильный синтаксис SQL]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=202396#p202396</link>
			<description><![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>]]></description>
			<author><![CDATA[null@example.com (AlfaStriker)]]></author>
			<pubDate>Thu, 11 Aug 2011 12:36:47 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=202396#p202396</guid>
		</item>
	</channel>
</rss>
