This is a discussion on RE: [courier-users] Antivirus software and mail queue management within the Courier-Imap forums, part of the Mail Servers and Related category; From: Binand Sethumadhavan [mailto:binand@gmail.com] > > On 30/11/05, Bowie Bailey <Bowie_Bailey@buc.com> ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
From: Binand Sethumadhavan [mailto:binand@gmail.com]
> > On 30/11/05, Bowie Bailey <Bowie_Bailey@buc.com> 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 w32.sober.x@mm, 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 courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/.../courier-users |