delete all MAILER-DAEMON emails in POSTFIX
3.27.2008
22E2B1989E8 25708 Thu Mar 27 19:15:00 MAILER-DAEMON
48FB319C8D2* 23163 Thu Mar 27 19:18:14 MAILER-DAEMON
root@bulastog:~# mailq | grep MAILER-DAEMON | awk '{print $1}' | postsuper -d -
postsuper: warning: valid_hostname: invalid character 42(decimal): 48FB319C8D2*
postsuper: warning: invalid mail queue id: 48FB319C8D2*
### to delete all mailer-daemon including those mailq with * ,
root@bulastog:~# mailq | grep MAILER-DAEMON | awk '{print $1}' | tr -d '*' | postsuper -d -
postsuper: 22E2B1989E8: removed
postsuper: 48FB319C8D2: removed
that's simple :) ampz
48FB319C8D2* 23163 Thu Mar 27 19:18:14 MAILER-DAEMON
root@bulastog:~# mailq | grep MAILER-DAEMON | awk '{print $1}' | postsuper -d -
postsuper: warning: valid_hostname: invalid character 42(decimal): 48FB319C8D2*
postsuper: warning: invalid mail queue id: 48FB319C8D2*
### to delete all mailer-daemon including those mailq with * ,
root@bulastog:~# mailq | grep MAILER-DAEMON | awk '{print $1}' | tr -d '*' | postsuper -d -
postsuper: 22E2B1989E8: removed
postsuper: 48FB319C8D2: removed
that's simple :) ampz