[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Probleme mit Logrotation in Bezug auf Postfix



Ich glaube ich habs:

    postrotate
        invoke-rc.d rsyslog reload > /dev/null
    endscript


Mathias Tauber schrieb:
Hi,

ich habe hier mehrere Lenny Systeme auf denen die Logs von Postfix einfach nicht gescheit rotieren wollen. Betroffen sind alle, also .info, .warn etc.

Hier mal die wichtigen Infos aus meinen Konfigurationen:

  ~# egrep -v '(^$|^#)' /etc/logrotate.conf
  weekly
  rotate 4
  create
  compress
  compresscmd /bin/bzip2
  uncompresscmd /bin/bunzip2
  compressext .bz2
  compressoptions -9
  dateext
  include /etc/logrotate.d
  /var/log/mail.log {
    missingok
    daily
    delaycompress
    create 0640 root adm
    rotate 365
    dateext
  }

Aus der Datei /etc/logrotate.d/rsyslog wurden diese Einträge rausgeworfen:

  /var/log/mail.info
  /var/log/mail.warn
  /var/log/mail.err
  /var/log/mail.log

Bei dieser Konfiguration kommt aktuell das hier raus:

  ~# l /var/log/mail.log* | sed 's/^-rw-r----- 1 root adm //'
     0 10. Jun 00:26 /var/log/mail.log
  182K  3. Jun 00:25 /var/log/mail.log-20090602.bz2
  182K  4. Jun 00:25 /var/log/mail.log-20090603.bz2
  209K  5. Jun 00:24 /var/log/mail.log-20090604.bz2
  164K  5. Jun 18:10 /var/log/mail.log-20090605.bz2
  292K  8. Jun 00:25 /var/log/mail.log-20090607.bz2
  194K  9. Jun 00:25 /var/log/mail.log-20090608.bz2
  116K  9. Jun 10:01 /var/log/mail.log-20090609.bz2
  3,0M 10. Jun 17:26 /var/log/mail.log-20090610

Mein Hauptproblem ist, dass nur dann in das richtige Log geschrieben wird, wenn ich den Postfix neu starte. Ein Reload hilft nicht. Das hier ist auch vorhanden:

  ~# cat /etc/rsyslog.d/postfix.conf
  # Create an additional socket in postfix's chroot in order not to
  # break mail logging when rsyslog is restarted.  If the directory is
  # missing, rsyslog will silently skip creating the socket.
  $AddUnixListenSocket /var/spool/postfix/dev/log

Jemand eine Idee was hier los ist?

Gruß
Mathias




Reply to: