Google Answers Logo
View Question
 
Q: Subject: how to 'munge' From: line when posting from trn ( No Answer,   3 Comments )
Question  
Subject: Subject: how to 'munge' From: line when posting from trn
Category: Computers > Software
Asked by: hahna-ga
List Price: $2.00
Posted: 12 Nov 2002 08:00 PST
Expires: 13 Nov 2002 18:32 PST
Question ID: 106059
originally (Question ID: 75763)

hi there~ 
 
i hope some kind soul will be able to help me.  i have been posting on
usenet for many years now and it is only recently that the spam that
results from it has gotten pretty bad.  i would like to know how to
'munge' the from: line on my postings from trn.  i have read the man
pages for trn and there is some information that i think might pertain
to this puzzle, but i do not know how to use the information:
 
   Interpretation and Interpolation 
 
   Many  of  the  strings  that  trn  handles  are  subject  to 
   interpretations of several types.  Under filename expansion, 
   an initial "~/" is translated  to  the  name  of  your  home 
   directory,  and "~name" is translated to the login directory 
   for the user specified.  Filename expansion will also expand 
   an   initial   environment   variable,  and  also  does  the 
   backslash, caret and percent expansion mentioned below. 
 
   All interpreted strings go through backslash, caret and per- 
   cent  interpretation.   The backslash escapes are the normal 
   ones (such as \n, \t, \033, etc.).  The caret escapes  indi- 
   cate  control  codes (such as ^i, ^l, etc.).  If you wish to 
   pass through a backslash or a caret it must be escaped  with 
   a  backslash.   The  special  percent escapes are similar to 
   printf percent escapes.  These  cause  the  substitution  of 
   various  run-time values into the string.  The following are 
   currently recognized: 
 
   [deleted...] 
 
   %D      "Distribution:" line from the current article. 
  
   %f      "From:"  line  from  the  current  article,  or  the 
   "Reply-To:"   line  if  there  is one.  This differs 
   from %t in that comments (such as the full name) are 
   not stripped out with %f. 
 
   [deleted] 
 
end of man page excerpt... 
 
how do i use this information to achieve my desire?  or am i looking
in the wrong direction?
 
from usenet search using key words ["how to" munge from trn]: 
 
"Yes, you can do it. Just add the From: line in the NEWSHEADER
setting."
 
what is the NEWSHEADER setting?  is this an environmental value?  when
i type setenv, i see many values, none of which are NEWSHEADER.  from
the prompt would i type something like:
 
setenv NEWSHEADER From: mymungedemail@REMOVEME.myschool.edu 
  
 ?   
 
also from my usenet search: 
 
"Gravity complies, though with all the silly people who now munge
their addresses in the naive belief it'll cut down on spam, one has to
usually hand-edit email reply addresses anyway." 
 
[gravity is a newsreader that the poster of the quote believes in] 
 
anyways, all thoughtful replies, comments and answers gratefully
accepted.  if i dont get an answer that works, i will dutifully
continue slogging through the spam, no problem.
 
please ask if you need any clarifications! 
 
hahna
Answer  
There is no answer at this time.

Comments  
Subject: Re: Subject: how to 'munge' From: line when posting from trn
From: denco-ga on 12 Nov 2002 10:13 PST
 
It sounds like you have shell access, and hopefully
have knowledge of a line editor such as vi, etc.

It appears you will have to edit (back it up first!)
or create a file called .trn or .trnrc (the name is
system dependent...)  In that file, have a line:

FROM="mymungedemail@REMOVEME.myschool.edu"
Subject: Re: Subject: how to 'munge' From: line when posting from trn
From: hahna-ga on 13 Nov 2002 14:15 PST
 
dear denco,

thank you for your tip.

id been looking on and off for the answer to this for quite some time
now (years!).

i finally put it all together this afternoon.  im not sure what i
wasnt getting, but somehow your comment helped nudge me in the right
direction.

here is what i did:

1) added the following 3 lines to my .cshrc:

setenv TRNINIT $HOME/.trninit
setenv NO_ORIGINATOR yes

2) created .trninit with the following text (the spaces after the
colons COUNT and the space between "subject"s ALSO COUNT.):

-ENEWSHEADER="%(%[followup-to]=^$?:%(%[followup-to]=^%n$?:X-ORIGINAL-NEWSGROUPS:
%n
))Newsgroups: %(%F=^$?%C:%F)
From: mymungedemail@REMOVEME.myschool.edu
Subject: %(%S=^$?%\"

Subject: \":Re: %S)
Summary:
Expires:
%(%R=^$?:References: %R
)Sender:
Followup-To:
%(%{REPLYTO}=^$?:Reply-To: %{REPLYTO}
)Distribution: %(%i=^$?%\"Distribution: \":%D)
Organization: %o
Originator: mymungedemail@REMOVEME.myschool.edu
Keywords: %[keywords]
Cc: %(%F=poster?%t:%(%F!=@?:%F))

"


-EATTRIBUTION="According to %)f:"

3) log in/log out OR source the .cshrc file.

i fired up trn and posted to alt.test and voila, munged header!  yay! 
thank you again.

incidentally, are you waiting in line to become a researcher?  how
long have you been waiting?  i hope they let you (if you want to). 
youve been a great help.
Subject: Re: Subject: how to 'munge' From: line when posting from trn
From: hahna-ga on 13 Nov 2002 14:15 PST
 
that is, i added the following TWO lines to my .trninit.  ;)

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy