From: Binand Sethumadhavan [mailto:[EMAIL PROTECTED]
>
> On 30/11/05, Bowie Bailey <[EMAIL PROTECTED]> wrote:
> > Why not just do "cancelmsg MESSAGEID"?
>
> cancelmsg sends a DSN back - these emails are viruses, and I didn't
> want to bother the guys whose IDs the virus spoofed. At the moment I
> am looking at a queue which has slightly more than 200K Cnnnn files -
> all [EMAIL PROTECTED], as per Symantec :(
That makes sense. In that case, you can do what you were suggesting,
although you need to stop Courier before you delete the files.
> > I've got a script that can show you the message or the control file
> > given a messageid. I can post it if you are interested.
>
> Please do.
Here's the script. Keep in mind that this was just slapped together
to meet my needs and is not 100% accurate. It just looks for a file
that contains the messageid given on the command line.
The strange "xargs cat | more" construct was done because "xargs more"
doesn't work quite right (at least on my system).
The first argument should be the message id. By default it will print
out the message text for you. If the second argument is a '-c', it
will print the control file. If the second argument is a '-l', it
will give you the filename of the control file.
-------------------------------------------------------
if ( [ "$2" == '-l' ] )
then
find /var/spool/courier/msgs -type f -name 'C*' | xargs grep -l $1
elif ( [ "$2" == '-c' ] )
then
find /var/spool/courier/msgs -type f -name 'C*' | xargs grep -l $1 |
xargs cat | more
else
find /var/spool/courier/msgs -type f -name 'D*' | xargs grep -l $1 |
xargs cat | more
fi
-------------------------------------------------------
I hope this is helpful.
Bowie
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users