Gnus development mailing list
 help / color / mirror / Atom feed
* Backend-specific nnmail-spool-file?
@ 1998-12-08 14:42 Lloyd Zusman
  1998-12-08 15:20 ` David S. Goldberg
  1998-12-08 15:42 ` Kai.Grossjohann
  0 siblings, 2 replies; 12+ messages in thread
From: Lloyd Zusman @ 1998-12-08 14:42 UTC (permalink / raw)
  Cc: ding

[ This is an auto-generated, courtesy copy of a message that I've
  also posted to the gnu.emacs.gnus newsgroup. ]

I'm using pgnus-0.65 under XEmacs-21.2.beta4.

I would like to do my email splitting outside of Gnus and Emacs.  This
would result in a group of mail spool files that I would need to check
from within Gnus.  I want to use the `nnml' backend, and I want to
create a separate backend instance for each of these spool files.

Is it possible to specify a different `nnmail-spool-file' for each
backend instance?  The Info documentation for pgnus-0.65 seems to
say otherwise:

  Mail Backend Variables 
  ---------------------- 
 
     These variables are (for the most part) pertinent to all the various 
  mail backends. 

  [ ... ]

  `nnmail-spool-file' 
       The backends will look for new mail in this file.  If this 
       variable is `nil', the mail backends will never attempt to fetch 
       mail by themselves.  [ ... ]

This seems to imply that I can only use one instance of the variable
`nnmail-spool-file' for any given Gnus session, but perhaps I'm mis-
interpreting what is being said here.

I also understand that `nnmail-spool-file' might also be a list, but
my understanding is that all the files in that list are searched for
email, irrespective of which email backend is being used.  What I want
is for each `nnml' backend instance to look at a completely different
mail spool file.

Is this possible?

Thanks in advance.

-- 
 Lloyd Zusman
 ljz@asfast.com


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

* Re: Backend-specific nnmail-spool-file?
  1998-12-08 14:42 Backend-specific nnmail-spool-file? Lloyd Zusman
@ 1998-12-08 15:20 ` David S. Goldberg
  1998-12-08 15:37   ` Lloyd Zusman
  1998-12-08 15:42 ` Kai.Grossjohann
  1 sibling, 1 reply; 12+ messages in thread
From: David S. Goldberg @ 1998-12-08 15:20 UTC (permalink / raw)
  Cc: ding

I haven't tried this (I'm not sure I understand why you'd want to have
a separate nnml instance (I assume you mean server?) for each file,
but does something like this work?

(setq nnmail-spool-file nil)
(setq nnml-get-new-mail t)
(setq gnus-secondary-select-methods '((nnml "a" 
					     (nnml-directory "/path/to/a")
					     (nnmail-spool-file "a.spool"))
				      (nnml "b"
					     (nnml-directory "/path/to/b")
					     (nnmail-spool-file "b.spool"))))


-- 
Dave Goldberg
Post: The Mitre Corporation\MS B305\202 Burlington Rd.\Bedford, MA 01730
Phone: 781-271-3887
Email: dsg@mitre.org


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

* Re: Backend-specific nnmail-spool-file?
  1998-12-08 15:20 ` David S. Goldberg
@ 1998-12-08 15:37   ` Lloyd Zusman
  0 siblings, 0 replies; 12+ messages in thread
From: Lloyd Zusman @ 1998-12-08 15:37 UTC (permalink / raw)


dsg@mitre.org (David S. Goldberg) writes:

> I haven't tried this (I'm not sure I understand why you'd want to have
> a separate nnml instance (I assume you mean server?) for each file,
> but does something like this work?
> 
> (setq nnmail-spool-file nil)
> (setq nnml-get-new-mail t)
> (setq gnus-secondary-select-methods '((nnml "a" 
> 					     (nnml-directory "/path/to/a")
> 					     (nnmail-spool-file "a.spool"))
> 				      (nnml "b"
> 					     (nnml-directory "/path/to/b")
> 					     (nnmail-spool-file "b.spool"))))

When I said "instance", I meant what you call "server"; i.e., I'm calling
each secondary select method an "instance".

The reason I asked my question to begin with is that I believe that
the `nnmail-spool-file' cannot be used as you have specified here.  I
believe that its setting within the secondary select methods is
ignored ... it doesn't seem to be one of those special variables such
as `nnml-directory' which can have instance-specific (or, if you
prefer, "server-specific") settings.


-- 
 Lloyd Zusman
 ljz@asfast.com


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

* Re: Backend-specific nnmail-spool-file?
  1998-12-08 14:42 Backend-specific nnmail-spool-file? Lloyd Zusman
  1998-12-08 15:20 ` David S. Goldberg
@ 1998-12-08 15:42 ` Kai.Grossjohann
  1998-12-08 16:42   ` Lloyd Zusman
  1 sibling, 1 reply; 12+ messages in thread
From: Kai.Grossjohann @ 1998-12-08 15:42 UTC (permalink / raw)


Lloyd Zusman <ljz@asfast.com> writes:

  > I would like to do my email splitting outside of Gnus and Emacs.
  > This would result in a group of mail spool files that I would need
  > to check from within Gnus.  I want to use the `nnml' backend, and
  > I want to create a separate backend instance for each of these
  > spool files.

Do you mean groups rather than backends?

If so, nnmail-use-procmail is your friend.  Also see
nnmail-procmail-directory and nnmail-procmail-suffix.  In a nutshell:

If nnmail-use-procmail is t and nnmail-procmail-directory is
"~/spool/" and nnmail-procmail-suffix is ".in", then Gnus puts all
mails from the file "~/spool/foo.bar.in" into the group
"nnml:foo.bar".  (It does not make a difference whether procmail wrote
these files, or Mailagent, or slocal, or something else, they just
need to be mbox format files.)

kai
-- 
This gubblick contains many nonsklarkish English flutzpahs,
but the overall pluggandisp can be glorked from context. -- David Moser


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

* Re: Backend-specific nnmail-spool-file?
  1998-12-08 15:42 ` Kai.Grossjohann
@ 1998-12-08 16:42   ` Lloyd Zusman
  1998-12-08 23:12     ` Kai.Grossjohann
  1998-12-13  2:07     ` Justin Sheehy
  0 siblings, 2 replies; 12+ messages in thread
From: Lloyd Zusman @ 1998-12-08 16:42 UTC (permalink / raw)


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

> Lloyd Zusman <ljz@asfast.com> writes:
> 
>   > I would like to do my email splitting outside of Gnus and Emacs.
>   > This would result in a group of mail spool files that I would need
>   > to check from within Gnus.  I want to use the `nnml' backend, and
>   > I want to create a separate backend instance for each of these
>   > spool files.
> 
> Do you mean groups rather than backends?
> 
> If so, nnmail-use-procmail is your friend.  Also see
> nnmail-procmail-directory and nnmail-procmail-suffix.  In a nutshell:
> 
> If nnmail-use-procmail is t and nnmail-procmail-directory is
> "~/spool/" and nnmail-procmail-suffix is ".in", then Gnus puts all
> mails from the file "~/spool/foo.bar.in" into the group
> "nnml:foo.bar".  (It does not make a difference whether procmail wrote
> these files, or Mailagent, or slocal, or something else, they just
> need to be mbox format files.)

Well, this could work for me, but my preferred way of doing this would
be to have one spool file called `/var/spool/mail/oneuser', another
called `/var/spool/mail/anotheruser', etc. ... i.e., no special
suffixes.  Note that I would run Gnus as user `root', which is easy
for me to do from my personal Linux machine at home.

Any chance for this?

-- 
 Lloyd Zusman
 ljz@asfast.com


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

* Re: Backend-specific nnmail-spool-file?
  1998-12-08 16:42   ` Lloyd Zusman
@ 1998-12-08 23:12     ` Kai.Grossjohann
  1998-12-10  4:25       ` Lloyd Zusman
  1998-12-13  2:07     ` Justin Sheehy
  1 sibling, 1 reply; 12+ messages in thread
From: Kai.Grossjohann @ 1998-12-08 23:12 UTC (permalink / raw)


Lloyd Zusman <ljz@asfast.com> writes:

  > Well, this could work for me, but my preferred way of doing this
  > would be to have one spool file called `/var/spool/mail/oneuser',
  > another called `/var/spool/mail/anotheruser', etc. ... i.e., no
  > special suffixes.

(setq nnmail-procmail-suffix "")

I think in the Olde Days the above didn't work, but now it does.  Am I
wrong? 

kai
-- 
This gubblick contains many nonsklarkish English flutzpahs,
but the overall pluggandisp can be glorked from context. -- David Moser


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

* Re: Backend-specific nnmail-spool-file?
  1998-12-08 23:12     ` Kai.Grossjohann
@ 1998-12-10  4:25       ` Lloyd Zusman
  1998-12-10 12:52         ` Kai.Grossjohann
  0 siblings, 1 reply; 12+ messages in thread
From: Lloyd Zusman @ 1998-12-10  4:25 UTC (permalink / raw)


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

> Lloyd Zusman <ljz@asfast.com> writes:
> 
>   > Well, this could work for me, but my preferred way of doing this
>   > would be to have one spool file called `/var/spool/mail/oneuser',
>   > another called `/var/spool/mail/anotheruser', etc. ... i.e., no
>   > special suffixes.
> 
> (setq nnmail-procmail-suffix "")
> 
> I think in the Olde Days the above didn't work, but now it does.  Am I
> wrong? 

Thanks!

I will test it shortly.

But what I would *really* like would be something like this:

  (setq nnmail-procmail-regexp
        "/var/spool/mail/\\(userone\\|seconduser\\|lastperson\\)$")

This way, I could process only the mail spool files for "userone",
"seconduser", and "lastperson" and ignore all the rest of the spool
files in `/var/spool/mail'.

I'll hack around with the procmail stuff and see if this might
turn out to be an easy-to-add feature.

-- 
 Lloyd Zusman
 ljz@asfast.com


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

* Re: Backend-specific nnmail-spool-file?
  1998-12-10  4:25       ` Lloyd Zusman
@ 1998-12-10 12:52         ` Kai.Grossjohann
  1998-12-10 14:08           ` Lloyd Zusman
  0 siblings, 1 reply; 12+ messages in thread
From: Kai.Grossjohann @ 1998-12-10 12:52 UTC (permalink / raw)


Lloyd Zusman <ljz@asfast.com> writes:

  > But what I would *really* like would be something like this:
  > 
  >   (setq nnmail-procmail-regexp
  >         "/var/spool/mail/\\(userone\\|seconduser\\|lastperson\\)$")

But you're doing this on your home machine, where you have complete
control, no?  Then it should be easy to tell your mail delivery
program to put mail into convenient places.

kai
-- 
This gubblick contains many nonsklarkish English flutzpahs,
but the overall pluggandisp can be glorked from context. -- David Moser


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

* Re: Backend-specific nnmail-spool-file?
  1998-12-10 12:52         ` Kai.Grossjohann
@ 1998-12-10 14:08           ` Lloyd Zusman
  0 siblings, 0 replies; 12+ messages in thread
From: Lloyd Zusman @ 1998-12-10 14:08 UTC (permalink / raw)


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

> Lloyd Zusman <ljz@asfast.com> writes:
> 
>   > But what I would *really* like would be something like this:
>   > 
>   >   (setq nnmail-procmail-regexp
>   >         "/var/spool/mail/\\(userone\\|seconduser\\|lastperson\\)$")
> 
> But you're doing this on your home machine, where you have complete
> control, no?  Then it should be easy to tell your mail delivery
> program to put mail into convenient places.

Yep.  And that's what I'll be doing.

And also, I will see how hard it would be to add the "regexp"
functionality to Gnus's procmail handling.  I think that it will
be fairly straightforward to do so, and if so, I'll post patches
in a few days.


-- 
 Lloyd Zusman
 ljz@asfast.com


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

* Re: Backend-specific nnmail-spool-file?
  1998-12-08 16:42   ` Lloyd Zusman
  1998-12-08 23:12     ` Kai.Grossjohann
@ 1998-12-13  2:07     ` Justin Sheehy
  1998-12-13  3:08       ` Lloyd Zusman
  1 sibling, 1 reply; 12+ messages in thread
From: Justin Sheehy @ 1998-12-13  2:07 UTC (permalink / raw)


Lloyd Zusman <ljz@asfast.com> writes:

> my preferred way of doing this would be to have one spool file
> called `/var/spool/mail/oneuser', another called
> `/var/spool/mail/anotheruser', etc. ... i.e., no special suffixes.
> Note that I would run Gnus as user `root', which is easy for me to
> do from my personal Linux machine at home.

Icky.

You really ought to do things the right way, instead of treating your
machine as if it was running some POS single-user operating system.

It is quite trivial to receive mail for multiple addresses at one
machine and have them all be read by the same user without doing
anything nearly as silly as what you suggest.

-- 
Justin Sheehy

In a cloud bones of steel.
  




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

* Re: Backend-specific nnmail-spool-file?
  1998-12-13  2:07     ` Justin Sheehy
@ 1998-12-13  3:08       ` Lloyd Zusman
  1998-12-13  4:15         ` Justin Sheehy
  0 siblings, 1 reply; 12+ messages in thread
From: Lloyd Zusman @ 1998-12-13  3:08 UTC (permalink / raw)


Justin Sheehy <justin@linus.mitre.org> writes:

> Lloyd Zusman <ljz@asfast.com> writes:
> 
> > my preferred way of doing this would be to have one spool file
> > called `/var/spool/mail/oneuser', another called
> > `/var/spool/mail/anotheruser', etc. ... i.e., no special suffixes.
> > Note that I would run Gnus as user `root', which is easy for me to
> > do from my personal Linux machine at home.
> 
> Icky.
> 
> You really ought to do things the right way, instead of treating your
> machine as if it was running some POS single-user operating system.
> 
> It is quite trivial to receive mail for multiple addresses at one
> machine and have them all be read by the same user without doing
> anything nearly as silly as what you suggest.

Of course.  I can think of several ways to do it.  I have already done
this via procmail, via mailagent, via my own homegrown IMAP and POP3
Perl scripts, and via my own homegrown IMAP Python script, in each
case using Gnus as the mailreader.

However, the question I originally posted has to do with whether it
can be done solely within Gnus, without any outside help.

If the answer is "no", then I will just make use of one of the other
approaches I mentioned above.  If the answer is "yes", then I'm trying
to figure out the best way to make it happen.

And if you have something useful to contribute to this discussion,
then I would appreciate your input.  If, however, all you want to do
is editorialize as to how silly you perceive the question to be, then
why bother cluttering up this thread in the mailing list with your
comments at all?

-- 
 Lloyd Zusman
 ljz@asfast.com


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

* Re: Backend-specific nnmail-spool-file?
  1998-12-13  3:08       ` Lloyd Zusman
@ 1998-12-13  4:15         ` Justin Sheehy
  0 siblings, 0 replies; 12+ messages in thread
From: Justin Sheehy @ 1998-12-13  4:15 UTC (permalink / raw)


Lloyd Zusman <ljz@asfast.com> writes:

> Justin Sheehy <justin@linus.mitre.org> writes:

> > It is quite trivial to receive mail for multiple addresses at one
> > machine and have them all be read by the same user without doing
> > anything nearly as silly as what you suggest.

> Of course.  I can think of several ways to do it.  I have already done
> this via procmail, via mailagent, via my own homegrown IMAP and POP3
> Perl scripts, and via my own homegrown IMAP Python script

I didn't say that you needed any special tools other than Gnus.

> However, the question I originally posted has to do with whether it
> can be done solely within Gnus, without any outside help.

Certainly.

One simple example: Use Gnus as 'someuser'.  Point mail destined for
'otheruser' at someuser's account, via either a sendmail alias or a
.forward or some such thing.  Have Gnus filter based on the To header.

> If the answer is "no", then I will just make use of one of the other
> approaches I mentioned above.  If the answer is "yes", then I'm trying
> to figure out the best way to make it happen.

The answer is, Yes, you can read mail destined for several different
users all from within Gnus, without doing something as silly as
running it as the root user.  This is trivial.

> And if you have something useful to contribute to this discussion,
> then I would appreciate your input.  If, however, all you want to do
> is editorialize as to how silly you perceive the question to be, then
> why bother cluttering up this thread in the mailing list with your
> comments at all?

One really ought to use the root account for administrative purposes
only, and other user accounts for all user-like activities.  I was
trying to help you realize this.  That was useful input, though you
may not have decided to use it.

If you ask a question that ought to receive a technical answer, people
may answer with technical details.  If you ask how to do something
ridiculous, people will say "that's ridiculous, you shouldn't do that".

-- 
Justin Sheehy

In a cloud bones of steel.
  




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

end of thread, other threads:[~1998-12-13  4:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-08 14:42 Backend-specific nnmail-spool-file? Lloyd Zusman
1998-12-08 15:20 ` David S. Goldberg
1998-12-08 15:37   ` Lloyd Zusman
1998-12-08 15:42 ` Kai.Grossjohann
1998-12-08 16:42   ` Lloyd Zusman
1998-12-08 23:12     ` Kai.Grossjohann
1998-12-10  4:25       ` Lloyd Zusman
1998-12-10 12:52         ` Kai.Grossjohann
1998-12-10 14:08           ` Lloyd Zusman
1998-12-13  2:07     ` Justin Sheehy
1998-12-13  3:08       ` Lloyd Zusman
1998-12-13  4:15         ` Justin Sheehy

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