-------- mailq | tail +2 | grep -v ’^ *(’ | awk ´BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "<email address hidden>" && $9 == "") print $1 }
´ | tr -d ’*!’ | postsuper -d -
----------
need to be change as it is not working in ubuntu. First "tail +2" need to change to "tail --line=+2" but a better approach is to use the code I wrote below for removing mails from one user:
In the url http:// manpages. ubuntu. com/manpages/ lucid/man1/ postsuper. 1.html in section
--------
mailq | tail +2 | grep -v ’^ *(’ | awk ´BEGIN { RS = "" }
print $1 }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "<email address hidden>" && $9 == "")
´ | tr -d ’*!’ | postsuper -d -
----------
need to be change as it is not working in ubuntu. First "tail +2" need to change to "tail --line=+2" but a better approach is to use the code I wrote below for removing mails from one user:
-----------
mailq | grep ^[A-Z\|0-9] | grep "<email address hidden>" | awk '{print $1}' | postsuper -d -
-------------