If you want to delete all mails from a specific mails from a sender / recieptment domain
You can use this command:
1 |
mailq | tail -n +2 | grep -v '^ *(' | gawk 'BEGIN {RS = ""} /@kennethdalbjerg.dk/ {print $1}' | tr -d '*!' | postsuper -d - |
This will delete all mails sent to or from kennethdalbjerg.dk domain.