Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* How to read mail from local spool?
@ 2024-02-28  9:16 NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
  2024-02-28 10:01 ` Eric S Fraga
  0 siblings, 1 reply; 8+ messages in thread
From: NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English) @ 2024-02-28  9:16 UTC (permalink / raw)
  To: info-gnus-english


Hello,

I noticed that I have a file "/var/mail/username" on my computer. Some
programs put messages in it. I would like to read those messages in
Gnus.

What backend should I choose to do this? I don't want to install any
servers on my computer, I'm trying to keep my Debian installation
minimal. It would be best if Gnus could simply read this file without
connecting to localhost. Is this possible? Or maybe I should start
learning to write my own backends for Gnus?



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

* Re: How to read mail from local spool?
  2024-02-28  9:16 How to read mail from local spool? NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
@ 2024-02-28 10:01 ` Eric S Fraga
  2024-02-28 10:20   ` Björn Bidar
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Eric S Fraga @ 2024-02-28 10:01 UTC (permalink / raw)
  To: info-gnus-english

Putting this line in your .gnus.el should work:

(setq mail-sources '((file :path "/var/mail/userid")))

Replace userid with your own login, of course.  In principle, just

(setq mail-sources '((file)))

should also work.

Check the "Fetching mail" section in the info manual for gnus.

-- 
Eric S Fraga via gnus (Emacs 30.0.50 2024-02-26) on Debian 12.0



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

* Re: How to read mail from local spool?
  2024-02-28 10:01 ` Eric S Fraga
@ 2024-02-28 10:20   ` Björn Bidar
       [not found]   ` <13614.9973188125$1709115669@news.gmane.org>
  2024-02-28 11:46   ` NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
  2 siblings, 0 replies; 8+ messages in thread
From: Björn Bidar @ 2024-02-28 10:20 UTC (permalink / raw)
  To: Eric S Fraga; +Cc: info-gnus-english

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> (setq mail-sources '((file :path "/var/mail/userid")))

Better would be:
(setq mail-sources `,((file :path ,(concat "/var/mail/"(user-login-name)))))


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

* Re: How to read mail from local spool?
       [not found]   ` <13614.9973188125$1709115669@news.gmane.org>
@ 2024-02-28 10:50     ` Eric S Fraga
  0 siblings, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2024-02-28 10:50 UTC (permalink / raw)
  To: info-gnus-english

On Wednesday, 28 Feb 2024 at 12:20, Björn Bidar wrote:
> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
>
>> (setq mail-sources '((file :path "/var/mail/userid")))
>
> Better would be:
> (setq mail-sources `,((file :path ,(concat "/var/mail/"(user-login-name)))))

Better in the sense of most generic/universal, I guess.  Maybe that is
what should be in the manual!

Thank you,
eric

-- 
Eric S Fraga via gnus (Emacs 30.0.50 2024-02-26) on Debian bullseye/sid



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

* Re: How to read mail from local spool?
  2024-02-28 10:01 ` Eric S Fraga
  2024-02-28 10:20   ` Björn Bidar
       [not found]   ` <13614.9973188125$1709115669@news.gmane.org>
@ 2024-02-28 11:46   ` NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
  2024-02-28 11:55     ` NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
  2 siblings, 1 reply; 8+ messages in thread
From: NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English) @ 2024-02-28 11:46 UTC (permalink / raw)
  To: info-gnus-english

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Putting this line in your .gnus.el should work:
> (setq mail-sources '((file :path "/var/mail/userid")))

I use Emacs 30.0.50 built from sources. Adding code to ~/.emacs.d/init.el:

#+begin_src emacs-lisp
(setq mail-sources '((file :path "/var/mail/myusername")))
#+end_src

seems to do nothing.

- After running M-x Gnus, there is no entry with
  emails in *Groups* buffer.
- Command `less /var/mail/myusername` shows
  that there is at least one message in file.





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

* Re: How to read mail from local spool?
  2024-02-28 11:46   ` NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
@ 2024-02-28 11:55     ` NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
  2024-02-28 13:59       ` Eric S Fraga
  0 siblings, 1 reply; 8+ messages in thread
From: NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English) @ 2024-02-28 11:55 UTC (permalink / raw)
  To: info-gnus-english

NNTP Surfer via "Announcements and discussions for GNUS, the GNU Emacs
Usenet newsreader (in English)" <info-gnus-english@gnu.org> writes:

> I use Emacs 30.0.50 built from sources. Adding code to
> ~/.emacs.d/init.el:
>
> #+begin_src emacs-lisp
> (setq mail-sources '((file :path "/var/mail/myusername")))
> #+end_src
>
> seems to do nothing.
>
> - After running M-x Gnus, there is no entry with
>   emails in *Groups* buffer.
> - Command `less /var/mail/myusername` shows
>   that there is at least one message in file.

New discovery: now I noticed that messages are copied to
message-directory in Gnus. They still are not showing in *Groups*
buffer.



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

* Re: How to read mail from local spool?
  2024-02-28 11:55     ` NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
@ 2024-02-28 13:59       ` Eric S Fraga
  2024-02-28 14:46         ` NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
  0 siblings, 1 reply; 8+ messages in thread
From: Eric S Fraga @ 2024-02-28 13:59 UTC (permalink / raw)
  To: info-gnus-english

You may need to add/subscribe to the relevant group.  Go to the server
buffer (^ from the Group view) and look for an nnml server.  Enter the
server (RET) and subscribe (u) to whichever group makes sense.

It's been so long since I did this that I cannot remember what is
needed.

-- 
Eric S Fraga via gnus (Emacs 30.0.50 2024-02-26) on Debian bullseye/sid



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

* Re: How to read mail from local spool?
  2024-02-28 13:59       ` Eric S Fraga
@ 2024-02-28 14:46         ` NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
  0 siblings, 0 replies; 8+ messages in thread
From: NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English) @ 2024-02-28 14:46 UTC (permalink / raw)
  To: info-gnus-english

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> You may need to add/subscribe to the relevant group.  Go to the server
> buffer (^ from the Group view) and look for an nnml server.  Enter the
> server (RET) and subscribe (u) to whichever group makes sense.
>
> It's been so long since I did this that I cannot remember what is
> needed.

Yes, that's exactly what I was missing. Thank you.



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

end of thread, other threads:[~2024-02-28 14:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28  9:16 How to read mail from local spool? NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
2024-02-28 10:01 ` Eric S Fraga
2024-02-28 10:20   ` Björn Bidar
     [not found]   ` <13614.9973188125$1709115669@news.gmane.org>
2024-02-28 10:50     ` Eric S Fraga
2024-02-28 11:46   ` NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
2024-02-28 11:55     ` NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)
2024-02-28 13:59       ` Eric S Fraga
2024-02-28 14:46         ` NNTP Surfer via Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader (in English)

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