MailNews

From ThorxWiki
Revision as of 22:25, 27 October 2011 by Nemo (Talk | contribs)

Jump to: navigation, search

Nemo's notes on making mutt work for newsgroups, via some helper utilities that talk nntp, and scripts which bind them together.

Contents

Reading

slrnpull pulls messages into it's own spool. This spool is readable with mutt directly (it seems to treat it as an 'mh' format mailbox.

However, this means that the messages default to being marked as 'read', and unless you control your own spool, you can't even change that!

news2Maildir

news2Maildir is basically an extremely simple news client (not even an nntp client, since it only looks at the local news spool), and ALSO acts as a MDA to a very select number of Maildirs.

It will operate by copying each message from the spool and deliver it to a Maildir folder. Thus messages appear as new and unread to mutt, and can be read, flagged, deleted, as expected.

news2Maildir will need to keep track, per group, as to which message it saw last. Maildir folders should be named exactly as the group is named.

It should operate in a read-only fashion on the spool, though if you operate your own spool, it could have the option to clear it for you. (imho, better to let slrn do it's own job there)

news2Maildir should only fill the Maildir's that are in existance. However, if you operate slrnpull as a user, then perhaps it could update slrnpull.conf appropriately if newsgroup Maildir's are created/deleted.

I propose these newsgroup based Maildirs live within ~/Newsdir

Writing

Write messages in mutt as normal, but massage them on the way out, so they go to the slrnpull outgoing queue.

Minimum post requirement for slrnpull

A post in the var/spool/slrnpull/out.going/ directory needs to be only named "X", and can get away with only From:, Newsgroups: and Subject: headers, along with a body. Upstream servers will fill out the remainder.

The file needs to be protocol encoded - that is, any lines with a leading "." needs that . to be doubled.

For eg, a file named 'X' with these contents

From: Nobody <devnull@home>
Newsgroups: alt.test
Subject: test 2

test
.testone
..testtwo
...testthree

returns from the same server, in the same slrnpull loop as when it was posted, as:

Path: news.astraweb.com!news-xref3.astraweb.com!not-for-mail
From: Nobody <devnull@home>
Newsgroups: alt.test
Subject: test 2
Date: 27 Oct 2011 12:17:36 GMT
Lines: 4
Message-ID: <4ea94be0$0$14069$c3e8da3$76491128@news.astraweb.com>
Organization: Unlimited download news at news.astraweb.com
NNTP-Posting-Host: a82854f6.news.astraweb.com
X-Trace: DXC=m2DM4:=`Ee2o^d=IeQT`3>L?0kYOcDh@:[^oANOZPWM0m8]Ha;Fb[[:l9B_G1R=S=7YoIj:2_Q5X<fQ:A^;C6QQ0\M[9B[:?8U:
Xref: news.astraweb.com alt.test:2319994

test
testone
.testtwo
..testthree

Additionally, if a '.' appears within the article on a line by itself, the posting WILL treat that as the end of the article, and so it will be truncated at the server.


Personal tools
Namespaces

Variants
Actions
Navigation
meta navigation
More thorx
Tools