Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Using fetchmail with gnus (on Windows)
@ 2002-06-18 16:21 Peter Davis
       [not found] ` <m3lm9cqxdh.fsf@multivac.cwru.edu>
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Peter Davis @ 2002-06-18 16:21 UTC (permalink / raw)



I've given up trying to get gnus to handle my pop servers correctly (leave 
mail on one, delete from the other).  So I'm now thinking of using 
fetchmail instead.  However, I have a couple of questions:

1) fetchmail seems to leave a bunch of msg.blahblahblah files in my 
/var/spool/mail/pdavis directory by default.  Is this something gnus can 
read as a file mail source?, or do I have to get fetchmail to put all the 
messages into one file somehow?  Anyone know what format or how to do that?

2) I'm on a Windows box, running fetchmail via cygwin.  XEmacs and fsf 
emacs, however, are native Windows apps.  Is there some way to get gnus to 
run fetchmail whenever I type 'g'?  I don't want to have a fetchmail daemon 
running continuously.  I only want fetchmail to happen when I try to get 
new mail in gnus.

Thanks very much!


-- 
--------
    Peter Davis                               Pageflex Inc
    617-520-8345                          215 First Street
    617-868-0784 (FAX)                 Cambridge, MA 02142
    pdavis@pageflexinc.com      http://www.pageflexinc.com


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

* Re: Using fetchmail with gnus (on Windows)
       [not found] ` <m3lm9cqxdh.fsf@multivac.cwru.edu>
@ 2002-06-19  3:44   ` pd
  0 siblings, 0 replies; 13+ messages in thread
From: pd @ 2002-06-19  3:44 UTC (permalink / raw)



"Paul Jarc" <prj@po.cwru.edu> wrote in message
news:m3lm9cqxdh.fsf@multivac.cwru.edu...
> Peter Davis <pdavis@pageflexinc.com> wrote:
> > 1) fetchmail seems to leave a bunch of msg.blahblahblah files in my
> > /var/spool/mail/pdavis directory by default.  Is this something gnus
> > can read as a file mail source?
>
> That depends on the format of those files.

It's basically one message per file.  There are no tmp or new or current
subdirectories, which is what I think maildir would expect.

> > Is there some way to get gnus to run fetchmail whenever I type 'g'?
>
> Try adding a (shell-command) call as a :prescript for the mail-sources
> entry.

I've just found a perl script that fetches messages from a POP server, so
maybe that will solve my problem.  I'll have to hack it a bit, though.  For
those interested, it's at:

http://www.ibiblio.org/pub/Linux/system/mail/pop/!INDEX.html


Thanks,

-pd


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

* Re: Using fetchmail with gnus (on Windows)
       [not found]     ` <868z56jtd4.fsf@pille.my-fqdn.de>
@ 2002-06-23 13:43       ` Peter Davis
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Davis @ 2002-06-23 13:43 UTC (permalink / raw)


Frank Haun <pille3000@gmx.net> writes:

> Peter Davis <pd@world.std.com> writes:
> 
> > Peter Davis <pd@world.std.com> writes:
> >
> > > So, I put this into my .gnus file, 
> > > 
> > >      setq mail-sources
>         ^
>         ^ missing parenthesis
> 
> > >      
> > >           '((file
> > >              :path "c:\\cygwin\\var\\spool\\mail\\pdavis")
> > >             )
>                  ^
>                  ^ missing parenthesis
> 
> Hm, maybe you've omitted pieces of your setup.

Yes, the context is ...

(if (string-match "XEmacs\\|Lucid" emacs-version)
    (
         setq mail-sources '((file
                              :path "f:/cygwin/var/spool/mail/pdavis"
                  ))
          )
    .
    .
    .
)

> > > figuring gnus would fetch the messages from this spool file.  It
> > > didn't.  All it tells me is "no new mail".
> 
> > I also tried the 
> > '((file :path "c:/cygwin/var/spool/mail/pdavis")
> 
> This looks okay to specify a file.
> 
> > Any hints?
> 
> What does `C-h v mail-sources' say?

Value: ((file :path "c:/cygwin/var/spool/mail/pdavis"))

Yet it doesn't appear to be finding the file at all.  It doesn't
matter whether I have a file there or not.  I always get "no new
mail." 

-pd


-- 
--------
                             Peter Davis
               Funny stuff at http://www.pfdstudio.com
    List of resources for children's writers and illustrators at:
                  http://www.pfdstudio.com/cwrl.html


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

* Re: Using fetchmail with gnus (on Windows)
       [not found] ` <r8j3w69o.fsf@bitstream.com>
       [not found]   ` <znxmpt5h.fsf@bitstream.com>
@ 2002-06-26 14:53   ` Peter Davis
       [not found]     ` <m3it468440.fsf@multivac.cwru.edu>
  1 sibling, 1 reply; 13+ messages in thread
From: Peter Davis @ 2002-06-26 14:53 UTC (permalink / raw)



Can't anyone tell me what format the 'file' mail-source is supposed to
be?  Or how to get gnus to read it?  The info on mail source
specifiers does not describe this at all.

Thanks,

-pd



Peter Davis <pd@world.std.com> writes:

[...]

> Ok, I've figured out the one-message-per-file problem.  I ignorantly
> created a directory /var/spool/mail/pdavis/, where I thought the spool
> file from fetchmail would go.  Wrong.  Once I got rid of the pdavis
> directory, fetchmail very nicely put a spool file named pdavis into
> /var/spool/mail for me.
> 
> This file appears to be all the new messages appended together.  Each
> begins with a line like:
> 
>     From pdavis ...
> 
> 
> So, I put this into my .gnus file, 
> 
>      setq mail-sources
>           '((file
>              :path "c:\\cygwin\\var\\spool\\mail\\pdavis")
>             )
> 
> figuring gnus would fetch the messages from this spool file.  It
> didn't.  All it tells me is "no new mail".
> 
> So how can I get gnus to read this?  The above code seems to match
> what's described in the info file.  Once I can get this working, I can
> use :prescript to actually call fetchmail (I hope!)
> 
> Thanks very much.
> 
> -pd

-- 
--------
                             Peter Davis
               Funny stuff at http://www.pfdstudio.com
                 The artwork formerly shown as prints
    List of resources for children's writers and illustrators at:
                  http://www.pfdstudio.com/cwrl.html


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

* Re: Using fetchmail with gnus (on Windows)
       [not found]     ` <m3it468440.fsf@multivac.cwru.edu>
@ 2002-06-26 19:12       ` Peter Davis
  2002-06-26 20:29         ` Josh Huber
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Davis @ 2002-06-26 19:12 UTC (permalink / raw)


prj@po.cwru.edu (Paul Jarc) writes:

> Peter Davis <pd@world.std.com> wrote:
> > Can't anyone tell me what format the 'file' mail-source is supposed to
> > be?  Or how to get gnus to read it?  The info on mail source
> > specifiers does not describe this at all.
> 
> It seems to be in the right format.  You could try stepping through
> nnmail-get-new-mail or mail-source-fetch-file.

Thanks, Paul.  Unfortunately, I'm pretty much of a lisp novice, and
have never stepped through code before.  Still, I may give this a go
if I can figure it out.

Meanwhile, I'm starting to suspect that gnus is never finding the file
at all, since it gives the exact same message whether I specify an
existing spool file or a non-existent file.

Thanks,

-pd


-- 
--------
                             Peter Davis
               Funny stuff at http://www.pfdstudio.com
                 The artwork formerly shown as prints
    List of resources for children's writers and illustrators at:
                  http://www.pfdstudio.com/cwrl.html


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

* Re: Using fetchmail with gnus (on Windows)
  2002-06-26 19:12       ` Peter Davis
@ 2002-06-26 20:29         ` Josh Huber
  2002-06-27  2:47           ` pd
  0 siblings, 1 reply; 13+ messages in thread
From: Josh Huber @ 2002-06-26 20:29 UTC (permalink / raw)


Peter Davis <pd@world.std.com> writes:

> Meanwhile, I'm starting to suspect that gnus is never finding the
> file at all, since it gives the exact same message whether I specify
> an existing spool file or a non-existent file.

Could this be a problem with movemail?

-- 
Josh Huber


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

* Re: Using fetchmail with gnus (on Windows)
  2002-06-26 20:29         ` Josh Huber
@ 2002-06-27  2:47           ` pd
       [not found]             ` <87ofdxpci6.fsf@alum.wpi.edu>
  0 siblings, 1 reply; 13+ messages in thread
From: pd @ 2002-06-27  2:47 UTC (permalink / raw)



"Josh Huber" <huber@alum.wpi.edu> wrote in message
news:87it45pyw7.fsf@alum.wpi.edu...
> Peter Davis <pd@world.std.com> writes:
>
> > Meanwhile, I'm starting to suspect that gnus is never finding the
> > file at all, since it gives the exact same message whether I specify
> > an existing spool file or a non-existent file.
>
> Could this be a problem with movemail?

I don't know.  Where does movemail come into it?  I thought movemail was
essentially an alternative to fetchmail, which is what I'm using.  Once I
have that spool file on my local disk, can't Gnus read that directly?

Thanks,

-pd


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

* Re: Using fetchmail with gnus (on Windows)
       [not found]                 ` <87y9d0ol0j.fsf@alum.wpi.edu>
@ 2002-06-27 14:52                   ` Peter Davis
  2002-06-27 15:57                     ` Josh Huber
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Davis @ 2002-06-27 14:52 UTC (permalink / raw)


Josh Huber <huber@alum.wpi.edu> writes:

> Peter Davis <pd@world.std.com> writes:
> 
> > Ok, I see that I had been using 
> >
> > 	(setq nnmail-movemail-program 'pop3-nnmail-movemail)
> >
> > when I was trying to use pop3 as a mail source.  If I want to use a
> > spool file as a mail source, and nnml as a backend, what should this
> > be set to?  I'd like to read the messages from the spool file, and
> > split them into various nnml groups.
> 
> Chances are pretty good that you don't want to be changing the value
> of nnmail-movemail-program, but I'm not sure as that variable doesn't
> exist in Oort.

Oh great.  So once I finally get everything working, I'll have to
change it all when Oort becomes real?  ;^)


> > Perhaps someone with more experience with the actual released version
> of Gnus can answer you here.  The value of my equivilant variable
> (mail-source-movemail-program) is nil.  After looking at the code,
> when this variable is nil, it looks for the "movemail" program and
> uses that.
> 
> I suggest setting nnmail-movemail-program to nil, or even better, just
> leaving it at the default value.

Ok, I've got *no* setting for nnmail-movemail-program at all, and I'm
*still* not getting any messages from the spool file.

Does anyone have a working gnus 5.8.8 or 5.9 setup that actually reads
/var/spool/mail/... successfully?  I'm at my wit's end (not a long
trip) here.

> > > Locking is not an issue.  I want to use fetchmail to get messages
> > from a couple of POP3 servers, and put all the messages into
> > /var/spool/mail/pdavis.  Then I want Gnus to read messages from
> > there, and split them into my various nnml groups.  I plan to run
> > fetchmail explicitly as a :prescript on the mail source, so there
> > should be no problem with locking.
> 
> I see, I thought you would be using it in daemon mode.  Gnus still
> doesn't like it when you modify a file while it's running.

I won't use daemon mode because I want my office mail left on the POP
server when I'm out, so I can read it at home, and vice versa.  In
fact, it's this nasty business of wanting to leave mail on one server
and not another that's started me looking at fetchmail in the first
place.

> > > I had thought that nnmbox was a back-end, an alternative to nnml, to
> > determine how the messages could be saved by Gnus, not how they
> > would be input to Gnus.  Are you saying that I could just read the
> > spool file using the nnmbox backend, and manually move the messages
> > elsewhere if I wanted to?
> 
> Actually you could use nndoc to at least view the spool and move
> messages elsewhere.  nndoc is a read-only backend which allows access
> to many single-file mailbox formats.
> 
> In the *Groups* buffer, hit G f and type the path to your spool file.
> You should be able to at least view and move messages elsewhere.
> 
> I don't think this is a good solution though -- getting the
> mail-sources working right is the best way to go.

Agreed!  I would like the spool file to work as a mail source.

Thanks for all your help.

-pd


-- 
--------
                             Peter Davis
               Funny stuff at http://www.pfdstudio.com
                 The artwork formerly shown as prints
    List of resources for children's writers and illustrators at:
                  http://www.pfdstudio.com/cwrl.html


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

* Re: Using fetchmail with gnus (on Windows)
  2002-06-27 14:52                   ` Peter Davis
@ 2002-06-27 15:57                     ` Josh Huber
       [not found]                       ` <it44ziwa.fsf@bitstream.com>
  0 siblings, 1 reply; 13+ messages in thread
From: Josh Huber @ 2002-06-27 15:57 UTC (permalink / raw)


Peter Davis <pd@world.std.com> writes:

> Oh great.  So once I finally get everything working, I'll have to
> change it all when Oort becomes real?  ;^)

No, I don't think so.  You'll probably have to change a couple things,
but nothing serious. (I think! :)

Basically, the default should work in both cases (5.8.8, oort)

> I won't use daemon mode because I want my office mail left on the
> POP server when I'm out, so I can read it at home, and vice versa.
> In fact, it's this nasty business of wanting to leave mail on one
> server and not another that's started me looking at fetchmail in the
> first place.

Right, I see now.

> Agreed!  I would like the spool file to work as a mail source.

Right, and this should be one of those settings which just works.  I
wonder if there are some problems due to you using Windows?  Does
movemail work on windows?

copy your spool file to a temp file, and test movemail:

cp /var/spool/mail/pdavis /tmp/foo
movemail /tmp/foo /tmp/bar

check to see if /tmp/bar has the contents of your spool file.  Making
sure movemail works and is in your path would be a good thing to do, I
think.

Hope that helps,

-- 
Josh Huber


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

* Re: Using fetchmail with gnus (on Windows)
       [not found]                       ` <it44ziwa.fsf@bitstream.com>
@ 2002-06-27 18:45                         ` Peter Davis
  2002-06-27 22:40                           ` Frank Haun
  0 siblings, 1 reply; 13+ messages in thread
From: Peter Davis @ 2002-06-27 18:45 UTC (permalink / raw)


Peter Davis <pd@world.std.com> writes:

> Josh Huber <huber@alum.wpi.edu> writes:
> 
> > Peter Davis <pd@world.std.com> writes:
> 
> [...]
> 
> > > Agreed!  I would like the spool file to work as a mail source.
> > 
> > Right, and this should be one of those settings which just works.  I
> > wonder if there are some problems due to you using Windows?  Does
> > movemail work on windows?
> > 
> > copy your spool file to a temp file, and test movemail:
> > 
> > cp /var/spool/mail/pdavis /tmp/foo
> > movemail /tmp/foo /tmp/bar
> > 
> > check to see if /tmp/bar has the contents of your spool file.  Making
> > sure movemail works and is in your path would be a good thing to do, I
> > think.
> > 
> > Hope that helps,
> 
> Hmmm.  Where is this movemail program supposed to come from?  I don't
> have it on any of my paths for either Windows or Cygwin.  Perhaps this
> is the problem, but shouldn't gnus give me some warning if it can't
> find any movemail program?  I'm using XEmacs 21.4(6), and fsf emacs
> 21.1.

I take it back.  I did find movemail programs for both fsf emacs and
XEmacs.  They were apparently part of the Windows distributions of
these.  They're not on my regular executable path, but I assume emacs
knows how to find them.

So this still leave me with the basic problem:  Why doesn't gnus read
mail from this spool file.  Aargh!

Thanks for all help thus far.


-pd


-- 
--------
                             Peter Davis
               Funny stuff at http://www.pfdstudio.com
                 The artwork formerly shown as prints
    List of resources for children's writers and illustrators at:
                  http://www.pfdstudio.com/cwrl.html


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

* Re: Using fetchmail with gnus (on Windows)
  2002-06-27 18:45                         ` Peter Davis
@ 2002-06-27 22:40                           ` Frank Haun
       [not found]                             ` <bs9wump3.fsf@bitstream.com>
  0 siblings, 1 reply; 13+ messages in thread
From: Frank Haun @ 2002-06-27 22:40 UTC (permalink / raw)


Peter Davis <pd@world.std.com> writes:

> So this still leave me with the basic problem:  Why doesn't gnus read
> mail from this spool file.  Aargh!

In one of your earlier articles I've found:

| :path "c:\\cygwin\\var\\spool\\mail\\pdavis"
| :path "f:/cygwin/var/spool/mail/pdavis"

Where is the file, `C:' or `F:'?

Hm, maybe I'll test it tomorrow on my Windows partition and a spool
file.

[Ok, done the test]

I've copied a small spool file with 5 messages from my Unix box to
"f:/var/mail/fhaun". On W2K I use this setting with Emacs 21.2 and Oort
Gnus v0.06:

(add-to-list 'gnus-secondary-select-methods '(nnml ""))
(setq mail-sources
      '((file :path "f:/var/mail/fhaun")))

It works. _NO_ problems. For testing I've converted all "UNIX line ends"
to "DOS line ends". It works too. And if there are problems with
permissions, movemail.exe complains about it.

Frank
-- 
  line-move: End of buffer [42 times]


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

* Re: Using fetchmail with gnus (on Windows)
       [not found]                             ` <bs9wump3.fsf@bitstream.com>
@ 2002-06-28  8:31                               ` Frank Schmitt
  0 siblings, 0 replies; 13+ messages in thread
From: Frank Schmitt @ 2002-06-28  8:31 UTC (permalink / raw)


Peter Davis <pd@world.std.com> writes:

> -pd, who's gone back to using VM for now, so I can at least keep up
> with e-mail.

How about posting your complete .gnus and .emacs?

-- 
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.


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

* Re: Using fetchmail with gnus (on Windows)
       [not found]                 ` <vaflm8n8pnu.fsf@lucy.cs.uni-dortmund.de>
@ 2002-07-08 15:00                   ` Peter Davis
  0 siblings, 0 replies; 13+ messages in thread
From: Peter Davis @ 2002-07-08 15:00 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai writes:

> Peter Davis <pd@world.std.com> writes:
> 
> > Ok, I tried this.  I got to the line
> >
> >     (mail-source-bind (file source)
> >
> > I stepped once (over "mail-source-bind"), and when I hit SPC again, I
> > got:
> >
> > Mail source error ((wrong-type-argument listp 1)).  Continue? (yes or no)
> 
> To see more, you'll need to do the M-x edebug-defun RET trick on
> mail-source-bind, too.  (And so on.)

Unfortunately, there is no defun for mail-source-bind.  It appears to
be a macro.  There is a mail-source-bind-1 defun'ed inside an
eval-and-compile, but I don't think I was able to set an edebug
breakpoint inside that.


> > Oh, and what do `e file RET' and `e source RET' say when you get to
> the spot you are showing?  Do these values appear reasonable?

'e file' says "Symbol's value as a variable is void: file".  'e
source' returns "(file :path "c:/cygwin/var/spool/mail/pdavis")" which
seems correct to me.  I'm not sure what file is supposed to be.

Thanks,

-pd


-- 
--------
                             Peter Davis
               Funny stuff at http://www.pfdstudio.com
                 The artwork formerly shown as prints
    List of resources for children's writers and illustrators at:
                  http://www.pfdstudio.com/cwrl.html


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

end of thread, other threads:[~2002-07-08 15:00 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-18 16:21 Using fetchmail with gnus (on Windows) Peter Davis
     [not found] ` <m3lm9cqxdh.fsf@multivac.cwru.edu>
2002-06-19  3:44   ` pd
     [not found] ` <r8j3w69o.fsf@bitstream.com>
     [not found]   ` <znxmpt5h.fsf@bitstream.com>
     [not found]     ` <868z56jtd4.fsf@pille.my-fqdn.de>
2002-06-23 13:43       ` Peter Davis
2002-06-26 14:53   ` Peter Davis
     [not found]     ` <m3it468440.fsf@multivac.cwru.edu>
2002-06-26 19:12       ` Peter Davis
2002-06-26 20:29         ` Josh Huber
2002-06-27  2:47           ` pd
     [not found]             ` <87ofdxpci6.fsf@alum.wpi.edu>
     [not found]               ` <wusk28cy.fsf@bitstream.com>
     [not found]                 ` <87y9d0ol0j.fsf@alum.wpi.edu>
2002-06-27 14:52                   ` Peter Davis
2002-06-27 15:57                     ` Josh Huber
     [not found]                       ` <it44ziwa.fsf@bitstream.com>
2002-06-27 18:45                         ` Peter Davis
2002-06-27 22:40                           ` Frank Haun
     [not found]                             ` <bs9wump3.fsf@bitstream.com>
2002-06-28  8:31                               ` Frank Schmitt
     [not found] ` <4rfgc0kv.fsf@bitstream.com>
     [not found]   ` <vafd6u4u66o.fsf@lucy.cs.uni-dortmund.de>
     [not found]     ` <vafpty3fu7y.fsf@lucy.cs.uni-dortmund.de>
     [not found]       ` <uhejfqytj.fsf@bitstream.com>
     [not found]         ` <vafn0t7cuug.fsf@lucy.cs.uni-dortmund.de>
     [not found]           ` <u8z4qpa62.fsf@bitstream.com>
     [not found]             ` <vaffzyy449z.fsf@lucy.cs.uni-dortmund.de>
     [not found]               ` <u1yagifew.fsf@bitstream.com>
     [not found]                 ` <vaflm8n8pnu.fsf@lucy.cs.uni-dortmund.de>
2002-07-08 15:00                   ` Peter Davis

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