Gnus development mailing list
 help / color / mirror / Atom feed
* PATCH: pop3.el (pop3-movemail): handle network errors
@ 1999-04-07 16:32 Peter von der Ahé
  1999-04-07 17:42 ` Stainless Steel Rat
  0 siblings, 1 reply; 4+ messages in thread
From: Peter von der Ahé @ 1999-04-07 16:32 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 581 bytes --]

Hi!

I have an unreliable pop server which sometimes refuses connections.
Thus I would like if pop3-movemail could handle a file-error from
open-network-stream.

I have made a patch, against p0.80, which makes pop3-movemail more
robust in case of errors and offer the user the ability to probagate
the error or try to recover the error.

I'm not sure that this right place for error handling.  Some error
handling is reguired (the crashbox file should to be written to disk),
but the error needs to be propagated back to Gnus - any suggestions on
how to handle the error in Gnus?


[-- Attachment #2: patch against p0.80 --]
[-- Type: application/x-patch, Size: 3902 bytes --]

[-- Attachment #3: Type: text/plain, Size: 563 bytes --]


(Note that many lines in the patch comes from re-indentation).

My nnmail-spool-file is, in case you wonder:

  `((pop :program "/root/popgetmail %u %t"
         :server "daimi.au.dk"
         :user "pahe")
    (pop :password ,my-secret-pop-password
         :server "ahe.dk"
         :user "DELETED TO AVOID SPAMMING")
    (directory :path "/users/pahe/Gnus/Mail/" :suffix ".spool"))

Kind Regards
Peter

-- 
		  · Peter von der Ahé · Systems programmer ·
	      · Office phone: +45 89 42 31 41 · Office: 540.030 ·
		    · <URL:http://www.daimi.au.dk/~pahe/> ·

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

* Re: PATCH: pop3.el (pop3-movemail): handle network errors
  1999-04-07 16:32 PATCH: pop3.el (pop3-movemail): handle network errors Peter von der Ahé
@ 1999-04-07 17:42 ` Stainless Steel Rat
  1999-04-07 19:21   ` Peter von der Ahé
  0 siblings, 1 reply; 4+ messages in thread
From: Stainless Steel Rat @ 1999-04-07 17:42 UTC (permalink / raw)


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

* pahe@daimi.au.dk (Peter von der Ahé)  on Wed, 07 Apr 1999
| I have made a patch, against p0.80, which makes pop3-movemail more
| robust in case of errors and offer the user the ability to probagate
| the error or try to recover the error.

*sigh*

No, really, pop3-movemail is a *reference*.  It should not be anything more
than a bare-bones substitute for movemail -- mostly because I don't want to
even try to maintain code that I do not fully understand.  If you need
something more than pop3-movemail, take a look at Franklin Lee's epop3mail
which is a more featureful POP client built on pop3.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3C5kagl+vIlSVSNkRAviXAJ0YLzHP0WfWYEEm+GnfxzJlxr47wACcDJL6
wS07RGA+HccIZ703wnuuTBM=
=9S84
-----END PGP SIGNATURE-----

-- 
Rat <ratinox@peorth.gweep.net>    \ Warning: pregnant women, the elderly, and
Minion of Nathan - Nathan says Hi! \ children under 10 should avoid prolonged
PGP Key: at a key server near you!  \ exposure to Happy Fun Ball.



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

* Re: PATCH: pop3.el (pop3-movemail): handle network errors
  1999-04-07 17:42 ` Stainless Steel Rat
@ 1999-04-07 19:21   ` Peter von der Ahé
  1999-04-07 21:10     ` Stainless Steel Rat
  0 siblings, 1 reply; 4+ messages in thread
From: Peter von der Ahé @ 1999-04-07 19:21 UTC (permalink / raw)


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

 Rat> No, really, pop3-movemail is a *reference*.

If pop3.el is a reference, then why is it included in pgnus?  Are
users supposed to write their own pop-movemail function (using pop3.el
as reference)?  Is pgnus just a reference?  Should I write my own
newsreader/mailer using pgnus as a reference?

>From "Mail Source Specifiers" node in the Info pages:

     You tell Gnus how to fetch mail by creating a "mail source
  specifier".
  
     Here's an example:
  
       (pop :server "pop3.mailserver.com" :user "myname")

This will use pop3-movemail from pop3.el by default, but there is no
mention that this is using a reference program which can make your
mail disappear (until you use M-x nnml-generate-nov-databases).

 Rat> It should not be anything more than a bare-bones substitute for
 Rat> movemail -- mostly because I don't want to even try to maintain
 Rat> code that I do not fully understand.

I can not see why pop3 needs to be so bare-bone that it can not handle
simple network errors.  Where I come from we handle exceptions (and
check return value from system calls) and if we forget we do not sigh
at people who bring that to our attention.

 Rat> If you need something more than pop3-movemail, take a look at
 Rat> Franklin Lee's epop3mail which is a more featureful POP client
 Rat> built on pop3.

As far as I can see epop3mail is not included with pgnus, written for
RMAIL (but will not load rmail.el if some variable is set to 'gnus),
and included in NT Emacs.  This suggests to me that pop3.el is the
right thing to use - so how are users supposed to figure out that they
should find the NT Emacs FAQ, search for ep3m-097.zip, guess how
epop3mail interfaces to the new mail source specifiers to be able to
use POP in pgnus?

/Peter

-- 
		  · Peter von der Ahé · Systems programmer ·
	      · Office phone: +45 89 42 31 41 · Office: 540.030 ·
		    · <URL:http://www.daimi.au.dk/~pahe/> ·


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

* Re: PATCH: pop3.el (pop3-movemail): handle network errors
  1999-04-07 19:21   ` Peter von der Ahé
@ 1999-04-07 21:10     ` Stainless Steel Rat
  0 siblings, 0 replies; 4+ messages in thread
From: Stainless Steel Rat @ 1999-04-07 21:10 UTC (permalink / raw)


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

* pahe@daimi.au.dk (Peter von der Ahé)  on Wed, 07 Apr 1999
| I can not see why pop3 needs to be so bare-bone that it can not handle
| simple network errors.

For the simple reason that pop3 is a library, not a client.  Libraries
provide functions, clients provide features like error handling.
pop3-movemail is a reference function, something to give real programmers
an example of how to use the library.  I never intended it to be used by
anyone but myself (and it constantly amazes me that so many use it anyway).

I have nothing against anyone writing the World's Greatest POP Client.
Please! if you can write the beast then do so.  But please, do not expect
me to maintain it.  I am not a programmer.  Things like condition-case and
throw/catch give me a headache.  If I understood them better, I probably
would have included something like that at the outset.  I don't.  I didn't.
Deal.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3C8nMgl+vIlSVSNkRAmkTAJ4jNQkQtWSWqrXMLK1lLtoV4FmyuQCgsWQQ
dqqFpyT6vLZiEMcVdfMnGlE=
=Zk3y
-----END PGP SIGNATURE-----

-- 
Rat <ratinox@peorth.gweep.net>    \ Happy Fun Ball may stick to certain types
Minion of Nathan - Nathan says Hi! \ of skin.
PGP Key: at a key server near you!  \ 



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

end of thread, other threads:[~1999-04-07 21:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-07 16:32 PATCH: pop3.el (pop3-movemail): handle network errors Peter von der Ahé
1999-04-07 17:42 ` Stainless Steel Rat
1999-04-07 19:21   ` Peter von der Ahé
1999-04-07 21:10     ` Stainless Steel Rat

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).