<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://iredmail.org/wiki/skins/common/feed.css?207"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Upgrade/iRedMail/0.7.4-rc3-0.7.4 - Revision history</title>
		<link>http://iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.4-rc3-0.7.4&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.15.5</generator>
		<lastBuildDate>Wed, 22 May 2013 14:53:28 GMT</lastBuildDate>
		<item>
			<title>ZhangHuangbin:&amp;#32;Created page with '__TOC__  This upgrade tutorial is applicable to iRedMail-0.7.4-rc3, used to upgrade to 0.7.4 stable release.  = General =  == [Debian and Ubuntu special] Assign Apache daemon use…'</title>
			<link>http://iredmail.org/wiki/index.php?title=Upgrade/iRedMail/0.7.4-rc3-0.7.4&amp;diff=1925&amp;oldid=prev</link>
			<description>&lt;p&gt;Created page with &amp;#39;__TOC__  This upgrade tutorial is applicable to iRedMail-0.7.4-rc3, used to upgrade to 0.7.4 stable release.  = General =  == [Debian and Ubuntu special] Assign Apache daemon use…&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__TOC__&lt;br /&gt;
&lt;br /&gt;
This upgrade tutorial is applicable to iRedMail-0.7.4-rc3, used to upgrade to 0.7.4 stable release.&lt;br /&gt;
&lt;br /&gt;
= General =&lt;br /&gt;
&lt;br /&gt;
== [Debian and Ubuntu special] Assign Apache daemon user to group &amp;quot;adm&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
'''Note''': This fix is applicable to only Debian and Ubuntu.&lt;br /&gt;
&lt;br /&gt;
Assign Apache daemon user to group &amp;quot;adm&amp;quot; to avoid Awstats cron job issue.&lt;br /&gt;
&lt;br /&gt;
{{cmd|&amp;lt;pre&amp;gt;&lt;br /&gt;
# usermod -g adm www-data&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
= OpenLDAP backend special =&lt;br /&gt;
No changes.&lt;br /&gt;
&lt;br /&gt;
= MySQL backend special =&lt;br /&gt;
&lt;br /&gt;
== Store realtime mailbox quota usage in seperate SQL table ==&lt;br /&gt;
'''Summary''':&lt;br /&gt;
&lt;br /&gt;
In iRedMail-0.7.3 and some earlier versions, Dovecot stores realtime mailbox quota usage in MySQL database in two columns: '''mailbox.bytes''', '''mailbox.messages''', if they have invalid values (e.g. empty value, non-integer value), Dovecot will update them with two SQL commands:&lt;br /&gt;
&lt;br /&gt;
# First one: delete record. (DELETE FROM mailbox WHERE username='xxx@yyy.com')&lt;br /&gt;
# Second: create a new record with current, correct quota info. (INSERT INTO mailbox (username, bytes, messages) VALUES ('xxx@yyy.com', xx, xx))&lt;br /&gt;
&lt;br /&gt;
First one will delete iRedMail mail user, that's the problem. User [http://www.iredmail.org/forum/topic2641-user-suddenly-gone-from-iredmail.html OviVan reports this issue] after migrated user mailboxes to iRedMail-0.7.3.&lt;br /&gt;
&lt;br /&gt;
So we have to store realtime mailbox quota usage in a separate MySQL table to avoid similar issues.&lt;br /&gt;
&lt;br /&gt;
'''Below are steps to store realtime mailbox quota usage in a separate SQL table:'''&lt;br /&gt;
&lt;br /&gt;
* Create new SQL table '''vmail.used_quota''' to store mailbox quota:&lt;br /&gt;
{{cmd|&amp;lt;pre&amp;gt;&lt;br /&gt;
# mysql -uroot -p&lt;br /&gt;
mysql&amp;gt; USE vmail;&lt;br /&gt;
mysql&amp;gt; CREATE TABLE IF NOT EXISTS `used_quota` (&lt;br /&gt;
    `username` VARCHAR(255) NOT NULL,&lt;br /&gt;
    `bytes` BIGINT NOT NULL DEFAULT 0,&lt;br /&gt;
    `messages` BIGINT NOT NULL DEFAULT 0,&lt;br /&gt;
    PRIMARY KEY (`username`)&lt;br /&gt;
) ENGINE=InnoDB DEFAULT CHARSET=utf8;&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
* Replace '''table = mailbox''' with '''table = used_quota''' in below config file, so that Dovecot will store mailbox quota in new SQL table. &lt;br /&gt;
** On RHEL/CentOS/Scientific Linux 5.x, please update '''/etc/dovecot-used-quota.conf''', on 6.x, please update '''/etc/dovecot/used-quota.conf'''.&lt;br /&gt;
** On Debian/Ubuntu, please update '''/etc/dovecot/dovecot-used-quota.conf'''.&lt;br /&gt;
** On openSUSE, please update '''/etc/dovecot/dovecot-used-quota.conf'''.&lt;br /&gt;
** On FreeBSD, please update '''/usr/local/etc/dovecot-used-quota.conf'''.&lt;br /&gt;
&lt;br /&gt;
* Restarting Dovecot service is required.&lt;/div&gt;</description>
			<pubDate>Sun, 08 Jan 2012 17:55:17 GMT</pubDate>			<dc:creator>ZhangHuangbin</dc:creator>			<comments>http://iredmail.org/wiki/index.php?title=Talk:Upgrade/iRedMail/0.7.4-rc3-0.7.4</comments>		</item>
	</channel>
</rss>