2014-06-13 00:11:25 |
Stavros Siailis |
description |
In the url http://manpages.ubuntu.com/manpages/lucid/man1/postsuper.1.html in section
--------
mailq | tail +2 | grep -v ’^ *(’ | awk ´BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "user@example.com" && $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:
-----------
mailq | grep ^[A-Z\|0-9] | grep "user@example.com" | awk '{print $1}' | postsuper -d -
------------- |
In the url http://manpages.ubuntu.com/manpages/lucid/man1/postsuper.1.html in section
--------
mailq | tail +2 | grep -v ’^ *(’ | awk ´BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "user@example.com" && $9 == "")
print $1 }
´ | tr -d ’*!’ | postsuper -d -
----------
Need to be change as it is not working in ubuntu.
A better approach is to use the code I wrote below for removing mails from one user:
-----------
mailq | grep ^[A-Z\|0-9] | grep "user@example.com" | awk '{print $1}' | postsuper -d -
------------- |
|
2014-06-13 08:31:42 |
Stavros Siailis |
description |
In the url http://manpages.ubuntu.com/manpages/lucid/man1/postsuper.1.html in section
--------
mailq | tail +2 | grep -v ’^ *(’ | awk ´BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "user@example.com" && $9 == "")
print $1 }
´ | tr -d ’*!’ | postsuper -d -
----------
Need to be change as it is not working in ubuntu.
A better approach is to use the code I wrote below for removing mails from one user:
-----------
mailq | grep ^[A-Z\|0-9] | grep "user@example.com" | awk '{print $1}' | postsuper -d -
------------- |
In the url http://manpages.ubuntu.com/manpages/lucid/man1/postsuper.1.html in section
--------
mailq | tail +2 | grep -v ’^ *(’ | awk ´BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "user@example.com" && $9 == "")
print $1 }
´ | tr -d ’*!’ | postsuper -d -
----------
Need to be changed as it is not working in ubuntu.
A better approach is to use the code I wrote below for removing mails from one user:
-----------
mailq | grep ^[A-Z\|0-9] | grep "user@example.com" | awk '{print $1}' | postsuper -d -
------------- |
|