<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — Automatically delete quarantined mail]]></title>
		<link>https://forum.iredmail.org/topic1692-automatically-delete-quarantined-mail.html</link>
		<atom:link href="https://forum.iredmail.org/feed-rss-topic1692.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Automatically delete quarantined mail.]]></description>
		<lastBuildDate>Tue, 22 Feb 2011 09:42:39 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Automatically delete quarantined mail]]></title>
			<link>https://forum.iredmail.org/post7894.html#p7894</link>
			<description><![CDATA[<div class="quotebox"><cite>robynhub wrote:</cite><blockquote><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AND time_num&nbsp; &lt; DATE_SUB(NOW(), INTERVAL 7 DAY);</p></blockquote></div><p>Yours is better, thanks. <img src="https://forum.iredmail.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Committed into iRedAdmin-Pro, use DATE_SUB() for all time compare</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Tue, 22 Feb 2011 09:42:39 +0000</pubDate>
			<guid>https://forum.iredmail.org/post7894.html#p7894</guid>
		</item>
		<item>
			<title><![CDATA[Re: Automatically delete quarantined mail]]></title>
			<link>https://forum.iredmail.org/post7893.html#p7893</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>Try delete quarantined mails older than 7 days from MySQL database:<br /></p><div class="codebox"><pre><code>$ mysql -uroot -p
mysql&gt; USE amavisd;
mysql&gt; DELETE FROM msgs \
        WHERE content IN (&#039;S&#039;, &#039;s&#039;, &#039;V&#039;, &#039;Y&#039;) \
        AND quar_type IN (&#039;Q&#039;, &#039;F&#039;) \
        AND UNIX_TIMESTAMP()-time_num &gt; 604800</code></pre></div><p>604800 = 7 (days) x 24 (hours) x 60 (minutes) x 60 (seconds)</p></blockquote></div><p>I even prefer </p><div class="codebox"><pre><code>DELETE FROM msgs\
          WHERE content IN (&#039;S&#039;, &#039;s&#039;, &#039;V&#039;, &#039;Y&#039;)\
          AND quar_type IN (&#039;Q&#039;, &#039;F&#039;)\
          AND time_num  &lt; DATE_SUB(NOW(), INTERVAL 7 DAY);</code></pre></div><p>Thanks again.</p>]]></description>
			<author><![CDATA[null@example.com (robynhub)]]></author>
			<pubDate>Tue, 22 Feb 2011 09:33:31 +0000</pubDate>
			<guid>https://forum.iredmail.org/post7893.html#p7893</guid>
		</item>
		<item>
			<title><![CDATA[Re: Automatically delete quarantined mail]]></title>
			<link>https://forum.iredmail.org/post7892.html#p7892</link>
			<description><![CDATA[<p>Thanks a lot!</p>]]></description>
			<author><![CDATA[null@example.com (robynhub)]]></author>
			<pubDate>Tue, 22 Feb 2011 09:27:25 +0000</pubDate>
			<guid>https://forum.iredmail.org/post7892.html#p7892</guid>
		</item>
		<item>
			<title><![CDATA[Re: Automatically delete quarantined mail]]></title>
			<link>https://forum.iredmail.org/post7891.html#p7891</link>
			<description><![CDATA[<p>Try delete quarantined mails older than 7 days from MySQL database:<br /></p><div class="codebox"><pre><code>$ mysql -uroot -p
mysql&gt; USE amavisd;
mysql&gt; DELETE FROM msgs \
        WHERE content IN (&#039;S&#039;, &#039;s&#039;, &#039;V&#039;, &#039;Y&#039;) \
        AND quar_type IN (&#039;Q&#039;, &#039;F&#039;) \
        AND UNIX_TIMESTAMP()-time_num &gt; 604800</code></pre></div><p>604800 = 7 (days) x 24 (hours) x 60 (minutes) x 60 (seconds)</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Tue, 22 Feb 2011 08:51:50 +0000</pubDate>
			<guid>https://forum.iredmail.org/post7891.html#p7891</guid>
		</item>
		<item>
			<title><![CDATA[Re: Automatically delete quarantined mail]]></title>
			<link>https://forum.iredmail.org/post7890.html#p7890</link>
			<description><![CDATA[<p>You can change &quot;AMAVISD_REMOVE_QUARANTINED_IN_DAYS&quot; in libs/iredutils.py, but it requires you to access iRedAdmin-Pro, then it will delete all quarantined mails older than the days you specified.</p><p>Do you prefer to delete them via crontab job?</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Tue, 22 Feb 2011 08:35:43 +0000</pubDate>
			<guid>https://forum.iredmail.org/post7890.html#p7890</guid>
		</item>
		<item>
			<title><![CDATA[Automatically delete quarantined mail]]></title>
			<link>https://forum.iredmail.org/post7889.html#p7889</link>
			<description><![CDATA[<p>There is any way to delete automatically quarantined mail after X days in iRedAdmin-Pro 1.4?<br />Even a console command that I can invoke by crontab will be useful.</p><p>Thanks in advance.</p>]]></description>
			<author><![CDATA[null@example.com (robynhub)]]></author>
			<pubDate>Tue, 22 Feb 2011 07:39:04 +0000</pubDate>
			<guid>https://forum.iredmail.org/post7889.html#p7889</guid>
		</item>
	</channel>
</rss>
