<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Case &#187; dovecot</title>
	<atom:link href="http://case.net.ru/tag/dovecot/feed/" rel="self" type="application/rss+xml" />
	<link>http://case.net.ru</link>
	<description>Just another technical weblog</description>
	<lastBuildDate>Sun, 29 Jan 2012 08:48:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Сортировка почты с помощью Dovecot Sieve</title>
		<link>http://case.net.ru/2009/03/05/dovecot-sieve/</link>
		<comments>http://case.net.ru/2009/03/05/dovecot-sieve/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 11:57:55 +0000</pubDate>
		<dc:creator>Case</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[sieve]]></category>

		<guid isPermaLink="false">http://case.net.ru/?p=356</guid>
		<description><![CDATA[Что имеется: postfix + mysql + dovecot как imap сервер + roundcube Задача: сделать так, что бы письма с пометкой SPAM ложились в каталог Junk, а не Inbox. Собираем Dovecot с поддержкой LDA: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 &#91;root@case.net.ru&#93;$ cd /usr/ports/mail/dovecot &#91;root@case.net.ru&#93;$ [...]]]></description>
			<content:encoded><![CDATA[<p>Что имеется: postfix + mysql + dovecot как imap сервер + roundcube<br />
Задача: сделать так, что бы письма с пометкой SPAM ложились в каталог Junk, а не Inbox.</p>
<p>Собираем Dovecot с поддержкой LDA:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>case.net.ru<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>ports<span style="color: #000000; font-weight: bold;">/</span>mail<span style="color: #000000; font-weight: bold;">/</span>dovecot
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>case.net.ru<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">make</span> showconfig
===<span style="color: #000000; font-weight: bold;">&gt;</span> The following configuration options are available <span style="color: #000000; font-weight: bold;">for</span> dovecot-1.1.11:
     <span style="color: #007800;">KQUEUE</span>=on <span style="color: #ff0000;">&quot;kqueue(2) support&quot;</span>
     <span style="color: #007800;">SSL</span>=off <span style="color: #ff0000;">&quot;SSL support&quot;</span>
     <span style="color: #007800;">IPV6</span>=off <span style="color: #ff0000;">&quot;IPv6 support&quot;</span>
     <span style="color: #007800;">POP3</span>=off <span style="color: #ff0000;">&quot;POP3 support&quot;</span>
     <span style="color: #007800;">LDA</span>=on <span style="color: #ff0000;">&quot;LDA support&quot;</span>
     <span style="color: #007800;">MANAGESIEVE</span>=off <span style="color: #ff0000;">&quot;ManageSieve support&quot;</span>
     <span style="color: #007800;">GSSAPI</span>=off <span style="color: #ff0000;">&quot;GSSAPI support&quot;</span>
     <span style="color: #007800;">VPOPMAIL</span>=off <span style="color: #ff0000;">&quot;VPopMail support&quot;</span>
     <span style="color: #007800;">BDB</span>=off <span style="color: #ff0000;">&quot;BerkleyDB support&quot;</span>
     <span style="color: #007800;">LDAP</span>=off <span style="color: #ff0000;">&quot;OpenLDAP support&quot;</span>
     <span style="color: #007800;">PGSQL</span>=off <span style="color: #ff0000;">&quot;PostgreSQL support&quot;</span>
     <span style="color: #007800;">MYSQL</span>=on <span style="color: #ff0000;">&quot;MySQL support&quot;</span>
     <span style="color: #007800;">SQLITE</span>=off <span style="color: #ff0000;">&quot;SQLite support&quot;</span>
===<span style="color: #000000; font-weight: bold;">&gt;</span> Use <span style="color: #ff0000;">'make config'</span> to modify these settings
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>case.net.ru<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> clean</pre></td></tr></table></div>

<p>Устанавливаем dovecot-sieve:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>case.net.ru<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>ports<span style="color: #000000; font-weight: bold;">/</span>mail<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>case.net.ru<span style="color: #7a0874; font-weight: bold;">&#93;</span>$ <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> clean</pre></td></tr></table></div>

<p>Настраиваем postfix:<br />
Добавляем в master.cf:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">dovecot   unix  -       n       n       -       -       pipe
  <span style="color: #007800;">flags</span>=DRhu <span style="color: #007800;">user</span>=vmail:vmail <span style="color: #007800;">argv</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>libexec<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>deliver <span style="color: #660033;">-f</span> <span style="color: #800000;">${sender}</span> <span style="color: #660033;">-d</span> <span style="color: #800000;">${recipient}</span></pre></td></tr></table></div>

<p>Меняем в main.cf:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">virtual_transport = dovecot</pre></td></tr></table></div>

<p>Меняем в dovecot.conf:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">protocol lda <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  postmaster_address = <span style="color: #000000; font-weight: bold;">case</span><span style="color: #000000; font-weight: bold;">@</span>case.net.ru
  <span style="color: #c20cb9; font-weight: bold;">hostname</span> = case.net.ru
  mail_plugins = cmusieve
  mail_plugin_dir = <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>lda
  sendmail_path = <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">sendmail</span>
  sieve_global_path = <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>vmail<span style="color: #000000; font-weight: bold;">/</span>dovecot-sieve.conf
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
auth default <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  socket listen <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    master <span style="color: #7a0874; font-weight: bold;">&#123;</span>
      path = <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>dovecot<span style="color: #000000; font-weight: bold;">/</span>auth-master
      mode = 0600
      user = vmail
      group = vmail
    <span style="color: #7a0874; font-weight: bold;">&#125;</span>
  <span style="color: #7a0874; font-weight: bold;">&#125;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></td></tr></table></div>

<p>Настраиваем sieve в файле /usr/home/vmail/dovecot-sieve.conf:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">require <span style="color: #ff0000;">&quot;fileinto&quot;</span>;
<span style="color: #000000; font-weight: bold;">if</span> header :contains <span style="color: #ff0000;">&quot;Subject&quot;</span> <span style="color: #ff0000;">&quot;SPAM&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  fileinto <span style="color: #ff0000;">&quot;Junk&quot;</span>;
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://case.net.ru/2009/03/05/dovecot-sieve/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Личный почтовый ящик</title>
		<link>http://case.net.ru/2008/09/28/mailbox/</link>
		<comments>http://case.net.ru/2008/09/28/mailbox/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 16:44:00 +0000</pubDate>
		<dc:creator>Case</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dovecot]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[roundcube]]></category>

		<guid isPermaLink="false">http://case.net.ru/2008/09/28/%d0%bb%d0%b8%d1%87%d0%bd%d1%8b%d0%b9-%d0%bf%d0%be%d1%87%d1%82%d0%be%d0%b2%d1%8b%d0%b9-%d1%8f%d1%89%d0%b8%d0%ba/</guid>
		<description><![CDATA[postfix (smtpd) + dovecot (imapd) + roundcube webmail (web interface for imapd) + spamassassin dovecot.conf (только изменения) protocols = imap listen = 127.0.0.1 disable_plaintext_auth = no ssl_disable = yes mail_location = maildir:/usr/home/vmail/%u auth default { mechanisms = plain passdb sql { args = /usr/local/etc/dovecot-sql.conf } userdb static { args = uid=2011 gid=2011 home=/usr/home/vmail/%u } user [...]]]></description>
			<content:encoded><![CDATA[<p>postfix (smtpd) + dovecot (imapd) + roundcube webmail (web interface for imapd) + spamassassin<br />
<br />
dovecot.conf (только изменения)</p>
<blockquote><p><code>protocols = imap<br />
listen = 127.0.0.1<br />
disable_plaintext_auth = no<br />
ssl_disable = yes<br />
mail_location = maildir:/usr/home/vmail/%u<br />
auth default {<br />
  mechanisms = plain<br />
  passdb sql {<br />
    args = /usr/local/etc/dovecot-sql.conf<br />
  }<br />
  userdb static {<br />
    args = uid=2011 gid=2011 home=/usr/home/vmail/%u<br />
  }<br />
  user = vmail<br />
}</code></p></blockquote>
<p>spamassassin: /usr/local/etc/mail/spamassassin/local.cf</p>
<blockquote><p><code>rewrite_header Subject *****SPAM*****<br />
report_safe 0<br />
required_score 10.0<br />
use_bayes 1<br />
bayes_auto_learn 1</code></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://case.net.ru/2008/09/28/mailbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
