Gnus development mailing list
 help / color / mirror / Atom feed
* Adding function to pop3.el, and calling a backend from elsewhere
@ 1997-04-03 18:47 Steinar Bang
  1997-04-03 19:42 ` Kai Grossjohann
  1997-04-03 21:36 ` Stainless Steel Rat
  0 siblings, 2 replies; 7+ messages in thread
From: Steinar Bang @ 1997-04-03 18:47 UTC (permalink / raw)


I'll start out by explaining what I would like to do:
 1. Add a pop3-retrieve-headers to Rich Pieri's pop3.el back end,
    using the TOP command
 2. Interface reportmail.el (a biffish utility, as far as I can tell),
    to Gnus back ends (which would hopefully mean that I can later use
    it with IMAP, and maybe even with NNTP...).

So my questions are:
   i. is it possible?
  ii. is it stupid?
 iii. is pop3.el a regular back end?  Why, and how, use it, rather
      than POP with movemail (which is what I do today, appearently)
  iv. *can* pop3-retrieve-headers be added to pop3.el?  What about
      message numbers, and where should they be stored?  I assume the
      back end, and the POP daemon would have different message
      numbers...? 
   v. where could I find a good example of how to use a Gnus backend?
      The manual seems to have stuff on writing backends, and how to
      hook them into Gnus.  But I haven't been able to find anything
      on how to access a back end from emacs lisp

Not a priority matter.  Just something that has been cooking in the
back of my head, for a while.


- Steinar


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

* Re: Adding function to pop3.el, and calling a backend from elsewhere
  1997-04-03 18:47 Adding function to pop3.el, and calling a backend from elsewhere Steinar Bang
@ 1997-04-03 19:42 ` Kai Grossjohann
  1997-04-03 21:36 ` Stainless Steel Rat
  1 sibling, 0 replies; 7+ messages in thread
From: Kai Grossjohann @ 1997-04-03 19:42 UTC (permalink / raw)
  Cc: ding

>>>>> Steinar Bang writes:

  Steinar>  iii. is pop3.el a regular back end?  Why, and how, use it, rather
  Steinar>       than POP with movemail (which is what I do today, appearently)

IIRC, pop3.el was intended to be a replacement for movemail, similar
to smtpmail.el being a replacement for sendmail, and for the same
reasons: on some systems, movemail may not exist.

I might be wrong, though, I've just been coding *very* stupid stuff
for the past two hours.  Don't you hate these the-code-is-almost-but-
not-exactly-the-same-so-cut-and-paste-doesn't-work things, too?

Oh the joys of object-orientation: you get less code reuse.  Grmpf.

kai
-- 
A large number of young women don't trust men with beards.
(BFBS Radio)


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

* Re: Adding function to pop3.el, and calling a backend from elsewhere
  1997-04-03 18:47 Adding function to pop3.el, and calling a backend from elsewhere Steinar Bang
  1997-04-03 19:42 ` Kai Grossjohann
@ 1997-04-03 21:36 ` Stainless Steel Rat
  1997-04-04  6:06   ` Steinar Bang
  1 sibling, 1 reply; 7+ messages in thread
From: Stainless Steel Rat @ 1997-04-03 21:36 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----

>>>>> "SB" == Steinar Bang <sb@metis.no> writes:

SB>    i. is it possible?

Anything is possible. :)  The reason I did not implement TOP is because it
requires something for which to implement, and at the time I had none.

SB>   ii. is it stupid?

I am not exactly sure what you are trying to do, so I will refrain from
commenting on that.  nnpop3 is stupid, though; I am convinced of this.

SB>  iii. is pop3.el a regular back end?  Why, and how, use it, rather
SB>       than POP with movemail (which is what I do today, appearently)

No, it is not a backend at all.  It is more of a shim, an interface layer
between GNU Emacs and a POP3 server, serving a purpose similar to movemail,
but being implemented in Emacs-Lisp.  Hypothetically, quite a few things
could be written using pop3 as a generic library (which was my intent when
I wrote it).

To use it, you should be able to point nnmail-movemail-program at
nnmail-pop3-movemail and everything should just work.  nnmail-pop3-movemail
is a wrapper that should Do The Right Thing, so long as you are not using a
funky authentication scheme like Kerberos (which I am *NOT* going to
attempt to write in Emacs-Lisp :).  You may need to fiddle with the value
of pop3-authentication-scheme if you use APOP authentication.

SB>   iv. *can* pop3-retrieve-headers be added to pop3.el?

Certainly it could... unfortunately there is no standard POP3 command to do
so.  There is TOP, but it is not part of the core protocol, not all servers
will implement it, and it does not retrive headers but the first <n> lines
of the message starting with the headers.

SB>       What about message numbers, and where should they be stored?

That is one problem with an nnpop3 backend: they are not stored anywhere.
The POP3 server generates them on the fly every time you open your maildrop
through the server.

SB>       I assume the back end, and the POP daemon would have different
SB>       message numbers...?

That is another problem... there is no way to keep them in sync because
nothing is stored on the server side.  The Post Office Protocols were never
intended for this kind of use.  They are nothing more than a simple way to
get at your system mailbox on a remote server.

Now, what I would like to see happen is the use of pop3 to bypass the
crashbox stage entirely.  A sort of pseudo-backend if you would, one that
retrieves messages from the POP server and pipes it through the filtering
process.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3
Charset: noconv

iQCVAwUBM0QizZ6VRH7BJMxHAQG0xwP/fhvO2dJC7lXYZLMhHMDaz0PkJQyphR77
DqiL8BzQV+gXGTosXn6Xgrr5iDNHVJn+5SiTASLmQBoa94VweopLvw14dnW6Qv8q
2JkoHL0hqRRYhhbzyKvigsXaXu6JsasoRLECC6qAzhaJS5pa5eMMS8SqJ0oqH2uY
N22s3J5V8BY=
=S/mV
-----END PGP SIGNATURE-----
-- 
Rat <ratinox@peorth.gweep.net>    \ Warning: pregnant women, the elderly, and
PGP Key: at a key server near you! \ children under 10 should avoid prolonged
                                    \ exposure to Happy Fun Ball.


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

* Re: Adding function to pop3.el, and calling a backend from elsewhere
  1997-04-03 21:36 ` Stainless Steel Rat
@ 1997-04-04  6:06   ` Steinar Bang
  1997-04-04 16:57     ` Stainless Steel Rat
  0 siblings, 1 reply; 7+ messages in thread
From: Steinar Bang @ 1997-04-04  6:06 UTC (permalink / raw)


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

SB> iv. *can* pop3-retrieve-headers be added to pop3.el?

> Certainly it could... unfortunately there is no standard POP3 command to do
> so.  There is TOP, but it is not part of the core protocol, not all servers
> will implement it, and it does not retrive headers but the first <n> lines
> of the message starting with the headers.

	TOP msg 0
retrives the headers on the UoW POP3 daemon.  
	TOP msg n
seems to take the headers, and then the first n lines of the message. 


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

* Re: Adding function to pop3.el, and calling a backend from elsewhere
  1997-04-04  6:06   ` Steinar Bang
@ 1997-04-04 16:57     ` Stainless Steel Rat
  1997-04-04 18:00       ` Steinar Bang
  0 siblings, 1 reply; 7+ messages in thread
From: Stainless Steel Rat @ 1997-04-04 16:57 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----

>>>>> "SB" == Steinar Bang <sb@metis.no> writes:

SB> 	TOP msg 0
SB> retrives the headers on the UoW POP3 daemon.  
SB> 	TOP msg n
SB> seems to take the headers, and then the first n lines of the message. 

Implementation of TOP is, at best, inconsistant, if it exists at all. UoW
may implement it but not all servers will.

Really, this is the kind of thing you would want to do with an IMAP server.
Unlike POP, IMAP was designed for this kind of thing.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3
Charset: noconv

iQCVAwUBM0Uy7p6VRH7BJMxHAQGMDgQAiTtPbl71hH1fHwKbZgG3fTScHQWmmHqQ
PHIdLaw3No1f3tnyt+TfmTT8oLnDuRXMz+aINm4ii/sACZDBXBPZvBXwwjoVKhRJ
JEYGjNR4Zxy+EPVYDKBjLQAcY/96vF2aECbCmNcVvwFaO2Iez1n9+wS546AeQP0f
BoAZJ8oC69E=
=G1kg
-----END PGP SIGNATURE-----
-- 
Rat <ratinox@peorth.gweep.net>    \ Warning: pregnant women, the elderly, and
PGP Key: at a key server near you! \ children under 10 should avoid prolonged
                                    \ exposure to Happy Fun Ball.


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

* Re: Adding function to pop3.el, and calling a backend from elsewhere
  1997-04-04 16:57     ` Stainless Steel Rat
@ 1997-04-04 18:00       ` Steinar Bang
  1997-04-04 23:06         ` Stainless Steel Rat
  0 siblings, 1 reply; 7+ messages in thread
From: Steinar Bang @ 1997-04-04 18:00 UTC (permalink / raw)


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

>>>>> "SB" == Steinar Bang <sb@metis.no> writes:

SB>	TOP msg 0
SB> retrives the headers on the UoW POP3 daemon.  
SB>	TOP msg n
SB> seems to take the headers, and then the first n lines of the message. 

> Implementation of TOP is, at best, inconsistant, if it exists at all. UoW
> may implement it but not all servers will.

> Really, this is the kind of thing you would want to do with an IMAP
> server.  Unlike POP, IMAP was designed for this kind of thing.

Humm... since I've already revealed that I'm running the UoW POP
server, it may not come as a shock, that I'm also running the UoW IMAP
server...

Fetching mail with POP, but "biffing" it with
IMAP... kinda... *special*, innit...? :-)

But I wouldn't want to start from scratch.  I wonder if some of John
Prevost's code can be used for this?
	<URL:http://www.ccs.neu.edu/software/gnus/#Q4_13>

Maybe the underlying driver stuff?  Might as well actually fetch the
mail with IMAP also, then.


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

* Re: Adding function to pop3.el, and calling a backend from elsewhere
  1997-04-04 18:00       ` Steinar Bang
@ 1997-04-04 23:06         ` Stainless Steel Rat
  0 siblings, 0 replies; 7+ messages in thread
From: Stainless Steel Rat @ 1997-04-04 23:06 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----

>>>>> "SB" == Steinar Bang <sb@metis.no> writes:

SB> Fetching mail with POP, but "biffing" it with
SB> IMAP... kinda... *special*, innit...? :-)

Heh ;).

If all you want to do is a basic biff (mail count), I suggest ensuring that
you are using APOP for authentication, then write a little function that
opens the server, does a pop3-stat, closes the server, and returns the
message count returned by pop3-stat.  Hacking into the display-time
functions is probably what you want to do.

More complex stuff requires a more complex interface... one that I think is
trivial with IMAP but hideously complex with POP.  Right tool for the job
and all that.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3
Charset: noconv

iQCVAwUBM0WJgZ6VRH7BJMxHAQFATwP9G8gqAn3wMMmb0NNvN5Pi1lXQvQ30k+Jt
+oUksfFz6nF8c07ubW292m1uxGxuELyOOJNDkUnnYAjqezTKF6ar4xF9n2+pWGow
TVeBt5X04hwwf7XLSOlvfFnSIMmLHs/ZLkDyxXj+lnok64SrYAXG09YyvRXlFGBV
OtFOnoho9Fo=
=STYb
-----END PGP SIGNATURE-----
-- 
Rat <ratinox@peorth.gweep.net>    \ If Happy Fun Ball begins to smoke, get
PGP Key: at a key server near you! \ away immediately. Seek shelter and cover
                                    \ head.


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

end of thread, other threads:[~1997-04-04 23:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-03 18:47 Adding function to pop3.el, and calling a backend from elsewhere Steinar Bang
1997-04-03 19:42 ` Kai Grossjohann
1997-04-03 21:36 ` Stainless Steel Rat
1997-04-04  6:06   ` Steinar Bang
1997-04-04 16:57     ` Stainless Steel Rat
1997-04-04 18:00       ` Steinar Bang
1997-04-04 23:06         ` 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).