[Eisfair] logrotate und size

Rolf Bensch azubi at bensch-net.de
Mo Jul 12 09:20:45 CEST 2021


Hallo zusammen,

Am 11.07.21 um 16:23 schrieb Marcus Röckrath:
> Hallo Holger,
> 
> Holger Bruenjes wrote:
> 
>>>      wtmp:4 keyword 'size' not properly separated, found 0x3d
>>
>> hmm, wtmp sollte doch sauber sein mit logrotate 3.2.1
> 
> Ist es auch:
> 
> /var/log/wtmp /var/log/btmp {
>      compress
>      maxage 365
>      size 100k
>      notifempty
>      missingok
>      copytruncate
> }
> 
> Irgendwas ist da auf Rolfs System faul, denn das + ist zwar nicht
> dokumentiert, wird aber nicht angemeckert, also korrekt behandelt.

habe die Config von mailquota und mail-addon-certs neu schreiben lassen. Für mailquota wurde in /etc/logrotate.d/ eine neue Datei erstellt, für mail-addon-certs nicht:

   eis64-2 (/) # ls -l /etc/logrotate.d/mail*
   -rw-r--r-- 1 root root 940 Jul 12 09:11 /etc/logrotate.d/mail
   -rw-r--r-- 1 root root 137 Jul 11 09:36 /etc/logrotate.d/mail-addon-certs
   -rw-r--r-- 1 root root 427 Jul 12 09:04 /etc/logrotate.d/mailquota

Inhaltlich sieht es jetzt so aus:

   eis64-2 (/) # grep size /etc/logrotate.d/*
   /etc/logrotate.d/mail-addon-certs:    size 4096k
   /etc/logrotate.d/mailquota:    size=10k
   /etc/logrotate.d/wtmp:    size 100k

wobei ich die Dateien von mail-addon-certs und wtmp manuell geändert hatte.

mailquota löst jetzt eine Fehlermeldung aus:

   eis64-2 (/) # logrotate -v /etc/logrotate.conf 2>&1
   reading config file /etc/logrotate.conf
   compress_prog is now /usr/bin/xz
   compress_ext was changed to .xz
   uncompress_prog is now /usr/bin/xzdec
   compress_ext is now .xz
   including /etc/logrotate.d
   ...
   reading config file mailquota
   mailquota:9 keyword 'size' not properly separated, found 0x3d

Entferne ich das "=" bleibt die Meldung aus.

Wie erstelle ich die Dateien für wtmp und mail-addon-certs neu?

Grüße Rolf
  



Mehr Informationen über die Mailingliste Eisfair