Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Deleting mail from server with pop3
@ 2002-05-12 20:05 Paul Moore
  2002-05-12 21:23 ` Adrian Aichner
       [not found] ` <m3bsbjc2yf.fsf@peorth.gweep.net>
  0 siblings, 2 replies; 3+ messages in thread
From: Paul Moore @ 2002-05-12 20:05 UTC (permalink / raw)


If I understand the code correctly (*not* a foregone conclusion :-))
gnus uses pop3.el from the xemacs mail-lib package to do POP3
retrieval of mail. The sequence of events when retrieving mail is:
first, retrieve messages 1..N, then delete messages N..1.

I have a problem with this. My ISP has a tendency towards randomly
dropping the connection. When this happens during a mail retrieval, I
get a load of downloaded messages which haven't been deleted off the
server. This has two consequences - first, there is a big chunk of
data which gets downloaded twice, and second, mail gets duplicated (if
I let the crashbox be processed) or lost (if I delete the crashbox).

What I would prefer would be to delete each message immediately after
it has been downloaded. I looked at the code in pop3.el, and there
doesn't seem to be a way to achieve this as the code stands. And my
elisp skills are definitely not up to something like this...

Does anyone know of a way of achieving something like this? Or
alternatively, am I doing something wrong? If the connection drops
while pop3 is downloading or deleting messages, is there a way of
recovering *without* getting duplicate messages?

Thanks,
Paul (Just finished trawling through a couple of hundreds of spam
messages, each duplicated 3 times :-()

PS "Get a new ISP" is a reasonable suggestion, but unfortunately not
practical...


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Deleting mail from server with pop3
  2002-05-12 20:05 Deleting mail from server with pop3 Paul Moore
@ 2002-05-12 21:23 ` Adrian Aichner
       [not found] ` <m3bsbjc2yf.fsf@peorth.gweep.net>
  1 sibling, 0 replies; 3+ messages in thread
From: Adrian Aichner @ 2002-05-12 21:23 UTC (permalink / raw)


>>>>> "Paul" == Paul Moore <gustav@morpheus.demon.co.uk> writes:

Hi Paul,

    Paul> If I understand the code correctly (*not* a foregone
    Paul> conclusion :-)) gnus uses pop3.el from the xemacs mail-lib
    Paul> package to do POP3 retrieval of mail. The sequence of events

The XEmacs gnus package does, yes.

    Paul> when retrieving mail is: first, retrieve messages 1..N, then
    Paul> delete messages N..1.

    Paul> I have a problem with this. My ISP has a tendency towards
    Paul> randomly dropping the connection. When this happens during a
    Paul> mail retrieval, I get a load of downloaded messages which
    Paul> haven't been deleted off the server. This has two
    Paul> consequences - first, there is a big chunk of data which
    Paul> gets downloaded twice, and second, mail gets duplicated (if
    Paul> I let the crashbox be processed) or lost (if I delete the
    Paul> crashbox).

    Paul> What I would prefer would be to delete each message
    Paul> immediately after it has been downloaded. I looked at the
    Paul> code in pop3.el, and there doesn't seem to be a way to
    Paul> achieve this as the code stands. And my elisp skills are
    Paul> definitely not up to something like this...

    Paul> Does anyone know of a way of achieving something like this? 
    Paul> Or alternatively, am I doing something wrong? If the
    Paul> connection drops while pop3 is downloading or deleting
    Paul> messages, is there a way of recovering *without* getting
    Paul> duplicate messages?

I am using
(setq nnmail-treat-duplicates 'delete)
and don't have to worry about any duplicates.

This does not fix the double download problem, though.

In some cases I have to go and move ~/.uidls out of the way when Gnus
does not want to download mails, which I had previously disqualified
via
(setq pop3-maximum-message-size 524288)

Adrian

    Paul> Thanks, Paul (Just finished trawling through a couple of
    Paul> hundreds of spam messages, each duplicated 3 times :-()

    Paul> PS "Get a new ISP" is a reasonable suggestion, but
    Paul> unfortunately not practical...

-- 
Adrian Aichner
 mailto:adrian@xemacs.org
 http://www.xemacs.org/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Deleting mail from server with pop3
       [not found] ` <m3bsbjc2yf.fsf@peorth.gweep.net>
@ 2002-05-14  7:42   ` Scott Gifford
  0 siblings, 0 replies; 3+ messages in thread
From: Scott Gifford @ 2002-05-14  7:42 UTC (permalink / raw)


Stainless Steel Rat <ratinox@peorth.gweep.net> writes:

> * Paul Moore <gustav@morpheus.demon.co.uk>  on Sun, 12 May 2002
> | What I would prefer would be to delete each message immediately after
> | it has been downloaded. I looked at the code in pop3.el, and there
> | doesn't seem to be a way to achieve this as the code stands. And my
> | elisp skills are definitely not up to something like this...
> 
> That is impossible given how POP works.
> 
> The DELE command marks messages for deletion.  The only time that a POP
> server will expunge messages from the spool is if the connection closes
> cleanly.  That is, when the client sends a QUIT command.  If the connection
> drops then the server will remove the DELE marks once the server timeout
> has elapsed.

Some servers work this way, some do not.  I used to use cucipop, which
didn't delete messages until a QUIT (although it had a compile-time
option to do the opposite); now my hosting provider users QPOP, and
that *does* delete messages if I just terminate the connection without
sending a QUIT.

One (annoying) way to get this behaviour guaranteed by all POP servers
is to fetch each message in its own POP session.  A compromise is to
fetch a batch of messages (5-10-25) in each session, so if you do get
duplicates, at least it won't be that many...

-----ScottG.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-05-14  7:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-12 20:05 Deleting mail from server with pop3 Paul Moore
2002-05-12 21:23 ` Adrian Aichner
     [not found] ` <m3bsbjc2yf.fsf@peorth.gweep.net>
2002-05-14  7:42   ` Scott Gifford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).