Script to remove SoBig/F virus from POP3 mailbox

Kevin Altis altis at semi-retired.com
Mon Aug 25 13:55:12 EDT 2003


Like Alex I wrote a script last week to auto-delete potential virus
attachments from my POP account. The code uses the poplib module and email
package and downloads the full message to completely parse the attachments
before deciding whether to delete the message or not. The latest version is
sitting in cvs. No warranties implied, but I've been using it without
problems since Friday.


http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/pythoncard/PythonCardPrototyp
e/samples/fpop/emailfilter.py

ka

"Alex" <usenet_poster_a at tranzoa.com> wrote in message
news:PqacnRTDw7cVltqiXTWc-g at speakeasy.net...
> Skip Montanaro wrote:
> >     Alex> Under the gun, I've written a Python script to delete emails
> >     Alex> containing this latest virus/worm (Sobig-F) from a POP3
mailbox.
> >
> >     ...
> >
> > I wrote something similar today for scrubbing Mailman 2.1 pending
> > administrative requests.  I've killed over a thousand messages for the
> > python-help mailing list so far.  It's crude, but saves a huge amount of
> > pointing and clicking.  If you'd like a copy, drop me a note.  If enough
> > people are interested and it seems like there's no other easy way to
> > accomplish this with the usual Mailman means, I'll place a copy on my
> > website.
> >
> > Skip
> >
>
> Heck, why not post? "When in doubt, ship it out." :)
>
> Actually, my script was small enough to simply include in the newsgroup
posting.
> But, it's usually handier for people to get things from the web site than
trying
> to sort through old news messages.
>
> As indicated in the private email, I solved two particular problems we
had:
>
> 1) Used TOP to read just the start of the emails so that our bandwidth
wasn't
> saturated by full, virus emails.
>
> 2) Deleted virus scanner bounces that contained the whole, danged virus
file
> attachment.
>
> Alex
>





More information about the Python-list mailing list