🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #53955

Re: How to Edit in slrn ..?

#53955
From: Sylvan Butler
Date: Thu, 11 Nov 1999 00:00
99 lines
3982 bytes
On 9 Nov 1999 11:02:39 GMT, Desmond Coughlan <desmond@tortue.coughlan.net> wrote:
>Also, how do I set the 'From' header to something to defeat spam?

Here is the macro I use (with some string constants slightly altered):

=======================
%
% set up for munged username and handle custom reply-to in specified groups
%

variable ReplyTo = "";   % hold desired valid reply to, used in groups below

define post_hook ()
{
   if (0 == strncmp (current_newsgroup, "loc.", 4) or
       0 == strncmp (current_newsgroup, "myisp.", 6)
   )
      set_string_variable ("replyto",ReplyTo);
   else
      set_string_variable ("replyto","");
}

define followup_hook ()
{
   post_hook();
}


define reply_hook ()
{
   set_string_variable ("replyto","");
}


define forward_hook ()
{
   reply_hook ();
}



{
% 'hostname' is not a set'able string value  (until 0.9.5.5)
% .slrnrc should specify default hostname, OR
% HOSTNAME environment variable should specify munged name
% posting_host is accessable via a patch:
%   --- slrn/src/startup.c  Sun May 16 23:27:02 1999
%   +++ slrn-mine/src/startup.c Mon May 17 13:38:13 1999
%   @@ -453,6 +453,7 @@
%         {"username", &Slrn_User_Info.username},
%         {"replyto", &Slrn_User_Info.replyto},
%         {"organization", &Slrn_User_Info.org},
%   +     {"posting_host", &Slrn_User_Info.posting_host},
%         {"followup", &Slrn_User_Info.followup_string},   /* obsolete */
%         {"followup_string", &Slrn_User_Info.followup_string},
%         {"reply_string", &Slrn_User_Info.reply_string},
   variable host = getenv("HOSTNAME");
   if ( NULL == host ) {
      host=get_variable_value("posting_host");
   }
   if (0 == strncmp (host, "Hostname.work", 8)) {
      ReplyTo = "My@RealAddress.work";
      host="A.Munged.Hostname.invalid";
      set_string_variable ("posting_host",host);
      set_string_variable ("hostname",host);
   } else {
      ReplyTo = "My@RealAddress.home";
% my isp won't allow: host="A.Munged.Hostname.invalid";
      set_string_variable ("posting_host",host);
      set_string_variable ("hostname",host);
   }

% USER environment variable should specify munged name
% I prefer setting it in the script that starts slrn using 'date'
%   USER=nospam+`date +%y%m`
   variable user = getenv("USER");
   if ( NULL == user ) {
      user = "unknown";
   }
   set_string_variable ("username",user);

% OK, let's see what we ended up with...
   printf ("\n  Address now:  \"%s@%s\"",user,host);
   printf ("\n  With \"Reply-To: %s\" in certain groups",ReplyTo);
   printf ("\n  (and hostname: %s)",get_variable_value("hostname"));
}

% vim:set tw=0 ts=3 fo=vtcq:
=======================

sdb
-- 
 | Sylvan Butler | Not speaking for Hewlett-Packard | sbutler-boi.hp.com |
 | Watch out for my e-mail address. Thank UCE.   #### change ^ to @ #### |
    They that can give up essential liberty to obtain a little temporary
    safety deserve neither liberty nor safety. --Benjamin Franklin, 1759
 "Don't Tread On Me!"

Technical Details
Message-ID: <slrn82mdor.c18.nospam+_no_Zs__9911@hpb13799z.zboi.hpz.com.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn82fvtv.fe.desmond@tortue.coughlan.net>

Show Full Headers
Complete Article Headers
Message-ID: <slrn82mdor.c18.nospam+_no_Zs__9911@hpb13799z.zboi.hpz.com.invalid>
Subject: Re: How to Edit in slrn ..?
Date: Thu, 11 Nov 1999 00:00:00 +0000
From: nospam+_no_Zs__9911@hpb13799z.zboi.hpz.com.invalid (Sylvan Butler)
References: <slrn82fvtv.fe.desmond@tortue.coughlan.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 547493158
X-Original-NNTP-Posting-Host: hpb13799.boi.hp.com
Mail-Copies-To: never
X-Complaints-To: usenet@news.boi.hp.com
X-Trace: hpbs1500.boi.hp.com 942356637 17746 15.98.137.41 (11 Nov 1999 21:43:57 GMT)
Organization: Hewlett-Packard
User-Agent: slrn/0.9.5.7 (Linux)
NNTP-Posting-Date: 11 Nov 1999 21:43:57 GMT
Newsgroups: news.software.readers