slrn: copy in approved.sl, fix slrnrc to point to it

This commit is contained in:
Paul Walker
2021-03-02 10:00:57 +00:00
parent e0bd69c1d3
commit b42334a5eb
2 changed files with 34 additions and 3 deletions

30
slrn/approved.sl Normal file
View File

@@ -0,0 +1,30 @@
% This variable will hold the followup_custom_headers as defined in the
% .slrnrc file.
variable Default_Followup_Headers;
Default_Followup_Headers = get_variable_value ("followup_custom_headers");
define followup_hook ()
{
variable h;
h = Default_Followup_Headers;
if ((0 == strncmp (current_newsgroup, "alt.sysadmin.recovery", 21)) |
(0 == strncmp (current_newsgroup, "alt.tech-support.recovery", 25)) |
(0 == strncmp (current_newsgroup, "bofh.", 5))
)
{
% Generate Approved header
h = sprintf ("%sApproved: probably not\n", h);
}
if ((0 != strncmp(current_newsgroup, "comp.", 5)) &
(0 != strncmp(current_newsgroup, "rec.", 4)) &
(0 != strncmp(current_newsgroup, "bofh.", 5))
)
{
h = sprintf("%sX-No-Archive: Yes\n", h);
}
set_string_variable ("followup_custom_headers", h);
}

7
slrnrc
View File

@@ -160,9 +160,9 @@ set save_replies "News/Sent_Emails"
% The sendmail command allows you to substitute another mailer. Be sure that
% it implements the same interface as sendmail!
set sendmail_command "/usr/lib/sendmail -oi -t -oem -odb"
%set sendmail_command "/usr/lib/sendmail -oi -t -oem -odb"
%set sendmail_command "/usr/exim/bin/exim -oi -t -oem -odb"
set sendmail_command "~/bin/mymuttmsmtp -a Fastmail"
% Name of score file (relative to HOME directory)
set scorefile "News/Score"
@@ -521,4 +521,5 @@ setkey readline trim "\e/" % Trim whitespace
setkey readline quoted_insert "^Q" % Quoted insert
%interpret /usr/local/share/slrn/search.sl
interpret ~/.slrn/approved.sl
% Path is relative to $HOME
interpret .slrn/approved.sl