Thread View: news.software.readers
6 messages
6 total messages
Started by Morten Bo Johansen
Sun, 01 Aug 1999 00:00
[slrn] Return-Path: header..?
Author: Morten Bo Johansen
Date: Sun, 01 Aug 1999 00:00
Date: Sun, 01 Aug 1999 00:00
17 lines
1072 bytes
1072 bytes
Hi, I'd like to have a Return-Path header inserted becuase it's required for posting to certain mailing lists via their news interface. Usually sendmail does it but it seems that this header is stripped in slrn (and other newsagents?). Is there any convenient way I can have a Return-Path header inserted short of inserting it manually when composing? Morten
Re: [slrn] Return-Path: header..?
Author: Morten Bo Johansen
Date: Sun, 01 Aug 1999 00:00
Date: Sun, 01 Aug 1999 00:00
16 lines
1220 bytes
1220 bytes
On Sun, 01 Aug 1999 14:42:53 GMT, Morten Bo Johansen wrote: >I'd like to have a Return-Path header inserted becuase it's required >for posting to certain mailing lists via their news interface. Sorry, I overlooked how this is done in the sample slrn.rc with the custom-header options. Something eludes me a little more, which is not equally obvious: Can I have a custom header inserted dynamically depending on which group I'm posting to ? Morten
Re: [slrn] Return-Path: header..?
Author: Dawn Owens-Nicholson
Date: Sun, 01 Aug 1999 00:00
Date: Sun, 01 Aug 1999 00:00
58 lines
2546 bytes
2546 bytes
Morten Bo Johansen wrote:
> Can I have a custom header inserted dynamically depending on which group
> I'm posting to ?
Yes, if you use an S-Lang macro. It depends on how elaborate you want to
get and what you want to do. You could use strchop() to break up the custom
headers slrn variable into a string array then modify the array and use
strjoin() to put it all back together:
variable hdrs = strchop (get_variable_value ("custom_headers"), '\n', 0);
if (string_match (current_newsgroup (), "^rec\.", 1)
{
.
. % do something in here
.
}
set_string_variable ("custom_headers", strjoin (hdrs, "\n");
Another approach is to load the headers and values into a hash...
variable
h = "",
header = "",
my_header_hash = Assoc_Type [String_Type];
foreach (strchop (get_variable_value ("custom_headers"), '\n', 0))
{
h = ();
header = strchop (h, ' ', 0);
my_header_hash[header[0]] = strjoin (header[[1:]], " ");
}
...modify the hash, rejoin the keys & values of the hash and put them back
into the slrn custom_headers variable when you're done...
variable
custom_headers = "",
value;
foreach (my_header_hash) using ("keys", "values")
{
(header, value) = ();
custom_headers += sprintf ("%s %S\n", header, value);
}
custom_headers = custom_headers[[:-2]]; % trim the trailing \n
set_string_variable ("custom_headers", custom_headers);
(The capital-s in "%S" is just in case you used a numeric value for some
header somewhere--%S gets you automatic string conversion, %s doesn't.)
If you want some basic set of custom headers for all groups, it might be
easier to set those headers in your slrn.rc and use the macro to add new
headers. Again, it all depends on what you want to do.
Re: [slrn] Return-Path: header..?
Author: Morten Bo Johansen
Date: Mon, 02 Aug 1999 00:00
Date: Mon, 02 Aug 1999 00:00
39 lines
2336 bytes
2336 bytes
On 1 Aug 1999 21:21:25 GMT, Dawn Owens-Nicholson wrote: >Morten Bo Johansen wrote: >> Can I have a custom header inserted dynamically depending on which group >> I'm posting to ? > >Yes, if you use an S-Lang macro. It depends on how elaborate you want to >get and what you want to do. You could use strchop() to break up the custom >headers slrn variable into a string array then modify the array and use >strjoin() to put it all back together: >[code follows..] Thanks very much. It's advanced stuff, relatively speaking at least to someone who's not familiar with S-lang macros. My needs are rather modest: I have this bunch of mailing lists that I would like to post to via a news interface that their maintainers have set up - and for these lists only I need there to be a Return-Path header present which matches the ditto that I used when I subscribed to the lists, initially. However, as I've found out since my previous posting just having a Return-Path header present is not enough in itself - this header apparently also needs to be in the topmost position, or my postings are not accepted. So to recapitulate: - For mailinglist 1, 2, 3...insert Return-Path header as the first line. - For all the rest leave them to slrn's default values. Therefore, may I be audacious enough to ask you to give me a ready packed solution on how to do this - if possible ?-) Furthermore, how are S-lang macros called/sourced in the .slrnrc? Morten
Re: [slrn] Return-Path: header..?
Author: Dawn Owens-Nicholson
Date: Tue, 03 Aug 1999 00:00
Date: Tue, 03 Aug 1999 00:00
44 lines
2676 bytes
2676 bytes
Morten Bo Johansen wrote:
> [T]his header [Return-Path] apparently also needs to be in the topmost
> position, or my postings are not accepted.
This sounds odd. Can header order be guaranteed across news servers? I
wasn't aware this was possible. In other words, unless you post to the
server where the mailing list software runs, the article will be propagated
across servers and may not arrive with the headers in the same order in
which they were posted.
> - For mailinglist 1, 2, 3...insert Return-Path header as the first line.
Ordinarily, I'd suggest using custom_headers and followup_custom_headers,
but I don't think slrn will put the custom headers above the headers it
generates (Newsgroups:, Subject:, References: Followup-To:) and then there's
the whole propagation issue above.
> Therefore, may I be audacious enough to ask you to give me a ready packed
> solution on how to do this - if possible ?-)
I don't have time to test such a thing, so I'm hesitant to say I'll do it,
but I can help with the next question. My slrn time is currently going
toward an rn/trn "mode" for slrn. Trn-style thread displays are well under
way now.
> Furthermore, how are S-lang macros called/sourced in the .slrnrc?
If no hooks are involved, installation may be as easy as including a line in
your slrn.rc that looks like this:
interpret "my_macro_file_here"
If some keys are being redefined (for instance, you want the spacebar to do
something new), you'll also have to bind that key to the new thing. This
can also be done from your slrn.rc:
setkey article my_function " "
The above example sets the spacebar (" ") to run a function called
my_function in article mode. Check out the S-Lang and slrn documentation.
It's not all together in one file yet, but there is a lot of good info in
the docs that exist (including the changes file).
Re: [slrn] Return-Path: header..?
Author: Morten Bo Johansen
Date: Tue, 03 Aug 1999 00:00
Date: Tue, 03 Aug 1999 00:00
48 lines
2807 bytes
2807 bytes
On 3 Aug 1999 20:32:38 GMT, Dawn Owens-Nicholson wrote: >Morten Bo Johansen wrote: >> [T]his header [Return-Path] apparently also needs to be in the topmost >> position, or my postings are not accepted. > >This sounds odd. Can header order be guaranteed across news servers? I >wasn't aware this was possible. In other words, unless you post to the >server where the mailing list software runs, the article will be propagated >across servers and may not arrive with the headers in the same order in >which they were posted. Well, the difference between you and me is probably that you know something about the background and can ask qualified questions whereas I'm just a happy-go-lucky guy which incidentially found that there appears to be a causality between, on the one hand, the position of the Return-Path header and, on the other, the remote server acceptance of my postings. In other words, if this header is placed as the sixth (something) line, my postings sink into oblivion (I'm not even getting a bounce message). However, if I place it manually in the first position my postings go through. >> - For mailinglist 1, 2, 3...insert Return-Path header as the first line. > >Ordinarily, I'd suggest using custom_headers and followup_custom_headers, >but I don't think slrn will put the custom headers above the headers it >generates (Newsgroups:, Subject:, References: Followup-To:) and then there's >the whole propagation issue above. No, it places the custom headers below the others for sure. >> Furthermore, how are S-lang macros called/sourced in the .slrnrc? > >If no hooks are involved, installation may be as easy as including a line in >your slrn.rc that looks like this: > > interpret "my_macro_file_here" Thank you, I noticed this in your posting in another thread. Thanks for your answer. Morten
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads