Changes between Version 6 and Version 7 of clearing-spam-backscatter-from-mailq


Ignore:
Timestamp:
Apr 13, 2013, 5:59:21 PM (11 years ago)
Author:
Ross
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • clearing-spam-backscatter-from-mailq

    v6 v7  
    241241
    242242I have been using one script per directory that I'm cleaning. Future versions could probably do more than one at a time. Future versions may also benefit from turning the grep patterns into variables as well.
     243
     244== Shortcut for Bulk Servers ==
     245
     246If you know a specific expression that can be deleted from the mailq (for example a server that should not be in the queue), you can do a quick one-line command for removal.  Be careful that you know removal should occur. From /var/spool/postfix/deferred run:
     247
     248{{{
     249for i in $(find -type f); do b=$(grep "EXPRESION_TO_REMOVE" $i | cut -f3 -d'/' | cut -f1 -d' '); if [ -n "$b" ]; then postsuper -d $b; fi; done;
     250}}}
     251
     252Where EXPRESSION_TO_REMOVE = the regular expression that should not be in the mailq.