Dragged it now down - no third party sowftware seems to be involved in this problem.
What did I do:
1. Established a cron job which checks the integrity of the "maildirsize" file and write it to a logfile (to get notice, when this happens) - unfortunately, there is a 1-minute gap as the cron checks only every minute
2. Activated auditing on this file to see, what happens.
Problem happened this morning between 09:24:01 and 09:25:01
20120806092401
996680071
20120806092501
mailmng[21647]: maildirsize quota header is corrupted. Please run mail_restore utility to fix.
996685500
Here the output from the audit file:
time->Mon Aug 6 09:24:02 2012
type=CONFIG_CHANGE msg=audit(1344237842.664:761): auid=4294967295 ses=4294967295 op="updated rules" path="/var/qmail/mailnames/peter-heck.de/peter/Maildir/maildirsize" key="maildirsize" list=4 res=1
----
time->Mon Aug 6 09:24:02 2012
type=PATH msg=audit(1344237842.643:760): item=0 name="./Maildir/maildirsize" inode=12468921 dev=09:02 mode=0100644 ouid=110 ogid=31 rdev=00:00
type=CWD msg=audit(1344237842.643:760): cwd="/var/qmail/mailnames/peter-heck.de/peter"
type=SYSCALL msg=audit(1344237842.643:760): arch=c000003e syscall=2 success=yes exit=3 a0=a3f010 a1=c02 a2=0 a3=0 items=1 ppid=21634 pid=21635 auid=4294967295 uid=110 gid=31 euid=110 suid=110 fsuid=110 egid=31 sgid=31 fsgid=31 tty=(none) ses=4294967295 comm="deliverquota" exe="/usr/bin/deliverquota" key="maildirsize"
----
time->Mon Aug 6 09:24:02 2012
type=PATH msg=audit(1344237842.664:762): item=4 name="./Maildir/maildirsize" inode=12470476 dev=09:02 mode=0100600 ouid=110 ogid=31 rdev=00:00
type=PATH msg=audit(1344237842.664:762): item=3 name="./Maildir/maildirsize" inode=12468921 dev=09:02 mode=0100644 ouid=110 ogid=31 rdev=00:00
type=PATH msg=audit(1344237842.664:762): item=2 name="./Maildir/tmp/1344237842.21635_NeWmAiLdIrSiZe.ph-internet.de" inode=12470476 dev=09:02 mode=0100600 ouid=110 ogid=31 rdev=00:00
type=PATH msg=audit(1344237842.664:762): item=1 name="./Maildir/" inode=12326882 dev=09:02 mode=040700 ouid=110 ogid=31 rdev=00:00
type=PATH msg=audit(1344237842.664:762): item=0 name="./Maildir/tmp/" inode=12453318 dev=09:02 mode=040700 ouid=110 ogid=31 rdev=00:00
type=CWD msg=audit(1344237842.664:762): cwd="/var/qmail/mailnames/peter-heck.de/peter"
type=SYSCALL msg=audit(1344237842.664:762): arch=c000003e syscall=82 success=yes exit=0 a0=a3f050 a1=a3f010 a2=1b a3=0 items=5 ppid=21634 pid=21635 auid=4294967295 uid=110 gid=31 euid=110 suid=110 fsuid=110 egid=31 sgid=31 fsgid=31 tty=(none) ses=4294967295 comm="deliverquota" exe="/usr/bin/deliverquota" key="maildirsize"
----
time->Mon Aug 6 09:25:01 2012
type=PATH msg=audit(1344237901.879:764): item=0 name="./maildirsize" inode=12470476 dev=09:02 mode=0100600 ouid=110 ogid=31 rdev=00:00
type=CWD msg=audit(1344237901.879:764): cwd="/var/qmail/mailnames/peter-heck.de/peter/Maildir"
type=SYSCALL msg=audit(1344237901.879:764): arch=c000003e syscall=2 success=yes exit=3 a0=1995250 a1=c02 a2=0 a3=0 items=1 ppid=4765 pid=21652 auid=4294967295 uid=110 gid=31 euid=110 suid=110 fsuid=110 egid=31 sgid=31 fsgid=31 tty=(none) ses=4294967295 comm="imapd" exe="/usr/bin/imapd" key="maildirsize"
----
time->Mon Aug 6 09:25:01 2012
type=PATH msg=audit(1344237901.807:763): item=0 name="./.Spam/../maildirsize" inode=12470476 dev=09:02 mode=0100600 ouid=110 ogid=31 rdev=00:00
type=CWD msg=audit(1344237901.807:763): cwd="/var/qmail/mailnames/peter-heck.de/peter/Maildir"
type=SYSCALL msg=audit(1344237901.807:763): arch=c000003e syscall=2 success=yes exit=4 a0=19928d0 a1=c02 a2=0 a3=3030303030303030 items=1 ppid=4765 pid=21652 auid=4294967295 uid=110 gid=31 euid=110 suid=110 fsuid=110 egid=31 sgid=31 fsgid=31 tty=(none) ses=4294967295 comm="imapd" exe="/usr/bin/imapd" key="maildirsize"
----
Looking at the complete audit logfile, the following pattern is new:
time->Mon Aug 6 09:24:02 2012
type=PATH msg=audit(1344237842.664:762): item=4 name="./Maildir/maildirsize" inode=12470476 dev=09:02 mode=0100600 ouid=110 ogid=31 rdev=00:00
type=PATH msg=audit(1344237842.664:762): item=3 name="./Maildir/maildirsize" inode=12468921 dev=09:02 mode=0100644 ouid=110 ogid=31 rdev=00:00
type=PATH msg=audit(1344237842.664:762): item=2 name="./Maildir/tmp/1344237842.21635_NeWmAiLdIrSiZe.ph-internet.de" inode=12470476 dev=09:02 mode=0100600 ouid=110 ogid=31 rdev=00:00
type=PATH msg=audit(1344237842.664:762): item=1 name="./Maildir/" inode=12326882 dev=09:02 mode=040700 ouid=110 ogid=31 rdev=00:00
type=PATH msg=audit(1344237842.664:762): item=0 name="./Maildir/tmp/" inode=12453318 dev=09:02 mode=040700 ouid=110 ogid=31 rdev=00:00
type=CWD msg=audit(1344237842.664:762): cwd="/var/qmail/mailnames/peter-heck.de/peter"
type=SYSCALL msg=audit(1344237842.664:762): arch=c000003e syscall=82 success=yes exit=0 a0=a3f050 a1=a3f010 a2=1b a3=0 items=5 ppid=21634 pid=21635 auid=4294967295 uid=110 gid=31 euid=110 suid=110 fsuid=110 egid=31 sgid=31 fsgid=31 tty=(none) ses=4294967295 comm="deliverquota" exe="/usr/bin/deliverquota" key="maildirsize"
----
What we see: It looks, like the file is created newly:
time->Mon Aug 6 09:24:02 2012
type=PATH msg=audit(1344237842.643:760): item=0 name="./Maildir/maildirsize" inode=12468921 dev=09:02 mode=0100644 ouid=110 ogid=31 rdev=00:00
type=CWD msg=audit(1344237842.643:760): cwd="/var/qmail/mailnames/peter-heck.de/peter"
type=SYSCALL msg=audit(1344237842.643:760): arch=c000003e syscall=2 success=yes exit=3 a0=a3f010 a1=c02 a2=0 a3=0 items=1 ppid=21634 pid=21635 auid=4294967295 uid=110 gid=31 euid=110 suid=110 fsuid=110 egid=31 sgid=31 fsgid=31 tty=(none) ses=4294967295 comm="deliverquota" exe="/usr/bin/deliverquota" key="maildirsize"
----
time->Mon Aug 6 09:24:02 2012
type=PATH msg=audit(1344237842.664:762): item=4 name="./Maildir/maildirsize" inode=12470476 dev=09:02 mode=0100600 ouid=110 ogid=31 rdev=00:00
type=PATH msg=audit(1344237842.664:762): item=3 name="./Maildir/maildirsize" inode=12468921 dev=09:02 mode=0100644 ouid=110 ogid=31 rdev=00:00
type=PATH msg=audit(1344237842.664:762): item=2 name="./Maildir/tmp/1344237842.21635_NeWmAiLdIrSiZe.ph-internet.de" inode=12470476 dev=09:02 mode=0100600 ouid=110 ogid=31 rdev=00:00
type=PATH msg=audit(1344237842.664:762): item=1 name="./Maildir/" inode=12326882 dev=09:02 mode=040700 ouid=110 ogid=31 rdev=00:00
type=PATH msg=audit(1344237842.664:762): item=0 name="./Maildir/tmp/" inode=12453318 dev=09:02 mode=040700 ouid=110 ogid=31 rdev=00:00
type=CWD msg=audit(1344237842.664:762): cwd="/var/qmail/mailnames/peter-heck.de/peter"
type=SYSCALL msg=audit(1344237842.664:762): arch=c000003e syscall=82 success=yes exit=0 a0=a3f050 a1=a3f010 a2=1b a3=0 items=5 ppid=21634 pid=21635 auid=4294967295 uid=110 gid=31 euid=110 suid=110 fsuid=110 egid=31 sgid=31 fsgid=31 tty=(none) ses=4294967295 comm="deliverquota" exe="/usr/bin/deliverquota" key="maildirsize"
----
time->Mon Aug 6 09:25:01 2012
type=PATH msg=audit(1344237901.879:764): item=0 name="./maildirsize" inode=12470476 dev=09:02 mode=0100600 ouid=110 ogid=31 rdev=00:00
type=CWD msg=audit(1344237901.879:764): cwd="/var/qmail/mailnames/peter-heck.de/peter/Maildir"
type=SYSCALL msg=audit(1344237901.879:764): arch=c000003e syscall=2 success=yes exit=3 a0=1995250 a1=c02 a2=0 a3=0 items=1 ppid=4765 pid=21652 auid=4294967295 uid=110 gid=31 euid=110 suid=110 fsuid=110 egid=31 sgid=31 fsgid=31 tty=(none) ses=4294967295 comm="imapd" exe="/usr/bin/imapd" key="maildirsize"
So inode was 12468921 until this happens, and now it is 12470476
Will now look, whether this pattern will repeat the next time, the problem happens.
@Nikolay - does this help?
Ciao
Peter