Subject: amavisd-new: Rotate the log file /var/log/amavis.log

From: Frederic MASSOT <[email-masked]>
Date: Fri, 09 Jul 2004 12:38:21 +0200

Package: amavisd-new
Version: 20030616p9-1
Severity: minor
Tags: patch

Hi, 

When the log file (/var/log/amavis.log) is enable, there is no rotation of this file.

Can you include in the package the following file :

cat /etc/logrotate.d/amavisd

/var/log/amavis.log {
        rotate 7
        weekly
        compress
        missingok
        create 0640 root root
        postrotate
                if [ -s /var/run/amavis/amavisd.pid ]; then kill -1 `cat /var/run/amavis/amavisd.pid`; fi
        endscript

}

Best regards.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.6
Locale: LANG=fr_FR@euro, LC_CTYPE=fr_FR@euro

Versions of packages amavisd-new depends on:
ii  adduser                       3.57       Add and remove users and groups
ii  file                          4.09-1     Determines file type using "magic"
ii  libarchive-tar-perl           1.08-1     Archive::Tar - manipulate tar file
ii  libarchive-zip-perl           1.05-1     Module for manipulation of ZIP arc
ii  libcompress-zlib-perl         1.16-1.1   Perl module for creation and manip
ii  libconvert-tnef-perl          0.17-3     Perl module to read TNEF files
ii  libconvert-uulib-perl         1.0.1-1    Perl interface to the uulib librar
pn  libdigest-md5-perl                       Not found.
ii  libmailtools-perl             1.62-1     Manipulate email in perl programs
pn  libmime-base64-perl                      Not found.
ii  libmime-perl                  5.411-3    Perl5 modules for MIME-compliant m
ii  libnet-perl                   1:1.18-4   Implementation of Internet protoco
ii  libnet-server-perl            0.85-3     An extensible, general perl server
ii  libunix-syslog-perl           0.100-2    Perl interface to the UNIX syslog(
ii  perl [libtime-hires-perl]     5.8.3-3    Larry Wall's Practical Extraction 
ii  perl-modules [libnet-perl]    5.8.3-3    Core Perl modules.

-- no debconf information

---

From: Brian May <[email-masked]>
Date: Sun, 11 Jul 2004 10:12:07 +1000

>>>>> "Frederic" == Frederic MASSOT <[email-masked]> writes:

    Frederic> When the log file (/var/log/amavis.log) is enable, there
    Frederic> is no rotation of this file.

Why would you want to enable /var/log/amavis.log?

The Debian supported configuration is to log via syslog.

    Frederic> Can you include in the package the following file :

I believe this would cause errors for people who use the Debian
default of logging via syslog.

(Does amavisd correctly responds to the SIGHUP signal? I haven't
tested it.)

As such I am reluctant to add it.
-- 
Brian May <[email-masked]>

---

From: Frédéric Massot <[email-masked]>
Date: Fri, 16 Jul 2004 10:39:23 +0200

> The Debian supported configuration is to log via syslog.

To separate the log file by service, and uses. To make them more 
readable. I can authorize certain users to consult certain log file.

For example, we installed a email proxy at a customer, I allow him to 
consult the Amavis log file. It can see which email were refused and why.

> (Does amavisd correctly responds to the SIGHUP signal? I haven't

That functions on all the machines where I installed Amavisd-new, except 
on the last ?!! :o(

On this machine I replaced the line:
  kill -1 `cat /var/run/amavis/amavisd.pid`
by:
  /etc/init.d/amavis restart

Best regards.
-- 
==============================================
|              FREDERIC MASSOT               |
|     http://www.juliana-multimedia.com      |
|   mailto:[email-masked]   |
===========================Debian=GNU/Linux===

---

From: Brian May <[email-masked]>
Date: Sat, 31 Jul 2004 14:49:18 +1000

tags 258387 wontfix
thanks

>>>>> "Frédéric" == Frédéric Massot <[email-masked]> writes:

    Frédéric> To separate the log file by service, and uses. To make
    Frédéric> them more readable. I can authorize certain users to
    Frédéric> consult certain log file.

    Frédéric> For example, we installed a email proxy at a customer, I
    Frédéric> allow him to consult the Amavis log file. It can see
    Frédéric> which email were refused and why.

Sorry, but I believe this situation is very specific to your
particular setup. As such, I feel it is your responsibility rotate the
required log files. I don't want to restart the amavis process
regularly if I can avoid it, this is one of the benefits of using
syslog.

Debian has no software for allowing customers to consult the log file
that I know of either.

The way it is now, all mail logs on my setup go to
/var/log/mail.log. This means that there is only one file to consult
if any mail goes missing.
-- 
Brian May <[email-masked]>