Postfix monitoring with mailgraph & pflogsumm debian lenny

Discussion in 'Installation/Configuration' started by MiniMe, Jun 18, 2010.

  1. MiniMe

    MiniMe New Member

    Hi,

    I have followed the following tutorial :

    Assistance http://www.howtoforge.com/postfix-monitoring-with-mailgraph-and-pflogsumm-on-debian-lenny

    But now i have the following issues. Since the install of the above i get the following email each day :

    /etc/cron.daily/logrotate:
    error: /etc/logrotate.conf:33 duplicate log entry for /var/log/mail.log
    run-parts: /etc/cron.daily/logrotate exited with return code 1

    And the generated email that should show the spam counters etc just results in an empty email every day at 7 am, an email without a subject and without a body.

    Any idea what may be wrong ?

    Regards,
    MiniMe
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Please take a look at /etc/logrotate.conf and the configuration files inside the /etc/logrotate.d directory to see if there's another stanza for /var/log/mail.log. If so, comment it out.
     
  3. MiniMe

    MiniMe New Member

    Sorry for double postign, i just noticed i posted this question in the wrong forum ! :$

    I will check the logs and report back, thank you !
     
  4. MiniMe

    MiniMe New Member

    Hey

    In /etc/logrotate.d i only have the following files :

    Aphrodite-Artemis:/etc/logrotate.d# dir
    apache2 aptitude clamav-freshclam exim4-base mysql-server rsyslog
    apt clamav-daemon dpkg exim4-paniclog razor vsftpd

    inside /etc/logrotate.conf i have :

    Code:
    # see "man logrotate" for details
    # rotate log files weekly
    weekly
    
    # keep 4 weeks worth of backlogs
    rotate 4
    
    # create new (empty) log files after rotating old ones
    create
    
    # uncomment this if you want your log files compressed
    #compress
    
    # packages drop log rotation information into this directory
    include /etc/logrotate.d
    
    # no packages own wtmp, or btmp -- we'll rotate them here
    /var/log/wtmp {
        missingok
        monthly
        create 0664 root utmp
        rotate 1
    }
    
    /var/log/btmp {
        missingok
        monthly
        create 0660 root utmp
        rotate 1
    }
    
    # system-specific logs may be configured here
    /var/log/mail.log {
        missingok
        daily
        rotate 7
        create
        compress
        start 0
    }
    
    Any idea what could be wrong ? :(
     
  5. falko

    falko Super Moderator ISPConfig Developer

    Please take a look at the files inside the /etc/logrotate.d directory - I guess exim4-base is the one, but you should check out the others as well.
     
  6. MiniMe

    MiniMe New Member

    Hey,

    i think i found the mad act...

    inside rsyslog is the following :

    Code:
    /var/log/mail.info
    /var/log/mail.warn
    /var/log/mail.err
    #/var/log/mail.log
    /var/log/daemon.log
    /var/log/kern.log
    /var/log/auth.log
    /var/log/user.log
    /var/log/lpr.log
    /var/log/cron.log
    /var/log/debug
    /var/log/messages
    {
            rotate 4
            weekly
            missingok
            notifempty
            compress
            delaycompress
            sharedscripts
            postrotate
                    invoke-rc.d rsyslog reload > /dev/null
            endscript
    }
    
    As you can see, i just deactived the mail.log line, you think it should be fixed now ?
    Thx for ur help
     
  7. Mark_NL

    Mark_NL New Member

    mail.log is part of rsyslog, so your change should fix your issue with the error :)
     
  8. MiniMe

    MiniMe New Member


    Hey,

    the message has dissapeared after my fix
    but the mail is still empty : no body, no subject ...

    Any idea ?

    EDIT:

    the flogstuff command shows text, but it seems to me the next command formail is wrong.
    is there another command to use ( and with which options ) can i use ?
    the formail command seems completely wrong and not available

    please help !
     
    Last edited: Jun 23, 2010
  9. MiniMe

    MiniMe New Member

    Since no one really bothered to help :mad: ...

    i found a solution myself :

    use the following command instead of the one provided in the tutorial :

    pflogsumm /var/log/mail.log.0 | mail -s "Mail Statistics" <[email protected]>

    seems like the command used there, is not valid on debian lenny 5.0 ...
     

Share This Page