[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: FW: Re: Looking for package to manipulate pop3 mailbox index



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 08 January 2002 10:53 pm, dman wrote:
> Ron : use the "reply to all" button (or whatever kmail has) to keep
> the replies on-list.

Sorry.  The other lists I belong to munge Reply-to, so it's a 
pretty ingrained habit to "reply to sender".  I do it right approx
1/3 of the time...

> ----- Forwarded message from Ron Johnson <ron.l.johnson@home.com>
> -----
>
> From: Ron Johnson <ron.l.johnson@home.com>
> To: dman <dsh8290@ritvax.rit.edu>
> Subject: Re: Looking for package to manipulate pop3 mailbox index
> Date: Tue, 08 Jan 2002 21:40:09 -0600
> X-Mailer: KMail [version 1.3.1]
>
> On Tuesday 08 January 2002 05:34 pm, dman wrote:
> > On Tue, Jan 08, 2002 at 04:59:15PM -0600, Ron Johnson wrote:
> > | On Tuesday 08 January 2002 04:38 pm, Dougie Nisbet wrote:
> > | > On another ISP I've got a full mailbox (around 120MB and 15000
> > | > messages I think) because a spammer has faked a legitimate
> > | > e-mail address of mine and used it. This means that
> > | > 'lunsform3459@nisbet.compulink.co.uk' (which I had no idea was
> > | > legitimate) has received many thousands of mail bounces.
> > | >
> > | > Is there a package that would allow me to examine JUST THE
> > | > HEADERS of these mail messages, and allow me to delete chunks
> > | > at a time? There may be a handful of mails in there that I
> > | > want, but I don't want to download 120MB to find out!
> > |
> > | I'm 99.9% sure you can write something in Python.
> >
> > Of course you can!  :-).  (or just use telnet after reading the
> > POP3 RFC)
>
> And here's the python script:
>   import getpass, poplib, string
>   M = poplib.POP3('mail.foobar.com')
>   M.user('your.address')
>   M.pass_(getpass.getpass())
>   numMessages = len(M.list()[1])
>   print numMessages
>   x = M.list(0)
>   for i in range(1, numMessages):
>       print '=============================================='
>       print '=============================================='
>       x = M.top(i, 0)
>       print i
>       for y in x[1]:
>           z = string.split(y, ' ')
>           if z[0] in ('Date:', 'From:', 'To:', 'Subject:'):
>               print z
>       a = raw_input('Delete this message?')
>       if a in ('Y', 'y'):
>           M.dele(i)
>       if a in ('Q', 'q'):
>           break
>   M.quit()

- -- 
+------------------------------------------------------------+
| Ron Johnson, Jr.        Home: ron.l.johnson@home.com       |
| Jefferson, LA  USA      http://ronandheather.dhs.org:81    |
|                                                            |
! "Fair is where you take your cows to be judged."           !
!    Unknown                                                 !
+------------------------------------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD4DBQE8O88gjTz5dS9Us5wRAufRAJjvSdp+eBZF/hOetSILrHkE/z0SAJ9vacAO
8jxq4sN/DYHc8imnHxd4Og==
=Q3Vl
-----END PGP SIGNATURE-----



Reply to: