<span id="spnSign20135242327"></span><div><div>Thank you<font face="verdana, Arial, Helvetica, sans-serif"><span style="line-height: 19px;">&nbsp;Glenn! I will try as you say.Actually my&nbsp;Knowledge of MailScanner is poor :), so it will take me to spend several days to try it. And i will reply my job then.</span></font></div><div><font face="verdana, Arial, Helvetica, sans-serif"><span style="line-height: 19px;">Thanks again Glenn!</span></font></div></div><div>&nbsp;</div>------------------ 原始邮件 ------------------<br><br>发件人:Glenn Steen <glenn.steen@gmail.com><br>时 间:2013/05/24 20:32:10 星期五<br>收件人:MailScanner discussion <mailscanner@lists.mailscanner.info><br>抄送人:<br>主  题:Re: MailScanner SpamAssassin Timeout cause CPU100%<br><br>On 24 May 2013 11:50, 东风 <dongwind@21cn.com> wrote:<br>&gt; hi,Martin,could you tell me more please,i see the url,but can't understand<br>&gt; how to use the cron-job method instead of Bayes expirey options.<br>&gt;<br>(snip)<br>What Martin is getting at is that you can create a cron job that does<br>"sa-learn --force-expire", scheduled to some "off hour" in the middle<br>of the night,  and (in spam.assassin.prefs.conf or similar) disable<br>auto-expire of the database.<br>But to see if this is really the problem you have, you can do a couple<br>of manual "sa-learn --force-expire" and time them. If you set the SA<br>timeout too low (which I'm almost certain you have done!), the expiry<br>will never finish ... which leads to more work next time etc. Increase<br>your SA timeout to at least 5 minutes.<br>Also, if you have any files named like bayes_toks.expire<numbers>, you<br>very likely have the expiry problem. Forcing an expire may be all you<br>need do to alleviate the problem, in which case you needn't bother<br>with the cron job/disabling auto-expiry... Experimentation will be<br>needed to tell which is best in your particular case;-)<br><br>Another thing to look at, which can have catastrophic ramifications if<br>it has happend, is if you have a bayes_seen file that have grown ...<br>huge... It will grow over time and in the end, updating it will<br>dominate the processing time of bayes... After all, IO in *nix is<br>almost always CPU-bound, so having to wade through a huge file for<br>every message/batch/child can become the thing that brings your system<br>to its knees.<br>If you do have a very large (100 MiB+) bayes_seen file, simply remove<br>it. If you want to play it safe, stop MailScanner, remove it and then<br>restart MailScanner.<br><br>Cheers!<br>-- <br>-- Glenn<br>email: glenn &lt; dot &gt; steen &lt; at &gt; gmail &lt; dot &gt; com<br>work: glenn &lt; dot &gt; steen &lt; at &gt; ap1 &lt; dot &gt; se<br>-- <br>MailScanner mailing list<br>mailscanner@lists.mailscanner.info<br>http://lists.mailscanner.info/mailman/listinfo/mailscanner<br><br>Before posting, read http://wiki.mailscanner.info/posting<br><br>Support MailScanner development - buy the book off the website! <br></numbers></dongwind@21cn.com></mailscanner@lists.mailscanner.info></glenn.steen@gmail.com><br><br>---------------------------------------<br><font size=2><a href="http://mail.21cn.com/m/21cn/index.html " target="_blank">21CN手机邮Android客户端,邮件随身享! </a><br></font>