<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — Sieve bugs in iRedAdmin-Mysql-Pro-1.5.1]]></title>
		<link>http://www.iredmail.org/forum/topic4069-sieve-bugs-in-iredadminmysqlpro151.html</link>
		<atom:link href="http://www.iredmail.org/forum/feed-rss-topic4069.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Sieve bugs in iRedAdmin-Mysql-Pro-1.5.1.]]></description>
		<lastBuildDate>Wed, 24 Oct 2012 03:39:50 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Sieve bugs in iRedAdmin-Mysql-Pro-1.5.1]]></title>
			<link>http://www.iredmail.org/forum/post18806.html#p18806</link>
			<description><![CDATA[<p>完美解决，jood job！</p>]]></description>
			<author><![CDATA[null@example.com (thatday)]]></author>
			<pubDate>Wed, 24 Oct 2012 03:39:50 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post18806.html#p18806</guid>
		</item>
		<item>
			<title><![CDATA[Re: Sieve bugs in iRedAdmin-Mysql-Pro-1.5.1]]></title>
			<link>http://www.iredmail.org/forum/post18801.html#p18801</link>
			<description><![CDATA[<p>抱歉。请在已经打过补丁的版本上再打这个补丁：<br /></p><div class="codebox"><pre><code>diff -r 744053b4657c libs/mysql/user.py
--- a/libs/mysql/user.py    Tue Oct 23 21:08:30 2012 +0800
+++ b/libs/mysql/user.py    Wed Oct 24 08:18:00 2012 +0800
@@ -599,11 +599,12 @@
                 pass
 
         elif self.profile_type == &#039;advanced&#039;:
-            # Get enabled services.
+            # Get enabled/disabled services.
             self.enabledService = [str(v).lower()
                                    for v in data.get(&#039;enabledService&#039;, [])
                                    if v in ENABLED_SERVICES
                                   ]
+            self.disabledService = []
 
             # Append &#039;sieve&#039;, &#039;sievesecured&#039; for dovecot-1.2.
             if &#039;enablemanagesieve&#039; in self.enabledService:
@@ -616,7 +617,7 @@
             else:
                 self.disabledService += [&#039;enablesievesecured&#039;]
 
-            self.disabledService = [v for v in ENABLED_SERVICES if v not in self.enabledService]
+            self.disabledService += [v for v in ENABLED_SERVICES if v not in self.enabledService]
 
             # Enable/disable services.
             for srv in self.enabledService:</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Wed, 24 Oct 2012 00:18:43 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post18801.html#p18801</guid>
		</item>
		<item>
			<title><![CDATA[Re: Sieve bugs in iRedAdmin-Mysql-Pro-1.5.1]]></title>
			<link>http://www.iredmail.org/forum/post18797.html#p18797</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>这个补丁同时修正了你反馈的这个问题：<br /><a href="http://www.iredmail.org/forum/post18793.html#p18793">http://www.iredmail.org/forum/post18793.html#p18793</a></p></blockquote></div><p>我打了这个补丁之后，勾选“自定义邮件过滤规则”和“自定义邮件过滤规则（使用 TLS/SSL 加密传输）”能够正确保存，数据库里四个字段enablemanagesieve，enablemanagesievesecured，enablesieve，enablesievesecured的值均为1.</p><p>但“自定义邮件过滤规则”和“自定义邮件过滤规则（使用 TLS/SSL 加密传输）”其中之一不勾选的话，仍然不能保存，网页出现“internal server error”。</p><p>后台httpd日志如下：</p><div class="codebox"><pre><code>   File &quot;/var/www/iredadmin/controllers/decorators.py&quot;, line 33, in decorated
     return f(*args, **kw)
   File &quot;/var/www/iredadmin/controllers/decorators.py&quot;, line 11, in proxyfunc
     return func(self, *args, **kw)
   File &quot;/var/www/iredadmin/controllers/mysql/user.py&quot;, line 191, in POST
     data=i,
   File &quot;/var/www/iredadmin/libs/mysql/decorators.py&quot;, line 22, in proxyfunc
     return func(*args, **kw)
   File &quot;/var/www/iredadmin/libs/mysql/user.py&quot;, line 612, in update
     self.disabledService += [&#039;enablesieve&#039;]
 AttributeError: User instance has no attribute &#039;disabledService&#039;</code></pre></div><p>应该还是有点问题，请站长费心。</p>]]></description>
			<author><![CDATA[null@example.com (thatday)]]></author>
			<pubDate>Tue, 23 Oct 2012 14:41:47 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post18797.html#p18797</guid>
		</item>
		<item>
			<title><![CDATA[Re: Sieve bugs in iRedAdmin-Mysql-Pro-1.5.1]]></title>
			<link>http://www.iredmail.org/forum/post18794.html#p18794</link>
			<description><![CDATA[<p>这个补丁同时修正了你反馈的这个问题：<br /><a href="http://www.iredmail.org/forum/post18793.html#p18793">http://www.iredmail.org/forum/post18793.html#p18793</a></p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Tue, 23 Oct 2012 13:19:16 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post18794.html#p18794</guid>
		</item>
		<item>
			<title><![CDATA[Sieve bugs in iRedAdmin-Mysql-Pro-1.5.1]]></title>
			<link>http://www.iredmail.org/forum/post18785.html#p18785</link>
			<description><![CDATA[<p>==== Required information ====<br />- iRedMail version: 0.8.3<br />- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql<br />- Linux/BSD distribution name and version: centos 6.3<br />- Related log if you&#039;re reporting an issue: <br />==== </p><p>我今天又测试了一下sieve功能，<br />数据库里面，有四个字段enablemanagesieve，enablemanagesievesecured，enablesieve，enablesievesecured，<br />在iredadmin后台的“用户属性-高级设置”里，只要点保存更改，数据库里的enablesieve，enablesievesecured都会变成0，<br />即使勾上“自定义邮件过滤规则+自定义邮件过滤规则（使用TLS/SSL加密传输）”，只要保存设置，后面两个字段都会变成0，而enablemanagesieve，enablemanagesievesecured两个字段则分别能保存设置。</p><p>看到libs/mysql/user.py里有如下代码：<br /></p><div class="codebox"><pre><code>if &#039;enablemanagesieve&#039; in self.enabledService:
self.enabledService += [&#039;enablesieve&#039;]
else:
self.disabledService += [&#039;enablesieve&#039;]

if &#039;enablemanagesievesecured&#039; in self.enabledService:
self.enabledService += [&#039;enablesievesecured&#039;]
else:
self.disabledService += [&#039;enablesievesecured&#039;]</code></pre></div><p>我看到这段代码，原则上是勾选了enablemanagesieve，那么enablesieve也会生效，<br />同样勾选了enablemanagesievesecured&#039;，enablesievesecured亦会生效，<br />但不知道为什么，只要保存，后面两个字段都为0了。</p>]]></description>
			<author><![CDATA[null@example.com (thatday)]]></author>
			<pubDate>Tue, 23 Oct 2012 09:18:21 +0000</pubDate>
			<guid>http://www.iredmail.org/forum/post18785.html#p18785</guid>
		</item>
	</channel>
</rss>
