<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — Hotfix for iRedMail-0.8.4: Incorrect logrotate config file of iRedAPD]]></title>
		<link>https://forum.iredmail.org/topic4716-hotfix-for-iredmail084-incorrect-logrotate-config-file-of-iredapd.html</link>
		<atom:link href="https://forum.iredmail.org/feed-rss-topic4716.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Hotfix for iRedMail-0.8.4: Incorrect logrotate config file of iRedAPD.]]></description>
		<lastBuildDate>Tue, 09 Apr 2013 16:44:59 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Hotfix for iRedMail-0.8.4: Incorrect logrotate config file of iRedAPD]]></title>
			<link>https://forum.iredmail.org/post21414.html#p21414</link>
			<description><![CDATA[<p>Done; thanks!</p>]]></description>
			<author><![CDATA[null@example.com (Bronko)]]></author>
			<pubDate>Tue, 09 Apr 2013 16:44:59 +0000</pubDate>
			<guid>https://forum.iredmail.org/post21414.html#p21414</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hotfix for iRedMail-0.8.4: Incorrect logrotate config file of iRedAPD]]></title>
			<link>https://forum.iredmail.org/post21404.html#p21404</link>
			<description><![CDATA[<p>Hi Bronko,</p><p>You can modify /etc/init.d/iredapd, to sleep 2 seconds before starting it again.<br />Find below line in /etc/init.d/iredapd:<br /></p><div class="codebox"><pre><code>    restart) stop &amp;&amp; start ;;</code></pre></div><p>Modify it to:<br /></p><div class="codebox"><pre><code>    restart) stop &amp;&amp; sleep 2 &amp;&amp; start ;;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Tue, 09 Apr 2013 13:35:54 +0000</pubDate>
			<guid>https://forum.iredmail.org/post21404.html#p21404</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hotfix for iRedMail-0.8.4: Incorrect logrotate config file of iRedAPD]]></title>
			<link>https://forum.iredmail.org/post21401.html#p21401</link>
			<description><![CDATA[<p>The same here, </p><p>no /etc/logrotate.d/iredapd </p><p>on an upgraded 0.8.3 to 0.8.4 before Apr 6, 2013 ubuntu 12.04 without configuration in the other config files.<br />I&#039;ve created it as mentioned.</p><p>On last sunday (after upgrade 0.8.3 -&gt; 0.8.4) I have received these via mail to root:<br /></p><div class="codebox"><pre><code>Subject: Cron &lt;root@hostname&gt; test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts --report /etc/cron.daily )</code></pre></div><div class="codebox"><pre><code>/etc/cron.daily/logrotate:
Stopping iredapd ...
Starting iredapd ...
iredapd is already stopped.
Starting iredapd ...
Traceback (most recent call last):
  File &quot;/opt/iredapd/iredapd.py&quot;, line 166, in &lt;module&gt;
    main()
  File &quot;/opt/iredapd/iredapd.py&quot;, line 143, in main
    DaemonSocket((settings.listen_address, int(settings.listen_port)))
  File &quot;/opt/iredapd/iredapd.py&quot;, line 94, in __init__
    self.bind(localaddr)
  File &quot;/usr/lib/python2.7/asyncore.py&quot;, line 341, in bind
    return self.socket.bind(addr)
  File &quot;/usr/lib/python2.7/socket.py&quot;, line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Bronko)]]></author>
			<pubDate>Tue, 09 Apr 2013 11:55:21 +0000</pubDate>
			<guid>https://forum.iredmail.org/post21401.html#p21401</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hotfix for iRedMail-0.8.4: Incorrect logrotate config file of iRedAPD]]></title>
			<link>https://forum.iredmail.org/post21380.html#p21380</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>As mentioned in my post, you can now verify this config file with command &quot;logrotate&quot; like below, it will print debug message on terminal.<br /></p><div class="codebox"><pre><code># logrotate -d /etc/logrotate.d/iredapd</code></pre></div></blockquote></div><p>I&#039;m sorry :-)<br />This is the output:</p><div class="codebox"><pre><code>[root@mx ~]# logrotate -d /etc/logrotate.d/iredapd
reading config file /etc/logrotate.d/iredapd
reading config info for /var/log/iredapd.log
compress_prog is now /usr/bin/bzip2
uncompress_prog is now /usr/bin/bunzip2
compress_options is now -9
compress_ext is now .bz2

Handling 1 logs

rotating pattern: /var/log/iredapd.log  weekly (10 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/iredapd.log
  log does not need rotating
not running postrotate script, since no logs were rotated</code></pre></div><p>seems to be ok now...</p>]]></description>
			<author><![CDATA[null@example.com (agattei)]]></author>
			<pubDate>Mon, 08 Apr 2013 13:42:43 +0000</pubDate>
			<guid>https://forum.iredmail.org/post21380.html#p21380</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hotfix for iRedMail-0.8.4: Incorrect logrotate config file of iRedAPD]]></title>
			<link>https://forum.iredmail.org/post21377.html#p21377</link>
			<description><![CDATA[<p>As mentioned in my post, you can now verify this config file with command &quot;logrotate&quot; like below, it will print debug message on terminal.<br /></p><div class="codebox"><pre><code># logrotate -d /etc/logrotate.d/iredapd</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 08 Apr 2013 13:27:37 +0000</pubDate>
			<guid>https://forum.iredmail.org/post21377.html#p21377</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hotfix for iRedMail-0.8.4: Incorrect logrotate config file of iRedAPD]]></title>
			<link>https://forum.iredmail.org/post21375.html#p21375</link>
			<description><![CDATA[<p>Hi Zhang, thank you for your reply.<br />This is the output of ls command:</p><div class="codebox"><pre><code>[root@mx logrotate.d]# ls -al
total 56
drwxr-xr-x.  2 root root 4096 Oct  6  2012 .
drwxr-xr-x. 71 root root 4096 Mar 29 00:27 ..
-rw-r--r--   1 root root  161 Sep 23  2012 clamav
-rw-r--r--   1 root root  551 May 21  2012 dovecot
-rw-r--r--.  1 root root  103 Dec  8  2011 dracut
-rw-r--r--.  1 root root  198 Mar  4  2011 fail2ban
-rw-r--r--   1 root root   92 Sep 23  2012 freshclam
-rw-r--r--.  1 root root  185 Jun 24  2010 httpd
-rw-r--r--.  1 root root  173 Dec  8  2011 iscsiuiolog
-rw-r--r--.  1 root root   68 Aug 23  2010 sa-update
-rw-r--r--.  1 root root   81 Jul  2  2010 shorewall
-rw-r--r--.  1 root root  377 Jan  9  2012 sieve
-rw-r--r--.  1 root root  210 Aug  2  2011 syslog
-rw-r--r--.  1 root root  100 Dec  8  2011 yum</code></pre></div><p>now I have created the config file manually (the path to bzip2 and bunzip2 was /usr/bin/...)</p><p>After that I have restart iredapd, now how can I check if it&#039;s all ok?</p>]]></description>
			<author><![CDATA[null@example.com (agattei)]]></author>
			<pubDate>Mon, 08 Apr 2013 13:25:22 +0000</pubDate>
			<guid>https://forum.iredmail.org/post21375.html#p21375</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hotfix for iRedMail-0.8.4: Incorrect logrotate config file of iRedAPD]]></title>
			<link>https://forum.iredmail.org/post21363.html#p21363</link>
			<description><![CDATA[<p>Hi agattei,</p><p>All Linux distribution should have /etc/logrotate.d/iredapd, no idea about why it wasn&#039;t there on your server.</p><p>1) Please check whether iRedAPD log file was configured to rotated in other config files under /etc/logrotate.d/.<br />2) If not configured, you can create it manually with below content:<br /></p><div class="codebox"><pre><code>/var/log/iredapd.log {
    compress
    weekly
    rotate 10
    create 0600 root root
    missingok

    # Use bzip2 for compress.
    compresscmd /bin/bzip2
    uncompresscmd /bin/bunzip2
    compressoptions -9
    compressext .bz2

    postrotate
        /etc/init.d/iredapd restart
    endscript
}</code></pre></div><p>Note: Make sure you have correct paths to bzip2 and bunzip2.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 08 Apr 2013 12:33:33 +0000</pubDate>
			<guid>https://forum.iredmail.org/post21363.html#p21363</guid>
		</item>
		<item>
			<title><![CDATA[Re: Hotfix for iRedMail-0.8.4: Incorrect logrotate config file of iRedAPD]]></title>
			<link>https://forum.iredmail.org/post21347.html#p21347</link>
			<description><![CDATA[<p>I Zhang, I have recently update to iredmail 0.8.4, but seems that /etc/logrotate.d/iredapd doesn&#039;t exist on my server, is it possible?</p><p>==== Required information ====<br />- iRedMail version: 0.8.4 (First installed version 0.7.4)<br />- Store mail accounts in which backend (LDAP/MySQL/PGSQL): iRedAdmin-Pro v1.6.0 MySql (First version 1.4.0)<br />- Linux/BSD distribution name and version: CentOS 6.2 x64<br />- Related log if you&#039;re reporting an issue: <br />====</p>]]></description>
			<author><![CDATA[null@example.com (agattei)]]></author>
			<pubDate>Sun, 07 Apr 2013 23:56:25 +0000</pubDate>
			<guid>https://forum.iredmail.org/post21347.html#p21347</guid>
		</item>
		<item>
			<title><![CDATA[Hotfix for iRedMail-0.8.4: Incorrect logrotate config file of iRedAPD]]></title>
			<link>https://forum.iredmail.org/post21329.html#p21329</link>
			<description><![CDATA[<h5>Issue description</h5><p>There&#039;s an typo error in logrotate config file of iRedAPD (/etc/logrotate.d/iredapd) on all Linux distributions supported by iRedMail, it causes program &quot;logrotate&quot; cannot rotate iRedAPD log file (/var/log/iredapd.log) at all. The potential risk is that the log file may takes too much disk space if it grows quickly.</p><h5>Impacted iRedMail versions</h5><ul><li><p>Version iRedMail-0.8.4, downloaded before Apr 6, 2013.</p></li></ul><p>Notes:<br /></p><ul><li><p>You can see a timestamp in file /etc/logrotate.d/iredapd, that shows when you installed iRedMail. e.g. &quot;File generated by iRedMail (2013.04.03.11.40.51)&quot; (format is YEAR.MONTH.DAY.HOUR.MINUTE.SECOND).</p></li><li><p>We re-packed iRedMail-0.8.4 on Apr 6, 2013, so there&#039;s no need to fix it if you downloaded iRedMail-0.8.4 after that day, which means you can safely ignore this hotfix.</p></li><li><p>You don&#039;t need this hotfix if your server was upgraded from an old release. e.g. 0.8.3.</p></li></ul><h5>Impacted Linux/BSD distributions</h5><p>It impacts all LINUX distributions supported by iRedMail, but not BSD distributions since they use different logrotate config file.</p><h5>How to fix it</h5><p>Please fix it manually by following below steps:</p><ul><li><p>Open /etc/logrotate.d/iredapd with your favorite text editor (e.g. vi, vim, emacs), find below line:</p></li></ul><div class="codebox"><pre><code>/var/log/iredapd.log</code></pre></div><ul><li><p>Append a whitespace and a &#039;{&#039;:</p></li></ul><div class="codebox"><pre><code>/var/log/iredapd.log {</code></pre></div><ul><li><p>You can now verify this config file with command &quot;logrotate&quot; like below, it will print debug message on terminal.</p></li></ul><div class="codebox"><pre><code># logrotate -d /etc/logrotate.d/iredapd</code></pre></div><p>That&#039;s all.</p><h5>Credit</h5><p>All credit goes to our forum user <strong>bantopalmarino</strong>, thanks for the report here: <a href="http://www.iredmail.org/forum/post21327.html#p21327">http://www.iredmail.org/forum/post21327.html#p21327</a></p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Sat, 06 Apr 2013 00:05:56 +0000</pubDate>
			<guid>https://forum.iredmail.org/post21329.html#p21329</guid>
		</item>
	</channel>
</rss>
