Discussion:
slrn: mailing posts for certain newgroups?
(too old to reply)
Grant Edwards
2021-09-25 22:58:54 UTC
Permalink
Many, many years ago, I remember configuraing slrn so that posts to
certain specific groups were submitted via email instead of being
posted via NNTP.

It looks like I'll need to do that again, but I don't remember how I
did it and can't find any old config files. :/

Can anybody offer any advice on the best way to set that up again?

Create a newsgroup hook that changes post_object to "inews" and sets
"inews_program" to something I hack together that e-mails the article?

--
Grant
Ted Heise
2021-09-26 15:28:40 UTC
Permalink
On Sat, 25 Sep 2021 22:58:54 -0000 (UTC),
Post by Grant Edwards
Many, many years ago, I remember configuraing slrn so that
posts to certain specific groups were submitted via email
instead of being posted via NNTP.
It looks like I'll need to do that again, but I don't remember
how I did it and can't find any old config files. :/
Can anybody offer any advice on the best way to set that up
again?
Create a newsgroup hook that changes post_object to "inews" and
sets "inews_program" to something I hack together that e-mails
the article?
I wonder if it might be possible just to use slrn's Reply function
and perhaps have the submission address stored somewhere handy
that would allow you to paste it in when replying? Seems there
mght be a way to make it default action in certain groups, perhaps
with a macro?

I did a brief bit of STFW on this concept, but didn't come up with
anything.
--
Ted Heise <***@panix.com> West Lafayette, IN, USA
Grant Edwards
2021-09-26 16:09:40 UTC
Permalink
Post by Ted Heise
Post by Grant Edwards
Many, many years ago, I remember configuraing slrn so that
posts to certain specific groups were submitted via email
instead of being posted via NNTP.
...
Create a newsgroup hook that changes post_object to "inews" and
sets "inews_program" to something I hack together that e-mails
the article?
[I've given up on that, since the value of post_object is only checked
at startup.]
Post by Ted Heise
I wonder if it might be possible just to use slrn's Reply function
and perhaps have the submission address stored somewhere handy
that would allow you to paste it in when replying? Seems there
mght be a way to make it default action in certain groups, perhaps
with a macro?
I think that may be what I did way back when, but I can't figure out
how that would work for a post that's not a followup/reply.
Post by Ted Heise
I did a brief bit of STFW on this concept, but didn't come up with
anything.
The other option I'm thinking about is just to cofigure slrn to use
"inews" for all groups on that sever, and then write my own "inews"
utility that knows which group needs to have its posts e-mailed. It
only takes a few lines of Python to post via NNTP or to submit a
message via SMTP (either directly or by piping it to msmtp or mutt).

The next complication is that I'd need to enable username/password
SMTP authentication for my GMail account (AKA the "less secure
applications" feature). In theory I could use OAUTH2 SMTP
authentication, but my initial attempt at setting that up on the
Google end failed due to the requirement that I register URLS for my
application's support page and privacy page -- and those URLS have to
be pre-registered with Google.

The "group" in question is a mailing list on gmane.io, and I'm still
hoping the owners of that list will reverse their recent change that
prohibits posts being submitted via gmane...

--
Grant
Eli the Bearded
2021-09-26 20:36:25 UTC
Permalink
Post by Grant Edwards
Post by Ted Heise
I wonder if it might be possible just to use slrn's Reply function
and perhaps have the submission address stored somewhere handy
that would allow you to paste it in when replying? Seems there
mght be a way to make it default action in certain groups, perhaps
with a macro?
I think that may be what I did way back when, but I can't figure out
how that would work for a post that's not a followup/reply.
I've never read a mailing list via gmane, but shouldn't the posts come
with the proper headers to just reply by email and go to the list? Eg,
when I read vim-users (which I get by email), all of the posts have
Post by Grant Edwards
Post by Ted Heise
I did a brief bit of STFW on this concept, but didn't come up with
anything.
The other option I'm thinking about is just to cofigure slrn to use
"inews" for all groups on that sever, and then write my own "inews"
utility that knows which group needs to have its posts e-mailed. It
only takes a few lines of Python to post via NNTP or to submit a
message via SMTP (either directly or by piping it to msmtp or mutt).
In trn, posts are composed and sent via Pnews, and I'd put all of the
logic there. But I did write my own inews (in C) for a different problem
in the distant past, and still keep it around for a mail to news
gateway.
Post by Grant Edwards
The next complication is that I'd need to enable username/password
SMTP authentication for my GMail account (AKA the "less secure
applications" feature). In theory I could use OAUTH2 SMTP
authentication, but my initial attempt at setting that up on the
Google end failed due to the requirement that I register URLS for my
application's support page and privacy page -- and those URLS have to
be pre-registered with Google.
Just a question, but couldn't you solve this faster using Panix for
the email?

But, FWIW, I've created OAUTH2 "apps" for other things (not Google)
and just registered my own never-will-be-used-by-anyone pages for
that sort of thing. Since they don't do a code review of apps, at least
not ones not released, I can just use the tokens however I want with
whatever I want. Curl, Perl, hand-composed-headers-over-tunneled-
connections, you know, whatever.

(From memory): Depending on the user-signup workflow you have, OAUTH2
can either send a response to a central server or give a URL template
with details in the response for the app to connect to the central
server. The second method is ideal for the hobbiest. Any other URLs
are not really used. Maybe your twitter or facebook page could be
the support and privacy pages?
Post by Grant Edwards
The "group" in question is a mailing list on gmane.io, and I'm still
hoping the owners of that list will reverse their recent change that
prohibits posts being submitted via gmane...
I'd guess that the stop is because of people using gmane to whitewash
spam or trolls.

Elijah
------
panix will let paying customers send email "from" another account
Grant Edwards
2021-09-26 21:34:24 UTC
Permalink
Post by Eli the Bearded
Post by Grant Edwards
Post by Ted Heise
I wonder if it might be possible just to use slrn's Reply function
and perhaps have the submission address stored somewhere handy
that would allow you to paste it in when replying? Seems there
mght be a way to make it default action in certain groups, perhaps
with a macro?
I think that may be what I did way back when, but I can't figure out
how that would work for a post that's not a followup/reply.
I've never read a mailing list via gmane, but shouldn't the posts come
with the proper headers to just reply by email and go to the list? Eg,
when I read vim-users (which I get by email), all of the posts have
That would work for replies. The problem happens for posts that are
not replies.
If you're not replying/following-up, there's no post where one would
find that header, and slrn won't look for it anyway.
Post by Eli the Bearded
In trn, posts are composed and sent via Pnews, and I'd put all of the
logic there. But I did write my own inews (in C) for a different problem
in the distant past, and still keep it around for a mail to news
gateway.
AFAICT, slrn can post using NNTP or using an external "inews" utility,
but that setting can't be changed on-the-fly or per-group. It's set
once at startup.

The only obvious solution I can think of is to configure slrn to post
via inews for the gmane server, and then write an inews application
that looks at the group and either posts to gmane.io using NNTP or
e-mails the post. That application would need a table/dictionary of
the submission e-mail addresses for any groups that can't be posted to
by NNTP.
Post by Eli the Bearded
Post by Grant Edwards
The next complication is that I'd need to enable username/password
SMTP authentication for my GMail account (AKA the "less secure
applications" feature). In theory I could use OAUTH2 SMTP
authentication, but my initial attempt at setting that up on the
Google end failed due to the requirement that I register URLS for my
application's support page and privacy page -- and those URLS have to
be pre-registered with Google.
Just a question, but couldn't you solve this faster using Panix for
the email?
I don't expose my panix e-mail address or use it for any day-to-day
activity. It's only used as a "backup".
Post by Eli the Bearded
But, FWIW, I've created OAUTH2 "apps" for other things (not Google)
and just registered my own never-will-be-used-by-anyone pages for
that sort of thing. Since they don't do a code review of apps, at least
not ones not released, I can just use the tokens however I want with
whatever I want. Curl, Perl, hand-composed-headers-over-tunneled-
connections, you know, whatever.
When you create an OAUTH2 "app" on Google, you have to provide a
couple URLs, and there appear to be not-well-documented rules for
those URLs. Since my initial attempt, somebody suggested that you can
use a nonsense URL with the hostname 'localhost' and Google will let
it slide. I haven't tried that, since I set up 2FA at Google and now
have app-specific passwords working for IMAP and SMTP.
Post by Eli the Bearded
(From memory): Depending on the user-signup workflow you have,
OAUTH2 can either send a response to a central server or give a URL
template with details in the response for the app to connect to the
central server. The second method is ideal for the hobbiest. Any
other URLs are not really used. Maybe your twitter or facebook page
could be the support and privacy pages?
Don't have either of those. The only page I have is on panix.com, and
Google refuses to allow support/privacy URLs using panix.com. It's
pretty much a moot question now, since I have application-specific
passwords working.
Post by Eli the Bearded
Post by Grant Edwards
The "group" in question is a mailing list on gmane.io, and I'm
still hoping the owners of that list will reverse their recent
change that prohibits posts being submitted via gmane...
I'd guess that the stop is because of people using gmane to
whitewash spam or trolls.
I've heard from the admins of the list in question, and they don't
seem to be aware of any change or problem that would have triggered
such a change. I'll see if I can ping the guy that runs Gmane...

--
Grant
Ted Heise
2021-09-27 01:41:41 UTC
Permalink
On Sun, 26 Sep 2021 21:34:24 -0000 (UTC),
Post by Grant Edwards
Post by Eli the Bearded
Post by Grant Edwards
Post by Ted Heise
I wonder if it might be possible just to use slrn's Reply
function and perhaps have the submission address stored
somewhere handy that would allow you to paste it in when
replying? Seems there mght be a way to make it default
action in certain groups, perhaps with a macro?
I think that may be what I did way back when, but I can't
figure out how that would work for a post that's not a
followup/reply.
I've never read a mailing list via gmane, but shouldn't the
posts come with the proper headers to just reply by email and
go to the list? Eg, when I read vim-users (which I get by
email), all of the posts have
That would work for replies. The problem happens for posts that
are not replies.
Ah, that's different. Not sure I realized that bit from the OP.
If you're just composing a new message, why not use a mail client
(e.g., Pine)?
--
Ted Heise <***@panix.com> West Lafayette, IN, USA
Grant Edwards
2021-09-27 05:36:41 UTC
Permalink
Post by Ted Heise
On Sun, 26 Sep 2021 21:34:24 -0000 (UTC),
Post by Grant Edwards
Post by Eli the Bearded
I've never read a mailing list via gmane, but shouldn't the
posts come with the proper headers to just reply by email and
go to the list? Eg, when I read vim-users (which I get by
email), all of the posts have
That would work for replies. The problem happens for posts that
are not replies.
Ah, that's different. Not sure I realized that bit from the OP.
If you're just composing a new message, why not use a mail client
(e.g., Pine)?
I think I vaguely recall that's how I did it back in the day: when
starting a new thread, send an e-mail with mutt. Read and follow-up
with slrn. I must have used an article-mode hook to remapped the 'f'
key to do a reply instead of a follow-up, and then used a some other
hook to change the To: address so that the email went to the list
instead of of the previous article's author. But after reading through
the slrn docs, I still have no idea how to do that.

Anyhow, I've got my 'inews' program written and working now, so when
connected to gmane slrn posts using inews. My inews app looks at the
group, and then either posts it via NNTP or emails it via SMTP.
Writing my own 'inews' only took about a half hour, but then I spent
another 2-3 hours tracking down a bug in Python's SMTP library; the
send_message() call does "from mangling" (a la mbox) in message bodies
when it should not. There's an easy workaround, but it took me a while
to track down the actual bug and come up with a real fix.

--
Grant
Eli the Bearded
2021-09-27 05:05:23 UTC
Permalink
Post by Grant Edwards
That would work for replies. The problem happens for posts that are
not replies.
Start a follow-up to any old post, then edit subject / references and
body to make it a new post?
Post by Grant Edwards
I don't expose my panix e-mail address or use it for any day-to-day
activity. It's only used as a "backup".
I didn't suggest that idly. I send email from non @panix addresses using
panix all the time.

/usr/sbin/sendmail -f "***@my.dog" -t <<END_OF_MAIL
From: "Mr. Squirrel Catcher, Esq." <***@my.dog>
Subject: let's be friends
To: Tasty Squirrel <***@anim.als>

HELLO! YOU ARE SQUIERREL! I WOULD LIKE TO BE FRIEND! I HAVE A
VERY COMFORTABLE MOUTH! YOU SHOULD TRY IT!
END_OF_MAIL

And then my email arrives showing it went through panix but not exposing
my panix email address. (My dogs' domains are willie.dog and hazel.dog
in reality.) I set up email for them so that they could use it for
Internet account verification, eg Instagram. I've also configured
the SPF record to explicitly include Panix, eg:

hazel.dog. 3550 IN TXT "v=spf1 a mx
ip4:104.131.148.56 ip4:104.248.36.129 ip4:166.84.0.0/16 ip4:198.7.7.0/24
-all"


I have Rnmail configured to pull the email address out of the From: line
in the body and use that for the "envelope", so I can easily set it
while composing a message.
Post by Grant Edwards
When you create an OAUTH2 "app" on Google, you have to provide a
couple URLs, and there appear to be not-well-documented rules for
those URLs. Since my initial attempt, somebody suggested that you can
use a nonsense URL with the hostname 'localhost' and Google will let
it slide.
That's curious. Yeah, I was afraid that Google might be odd like that.
As I said, I have not created an Google oauth apps.

Elijah
------
needs to renew the dog hostnames soon
Grant Edwards
2021-09-27 05:45:52 UTC
Permalink
Post by Eli the Bearded
Post by Grant Edwards
That would work for replies. The problem happens for posts that are
not replies.
Start a follow-up to any old post, then edit subject / references and
body to make it a new post?
Post by Grant Edwards
I don't expose my panix e-mail address or use it for any day-to-day
activity. It's only used as a "backup".
panix all the time.
Yea, I used to do that all the time, and for years it was fine. But,
in the past few years it started causing problems. The messages I sent
were getting flagged as suspicious, labelled oddly in MUAs, or just
plain dropped because the from address didn't match up with the
sending host. I didn't have control over DNS entries for the from
address domain so couldn't set up the magic to tell the world that
panix was allowed to send mail "from" that address. In this case, I
would have been using panix to send email from ***@gmail.com, and the
world would be rightly suspicious.

--
Grant
Branimir Maksimovic
2021-09-29 01:36:58 UTC
Permalink
Post by Ted Heise
I wonder if it might be possible just to use slrn's Reply function
and perhaps have the submission address stored somewhere handy
that would allow you to paste it in when replying? Seems there
mght be a way to make it default action in certain groups, perhaps
with a macro?
I did a brief bit of STFW on this concept, but didn't come up with
anything.
I edit headers myself in slrn :P
--
7-77-777
Evil Sinner!
Grant Edwards
2021-09-29 08:13:23 UTC
Permalink
Post by Branimir Maksimovic
Post by Ted Heise
I wonder if it might be possible just to use slrn's Reply function
and perhaps have the submission address stored somewhere handy
that would allow you to paste it in when replying? Seems there
mght be a way to make it default action in certain groups, perhaps
with a macro?
I did a brief bit of STFW on this concept, but didn't come up with
anything.
I edit headers myself in slrn :P
The inews utility I'm now using with slrn when connected to gmane.io
is at

https://github.com/GrantEdwards/hybrid-inews

The following are hard-coded in the source and will need to be set up:

* SMTP server hostname
* SMTP username
* SMTP password
* Dictionary that maps gmane groups to list submission email addresses

Any posts that my inews utility receives to groups that aren't in the
`mailgroups` dict will be submitted as-is to gmane.io via NNTP. Any
posts to groups in that dict will be emailed to the address in that
dict.

I've been using it for a couple days, and it's been reliable so far.

It would be pretty trivial to modify it to pipe messages to `sendmail`
instead of using SMTP directly.
Branimir Maksimovic
2021-09-29 23:01:43 UTC
Permalink
Post by Grant Edwards
It would be pretty trivial to modify it to pipe messages to `sendmail`
instead of using SMTP directly.
hm, I can send mail in slrn..
--
7-77-777
Evil Sinner!
Grant Edwards
2021-09-30 01:16:56 UTC
Permalink
Post by Branimir Maksimovic
Post by Grant Edwards
It would be pretty trivial to modify it to pipe messages to `sendmail`
instead of using SMTP directly.
hm, I can send mail in slrn..
Can you send a follow-up (with proper refernce header, quoting,
attribution, etc.) via email instead of NNTP? Can you start a new
thread via e-mail from slrn?

--
Grant
Branimir Maksimovic
2021-09-30 01:24:10 UTC
Permalink
Post by Grant Edwards
Post by Branimir Maksimovic
Post by Grant Edwards
It would be pretty trivial to modify it to pipe messages to `sendmail`
instead of using SMTP directly.
hm, I can send mail in slrn..
Can you send a follow-up (with proper refernce header, quoting,
attribution, etc.) via email instead of NNTP? Can you start a new
thread via e-mail from slrn?
well, you haven't give proper email address, I will
now try to post new thread, sepparately.
% In case you want to use another mailer than sendmail. Be sure that it
% implements the same interface, though!
%set sendmail_command "/usr/lib/sendmail -oi -t -oem -odb"
set sendmail_command "mail -s %d '%s'"
Post by Grant Edwards
--
Grant
--
7-77-777
Evil Sinner!
Loading...