🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #194527

Re: [SLRN] Using Thunderbird as a mailer

#194527
From: Peter J Ross
Date: Tue, 16 Jan 2007 17:45
108 lines
5716 bytes
On 16 Jan 2007 13:02:29 GMT, Peter J Ross <pjr@example.invalid> wrote
in news.software.readers:

> On Mon, 15 Jan 2007 21:02:00 GMT, Michael DeBusk
> <chinos6398@mypacks.net> wrote in news.software.readers:
>
>> On 15 Jan 2007 15:27:00 GMT, Frank Slootweg <this@ddress.is.invalid> wrote:
>>
>>> FromLineOverride=YES
>>
>> It's already there, and uncommented. It seems that SLRN doesn't pass a
>> From: line to the message.
>
> It does if you set the generate_email_from variable.
>
> http://www.slrn.org/manual/slrn-manual-6.html#ss6.38
>
> You'll then have to avoid overriding it with your MTA.
>
> If you want to use different From lines for email and news, you can
> set the email From line in your .vimrc, with something like this:
>
> #v+
> autocmd VimEnter .letter :2s/foo@example\.invalid/foo@example.com/
> #v-
>
> (This assumes that the From header appears on the second line of the
> .letter file, as it does for me. If it appears on line x, change :2s
> to :xs.)
>
> And you can use similar vim commands to change your signature, add a
> BCC so you receive a copy in Thunderbird, or whatever.

In case it's of interest, here are the Slrn-related commands that I
have in my .vimrc. Some of them may be usable by people who use Vim
with other newsreaders. Lines beginning with " are comments, and the
comments are intended to be helpful to people who aren't very familiar
with regular expressions. (And verbatim marks [#v+ and #v-] are used
here to prevent slashes and asterisks being interpreted by newsreaders
as emphasis marks.)

#v+

" The first command changes whatever I've set as my Usenet From:
" header into a real address when I reply by email. It depends on
" having generate_email_from set to '1' in my .slrnrc.

autocmd VimEnter .letter :2s/\(From: \).*/\1Peter J Ross <pjr.spam@gmail.com>/

" This matches the entire From: header and changes part of it. \1 is
" a regex backreference to the contents of the parentheses; it saves
" having to type 'From: ' twice. (Note that the parentheses have to be
" 'escaped' with backslashes just as the backreferencing numeral does.)

" ~~~~~~~~~~~~~~~~~~~~

" I use a Reply-To header on Usenet, but I don't need it for email, so
" I delete it when emailing.

autocmd VimEnter .letter :6s/^Reply-To:.*\n//

" It's necessary to add \n (newline) to the match, because otherwise
" there will be an empty line in the middle of the headers. The ^ is
" unnecessary, since I've specified a line number (6), but it does no
" harm and ensures that I won't accidentally match part of "In-Reply-To"
" if I make changes to these rules. Vim will display an error message
" if line 6 doesn't match.

" ~~~~~~~~~~~~~~~~~~~~

" The next rule sets BCC: to be the same as From:, without depending
" on the precise contents of From:

autocmd VimEnter .letter :2s/\(From:\(.*\)\)/\1\rBCC:\2/

" This time there are two backreferences. \1 refers to the first set
" of parentheses - the ones that enclose the whole matching phrase - and
" \2 matches the part of the header that follows 'From:'. And \r created
" a line break.
"
" So the result is that the previous From: header is replaced by
"    1. A copy of the previous From: header
"    2. A new line
"    3. A BCC header that has the same content as From:

" ~~~~~~~~~~~~~~~~~~~~

" Finally, every user of Slrn + Vim needs this. It wraps the
" attribution line to the same wrapping setting that you're going to
" be using while typing.

autocmd VimEnter .followup if line('.') != 1 | normal gq${j

" Don't ask me to explain the complicated Vim syntax: I got this off
" the Web, and I've promised to explain only regular expressions. :-)

" It's possible that custom headers or other configuration changes may
" alter the line numbers of the file you're editing with Vim, in which
" case the numerals in ':2s', ':6s' etc may need to be adjusted.

#v-


Is this kind of article useful to anybody? If I haven't explained
stuff clearly, let me know.

-- 
PJR :-)
Technical Details
Message-ID: <slrneqq3pu.edb.pjr@pjr.gotdns.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news-out.octanews.net!indigo.octanews.net!authen.yellow.readfreenews.net.POSTED!not-for-mail
References: <Nlmoh.8719$w91.3620@newsread1.news.pas.earthlink.net> <k0Koh.8851$yx6.4553@newsread2.news.pas.earthlink.net> <envsbn0144l@news4.newsguy.com> <JESoh.8945$yx6.5388@newsread2.news.pas.earthlink.net> <45a52ea0$0$96552$dbd45001@news.wanadoo.nl> <bqjph.9619$w91.6522@newsread1.news.pas.earthlink.net> <45a8e435$0$22893$dbd41001@news.wanadoo.nl> <K6kqh.10719$w91.3698@newsread1.news.pas.earthlink.net> <20070114185002@usenet.piggo.com> <arwqh.14305$X72.5699@newsread3.news.pas.earthlink.net> <45ab9d44$0$11647$dbd4b001@news.wanadoo.nl> <cZRqh.10387$pQ3.3346@newsread4.news.pas.earthlink.net> <slrneqpj75.edb.pjr@pjr.gotdns.org>

Show Full Headers
Complete Article Headers
Message-ID: <slrneqq3pu.edb.pjr@pjr.gotdns.org>
Subject: Re: [SLRN] Using Thunderbird as a mailer
Date: Tue, 16 Jan 2007 17:45:34 +0000
From: Peter J Ross <pjr@example.invalid>
References: <Nlmoh.8719$w91.3620@newsread1.news.pas.earthlink.net> <k0Koh.8851$yx6.4553@newsread2.news.pas.earthlink.net> <envsbn0144l@news4.newsguy.com> <JESoh.8945$yx6.5388@newsread2.news.pas.earthlink.net> <45a52ea0$0$96552$dbd45001@news.wanadoo.nl> <bqjph.9619$w91.6522@newsread1.news.pas.earthlink.net> <45a8e435$0$22893$dbd41001@news.wanadoo.nl> <K6kqh.10719$w91.3698@newsread1.news.pas.earthlink.net> <20070114185002@usenet.piggo.com> <arwqh.14305$X72.5699@newsread3.news.pas.earthlink.net> <45ab9d44$0$11647$dbd4b001@news.wanadoo.nl> <cZRqh.10387$pQ3.3346@newsread4.news.pas.earthlink.net> <slrneqpj75.edb.pjr@pjr.gotdns.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news-out.octanews.net!indigo.octanews.net!authen.yellow.readfreenews.net.POSTED!not-for-mail
Newsgroups: news.software.readers
Organization: Cabal Obsidian Order [TINCOO]
Reply-To: pjr.spam@gmail.com
X-Operating-System: Debian GNU/Linux (Etch/Testing)
X-Kernel: Linux 2.6.18-3-686
User-Agent: slrn/0.9.8.1pl1 (Debian)
Lines: 108
NNTP-Posting-Date: 16 Jan 2007 11:45:34 CST
X-Trace: DXC=Zn6@VY@gPSS7ZiE92fKPU_]AGWjF5PjPY465Ue@WB_5_:<VkJm^Y4YT26Z<EbT:a\UlV3mi\haFgX_IVN9joGJK]3HT_l_dLFOY