Jérôme Blion wrote:
> I would like to avoid to write a script which would do

So the script doesn't take too long to write, start with this:


#!/bin/bash

find /var/spool/courier/msgs/ -type f -name 'C*' | \
while read ctlfile ; do
  grep -q root ${ctlfile} && {
    msgid=$(grep ^M ${ctlfile})
    rm $(grep -rl ^$msgid /var/spool/courier/msgq/) \
       ${ctlfile} ${ctlfile%/C*}/D${ctlfile##*/C}
  }
done


Replace "grep -q root ${ctlfile}" with whatever you need to identify 
messages from the problematic user.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to