Centos – How to delete stuck mail in active/incoming queue – postfix

centospostfix

After DoS postfix attack we have the incoming and active queues full of mails:

drwx------.  2 postfix root     1007616 nov  5 17:01 active
drwx------.  2 postfix root        4096 nov  5 11:31 bounce
drwx------.  2 postfix root        4096 feb 20  2014 corrupt
drwx------. 18 postfix root        4096 jun 30  2014 defer
drwx------. 18 postfix root        4096 jun 30  2014 deferred
drwx------.  2 postfix root        4096 sep  8 10:41 flush
drwx------.  2 postfix root        4096 feb 20  2014 hold
drwx------.  2 postfix root     1093632 nov  5 17:01 incoming
drwx-wx---.  2 postfix postdrop    4096 nov  5 17:01 maildrop
drwxr-xr-x.  2 root    root        4096 nov  5 16:49 pid
drwx------.  2 postfix root        4096 nov  5 16:49 private
drwx--x---.  2 postfix postdrop    4096 nov  5 16:49 public
drwx------.  2 postfix root        4096 feb 20  2014 saved
drwx------.  2 postfix root        4096 feb 20  2014 trace

Active queue:

[root@revres]# ls -la /var/spool/postfix/active/
total 992
drwx------.  2 postfix root 1007616 nov  5 17:01 .
drwxr-xr-x. 16 root    root    4096 nov  5 09:06 ..

Incoming queue:

[root@revres]# ls -la /var/spool/postfix/incoming/
total 1076
drwx------.  2 postfix root 1093632 nov  5 17:01 .
drwxr-xr-x. 16 root    root    4096 nov  5 09:06 ..

Running the postsuper -d ALL command doesn't delete anything, nor gives any output.

Is there any other way to empty those boxes?

Best Answer

If the ls -la only shows the two "files" . and .. then it is empty.

If you then say: "Why is . so big when it is empty"? Then the answer is: That is usual in ext3 or ext4 file systems. They reserve space for the inodes present in the directory. And even when all files are deleted (the inodes are gone) the reserved space for managing the inodes is still present. So nothing to worry about. (And even if: It is only one megabyte "big")