[thelist] (no subject)

T&M Consulting Company admin at tmconsultingcompany.com
Thu Jan 23 15:05:05 CST 2003

[ Picked text/plain from multipart/alternative ]
Hi all! I am new the area of shell scripting (or any scripting for that
matter) and was wondering if anyone could help me out here.

Problem: I run f-prot on my Redhat Web server to scan my email inboxes
for viruses via a cron job. The result of the scan is redirected to a
file I call scandata.stdout. I then ssh in and read the file and
manually rm -f each of the email messages that contain infected
attachments. I am not concerned about disinfecting infected mail. All I
want to do is delete the entire file.

Solution: I figure I could use a shell script running on a cron job to
read the scandata.stdout file, parse the file, find the filenames of
infected messages, and delete them. I just don't have a clue how to do
it. I tried a couple of different times and failed miserably. I looked
around at similar PERL scripts, but couldn't make the same thing work.
Any help would be appreciated.

Here is a sample of the scandata.stdout file:

<BOF>Virus scanning report  -  22. January 2003   21:00
F-PROT 3.12b
SIGN.DEF created 18. January 2003
SIGN2.DEF created 20. January 2003
MACRO.DEF created 20. January 2003

Search: /var/qmail/mailnames/mydomain.com/mybox/Maildir/cur
Action: Automatic disinfection
Files: "Dumb" scan of all files

1.myservers.net:2,S->Movie_0074.mpeg.pif  Infection: W32/Sobig.A at mm
Virus-infected files in archives cannot be disinfected.
1.myservers.net:2,S->Sample.pif  Infection: W32/Sobig.A at mm
Virus-infected files in archives cannot be disinfected.

Results of virus scanning:

Files: 70
MBRs: 0
Boot sectors: 0
Objects scanned: 125
Infected: 2
Suspicious: 0
Disinfected: 0
Deleted: 0
Renamed: 0

Time: 0:02

Thank you for your time,


"May the road rise up to meet you, the wind always be at your back, the
sun warm your face and may all your ins and outs, and your ups and downs
be between the sheets."


More information about the thelist mailing list