Gnus development mailing list
 help / color / mirror / Atom feed
* nnmail-spool-file should be a list...
@ 1997-04-08 20:21 William M. Perry
  1997-04-08 21:13 ` William M. Perry
  1997-04-09  0:38 ` Stainless Steel Rat
  0 siblings, 2 replies; 12+ messages in thread
From: William M. Perry @ 1997-04-08 20:21 UTC (permalink / raw)


You should be able to specify multiple spool files, ala VM.  I would
propose renaming nnmail-spool-file -> nnmail-spool-files, ala
vm-spool-files.  I get mail from several places, and currently I can't get
to all of it from within Gnus.

I'd like to be able to say:

(setq nnmail-spool-files '("po:wmperry@aventail.com"
                           "po:wmperry@oz.net"
                           "/var/spool/mail/wmperry"))

To get mail from my aventail account, my ISP account, and the local spool
file.  This would entail changes to the pop support to cache passwords
based on username/host.

It actually looks like nnmail is already smart enough to deal with multiple
spool files, just nnmail-get-spool-files needs to have new code to deal
with nnmail-spool-files being a list.

Anybody want to hack on this?  I might get to it this weekend otherwise.

-Bill P.
-- 
William Perry			wmperry@aventail.com
Unix Server Development Lead  & Emacs-W3 Author
Aventail, Corp.			http://www.aventail.com


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

* Re: nnmail-spool-file should be a list...
  1997-04-08 20:21 nnmail-spool-file should be a list William M. Perry
@ 1997-04-08 21:13 ` William M. Perry
  1997-04-09  0:13   ` Sudish Joseph
  1997-04-09  0:38 ` Stainless Steel Rat
  1 sibling, 1 reply; 12+ messages in thread
From: William M. Perry @ 1997-04-08 21:13 UTC (permalink / raw)


wmperry@aventail.com (William M. Perry) writes:

> You should be able to specify multiple spool files, ala VM.  I would
> propose renaming nnmail-spool-file -> nnmail-spool-files, ala
> vm-spool-files.  I get mail from several places, and currently I can't get
> to all of it from within Gnus.
> 
> I'd like to be able to say:
> 
> (setq nnmail-spool-files '("po:wmperry@aventail.com"
>                            "po:wmperry@cs.indiana.edu"
>                            "/var/spool/mail/wmperry"))
> 
> To get mail from my aventail account, my ISP account, and the local spool
> file.  This would entail changes to the pop support to cache passwords
> based on username/host.
> 
> It actually looks like nnmail is already smart enough to deal with multiple
> spool files, just nnmail-get-spool-files needs to have new code to deal
> with nnmail-spool-files being a list.
> 
> Anybody want to hack on this?  I might get to it this weekend otherwise.

  Duh, it can be a list.  But I still need to hack the pop support to have
some way to specify the host for pop retrieval.  Or am I overlooking
something there as well.

-Bill P.


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

* Re: nnmail-spool-file should be a list...
  1997-04-08 21:13 ` William M. Perry
@ 1997-04-09  0:13   ` Sudish Joseph
  1997-04-09  4:25     ` William M. Perry
  0 siblings, 1 reply; 12+ messages in thread
From: Sudish Joseph @ 1997-04-09  0:13 UTC (permalink / raw)


William M Perry writes:
>   Duh, it can be a list.  But I still need to hack the pop support to have
> some way to specify the host for pop retrieval.  Or am I overlooking
> something there as well.

I no longer use POP for retrieval, so take this with a cellar of
salt.  IMO, the best thing to do is to write a small shell wrapper for 
movemail that does all the fetching from various sources and then cats 
the lot into the file that GNUS specifies as the last arg.  You can
then use $MAILHOST[1] to select between servers. 

You should also consider having that script not connect to your POP
servers every time gnus says it should, as Gnus used to do it way too
often.[2]  Writing a timestamp from the script would suffice, I
guess. 

Finally, you could do what I did--give up on using pop through gnus
and run an external pop fetcher to put mail into a file that could be
added to nnmail-spool-file.  I used popclient from cron.  I believe
fetchmail is far and away the best pop client out there these days.[3]

-Sudish

Footnotes: 
[1]  movemail respects this.  IMO, it's a pity that movemail's pop
support wasn't done with proper args.  "po:" is gross.

[2]  I last used movemail's pop support a year back, gnus might have
changed for the better in this regard since then.

[3]  It has a daemon mode, will speak SMTP to deliver if you run an
MTA, and has lots of other nifty gadgets.  In particular, it handles
multiple servers with different accounts/passwords cleanly.  Even has
a well-designed configfile format.  Hmm, it's also written by Eric
Raymond, so the widgets will only get snazzier and more plentiful with
time. :-)


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

* Re: nnmail-spool-file should be a list...
  1997-04-08 20:21 nnmail-spool-file should be a list William M. Perry
  1997-04-08 21:13 ` William M. Perry
@ 1997-04-09  0:38 ` Stainless Steel Rat
  1997-04-09  2:17   ` John McClary Prevost
  1997-04-09  4:49   ` William M. Perry
  1 sibling, 2 replies; 12+ messages in thread
From: Stainless Steel Rat @ 1997-04-09  0:38 UTC (permalink / raw)


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

>>>>> "WMP" == William M Perry <wmperry@aventail.com> writes:

WMP> (setq nnmail-spool-files '("po:wmperry@aventail.com"
WMP>                            "po:wmperry@oz.net"
WMP>                            "/var/spool/mail/wmperry"))

Here is a problem that a few have run into: pop3 cannot deal with local
mail spool files; it is strictly a pop interface.  I expect the IMAP
equivalent to have a similar problem.  On the other hand, movemail is kinda
lame in a variety of ways but sometimes you need it.

To do things right, nnmail-spool-files should really be an alist, something
like this, to ensure that the correct method is used to retrieve mail:

(setq nnmail-spool-methods
      '(("po:wmperry@aventail.com" . 'nnmail-pop3-movemail) ; POP3
        ("po:wmperry@oz.net"       . 'nnmail-imap-movemail) ; IMAP
        ("/var/spool/mail/wmperry" . "movemail")            ; local spool file
        ))

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

iQCVAwUBM0rlDp6VRH7BJMxHAQFk4gP+OZOGwsLiWJz3UFE+SLg/lWdOpAnYuWH1
aPLKqUmuGDCk7SZJKWMvbDpjf/sdfWHzGaiJOAcASS+jmkcMvR6gte84oRqN0dxM
iVik4Jkq9RuhTp45rRM1TZObh1WC1eybk5wWb8Nx0qz8n9s/y8FL1BwHTJfAod9M
7VGrUYHTp7o=
=Gmde
-----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] 12+ messages in thread

* Re: nnmail-spool-file should be a list...
  1997-04-09  0:38 ` Stainless Steel Rat
@ 1997-04-09  2:17   ` John McClary Prevost
  1997-04-09  4:49   ` William M. Perry
  1 sibling, 0 replies; 12+ messages in thread
From: John McClary Prevost @ 1997-04-09  2:17 UTC (permalink / raw)


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

    Rat> Here is a problem that a few have run into: pop3 cannot deal
    Rat> with local mail spool files; it is strictly a pop interface.
    Rat> I expect the IMAP equivalent to have a similar problem.  On
    Rat> the other hand, movemail is kinda lame in a variety of ways
    Rat> but sometimes you need it.

Theoretically, IMAP mail stays on the server--the nnimap backend
(gotta get it to the "can be included w/ the Gnus dist" point) doesn't
want to be filed out of.  Filed into is doable.

John Prevost.


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

* Re: nnmail-spool-file should be a list...
  1997-04-09  0:13   ` Sudish Joseph
@ 1997-04-09  4:25     ` William M. Perry
  0 siblings, 0 replies; 12+ messages in thread
From: William M. Perry @ 1997-04-09  4:25 UTC (permalink / raw)
  Cc: ding

Sudish Joseph <sj@eng.mindspring.net> writes:

> William M Perry writes:
> >   Duh, it can be a list.  But I still need to hack the pop support to have
> > some way to specify the host for pop retrieval.  Or am I overlooking
> > something there as well.
> 
> I no longer use POP for retrieval, so take this with a cellar of salt.
> IMO, the best thing to do is to write a small shell wrapper for movemail
> that does all the fetching from various sources and then cats the lot
> into the file that GNUS specifies as the last arg.  You can then use
> $MAILHOST[1] to select between servers.

  Yes, but then I would have to socksify the damn thing, and I already went
to all the trouble of writing a socks5 client in emacs lisp.  :)

-Bill P.


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

* Re: nnmail-spool-file should be a list...
  1997-04-09  0:38 ` Stainless Steel Rat
  1997-04-09  2:17   ` John McClary Prevost
@ 1997-04-09  4:49   ` William M. Perry
  1997-04-09  8:58     ` Per Abrahamsen
  1997-04-09 22:25     ` Stainless Steel Rat
  1 sibling, 2 replies; 12+ messages in thread
From: William M. Perry @ 1997-04-09  4:49 UTC (permalink / raw)
  Cc: (ding)

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

> -----BEGIN PGP SIGNED MESSAGE-----
> 
> >>>>> "WMP" == William M Perry <wmperry@aventail.com> writes:
> 
> WMP> (setq nnmail-spool-files '("po:wmperry@aventail.com"
> WMP>                            "po:wmperry@oz.net"
> WMP>                            "/var/spool/mail/wmperry"))
> 
> Here is a problem that a few have run into: pop3 cannot deal with local
> mail spool files; it is strictly a pop interface.  I expect the IMAP
> equivalent to have a similar problem.  On the other hand, movemail is kinda
> lame in a variety of ways but sometimes you need it.
> 
> To do things right, nnmail-spool-files should really be an alist, something
> like this, to ensure that the correct method is used to retrieve mail:
> 
> (setq nnmail-spool-methods
>       '(("po:wmperry@aventail.com" . 'nnmail-pop3-movemail) ; POP3
>         ("po:wmperry@oz.net"       . 'nnmail-imap-movemail) ; IMAP
>         ("/var/spool/mail/wmperry" . "movemail")            ; local spool file
>         ))

  Well, in case anyone is interested, this is what I ended up with as just
a quick hack.

(setq nnmail-movemail-program 'my-movemail
      nnmail-spool-file 'pop)

(defun my-movemail (inbox crashbox)
  (require 'vm)
  (if (getenv "MAIL")
      (vm-spool-move-mail (getenv "MAIL") crashbox))
  (vm-pop-move-mail "oz.net:110:pass:wmperry:*" crashbox)
  (vm-pop-move-mail "aventail.com:110:pass:wmperry:*" crashbox))

It at least works. :)  The pop support in VM is quite nice and gives
_great_ feedback during mail downloads, and lets you limit both the # of
messages, the total size of the messages, and the max size of a message
that it will download in a single retrieval session.  Pretty nice - we
should rip code out of it, or at least mimic the functionality.  I'd like
to eventually see VM + GNUS use the same POP3 backend.

-Bill P.


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

* Re: nnmail-spool-file should be a list...
  1997-04-09  4:49   ` William M. Perry
@ 1997-04-09  8:58     ` Per Abrahamsen
  1997-04-09 11:49       ` Hrvoje Niksic
  1997-04-09 22:25     ` Stainless Steel Rat
  1 sibling, 1 reply; 12+ messages in thread
From: Per Abrahamsen @ 1997-04-09  8:58 UTC (permalink / raw)
  Cc: Stainless Steel Rat, (ding)


wmperry@aventail.com (William M. Perry) writes:

> It at least works. :)  The pop support in VM is quite nice and gives
> _great_ feedback during mail downloads, and lets you limit both the # of
> messages, the total size of the messages, and the max size of a message
> that it will download in a single retrieval session.  Pretty nice - we
> should rip code out of it, or at least mimic the functionality.  I'd like
> to eventually see VM + GNUS use the same POP3 backend.

Are you going to ask Kyle to sign papers for `vm-pop.el'?


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

* Re: nnmail-spool-file should be a list...
  1997-04-09  8:58     ` Per Abrahamsen
@ 1997-04-09 11:49       ` Hrvoje Niksic
  1997-04-09 14:16         ` William M. Perry
  0 siblings, 1 reply; 12+ messages in thread
From: Hrvoje Niksic @ 1997-04-09 11:49 UTC (permalink / raw)
  Cc: ding

Per Abrahamsen <abraham@dina.kvl.dk> writes:

> Are you going to ask Kyle to sign papers for `vm-pop.el'?

Kyle has expressed strong resent against assigning software to the
FSF, but I see that there *are* Kyle's assignments in copyright.list,
e.g. for life.el.

Kyle, could you please make an exception for vm-pop.el?  We'd like to
have it in Gnus, and Larse Ingebrigtsen cannot include it until the
copyright is assigned to the FSF.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Good pings come in small packets.


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

* Re: nnmail-spool-file should be a list...
  1997-04-09 11:49       ` Hrvoje Niksic
@ 1997-04-09 14:16         ` William M. Perry
  1997-04-09 17:45           ` Hrvoje Niksic
  0 siblings, 1 reply; 12+ messages in thread
From: William M. Perry @ 1997-04-09 14:16 UTC (permalink / raw)
  Cc: kyle_jones, ding

Hrvoje Niksic <hniksic@srce.hr> writes:

> Per Abrahamsen <abraham@dina.kvl.dk> writes:
> 
> > Are you going to ask Kyle to sign papers for `vm-pop.el'?
> 
> Kyle has expressed strong resent against assigning software to the FSF,
> but I see that there *are* Kyle's assignments in copyright.list, e.g. for
> life.el.

  I don't think I could in good conscience ask kyle to do that.  I had to
think long and hard about signing papers for Emacs/W3, as he had to with
VM.  That decision was made long ago.  Signing papers for a hodge-podge
of items within VM probably wouldn't make much sense.

  I would say the best thing to do here is have a generic pop3 package that
both VM 6.nn and Quassia Gnus could use.  Whether kyle would like to donate
vm-pop as the starting is a separate issue, but I'm not sre if that will
change his decision making process or not.

-Bill P.


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

* Re: nnmail-spool-file should be a list...
  1997-04-09 14:16         ` William M. Perry
@ 1997-04-09 17:45           ` Hrvoje Niksic
  0 siblings, 0 replies; 12+ messages in thread
From: Hrvoje Niksic @ 1997-04-09 17:45 UTC (permalink / raw)
  Cc: kyle_jones, ding

wmperry@aventail.com (William M. Perry) writes:

>   I don't think I could in good conscience ask kyle to do that.  I had to
> think long and hard about signing papers for Emacs/W3, as he had to with
> VM.

I have assigned copyright for Wget[1], so I'm not totally ignorant of
some of the things involved.  Note that Kyle's name can be found in
copyright.list for Emacs.

> I would say the best thing to do here is have a generic pop3 package
> that both VM 6.nn and Quassia Gnus could use.

I think vm-pop.el is good enough.

> Whether kyle would like to donate vm-pop as the starting is a
> separate issue,

That's exactly what I tried to ask.  Sorry if it somehow made a
different impression.


[1]
<URL:ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/wget.tar.gz>

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
WWW:  World-Wide-Waste.  Waste management corporation, which
      handles the billions of tons of garbage generated by just
      about everybody these days.


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

* Re: nnmail-spool-file should be a list...
  1997-04-09  4:49   ` William M. Perry
  1997-04-09  8:58     ` Per Abrahamsen
@ 1997-04-09 22:25     ` Stainless Steel Rat
  1 sibling, 0 replies; 12+ messages in thread
From: Stainless Steel Rat @ 1997-04-09 22:25 UTC (permalink / raw)


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

>>>>> "WMP" == William M Perry <wmperry@aventail.com> writes:

WMP> It at least works. :) The pop support in VM is quite nice and gives
WMP> _great_ feedback during mail downloads, and lets you limit both the #
WMP> of messages, the total size of the messages, and the max size of a
WMP> message that it will download in a single retrieval session.

pop3-movemail already gives a running count of messages retrieved.  Adding
to pop3 is outside of its scope; it is really intended to be nothing more
than a basic POP3 interface.  If you want more complex things, a pop3-aux
library that uses the pop3 library would be the way to do it.  The
pop3-movemail function is included in pop3 more as a guide to building a
function for retrieving mail from a POP server rather than being the be-all
and end-all way of doing so.

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

iQCVAwUBM0wXUZ6VRH7BJMxHAQGxxwQApEp1YB2b1OM22tuoa0B5fjxzFhtkcLqK
g2BGvyCrZwX8+puuSjxfndBac3upWCJVHsf1BGVOnEdPfairm4PKdd95acFzLUJq
J8DjVxAlHSRpaSlg4B5PF6lcLtco1PjijAbkCAr1eXwfZuwcoqQ0moHilNS4gjWD
C9o1utnuzx4=
=YAXE
-----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] 12+ messages in thread

end of thread, other threads:[~1997-04-09 22:25 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-08 20:21 nnmail-spool-file should be a list William M. Perry
1997-04-08 21:13 ` William M. Perry
1997-04-09  0:13   ` Sudish Joseph
1997-04-09  4:25     ` William M. Perry
1997-04-09  0:38 ` Stainless Steel Rat
1997-04-09  2:17   ` John McClary Prevost
1997-04-09  4:49   ` William M. Perry
1997-04-09  8:58     ` Per Abrahamsen
1997-04-09 11:49       ` Hrvoje Niksic
1997-04-09 14:16         ` William M. Perry
1997-04-09 17:45           ` Hrvoje Niksic
1997-04-09 22:25     ` 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).