Article View: news.software.readers
Article #217176Re: [Dialog] I need two X-No-Archive Headers
From: Oliver Cromm
Date: Fri, 22 Feb 2008 20:51
Date: Fri, 22 Feb 2008 20:51
78 lines
3689 bytes
3689 bytes
* Oliver Cromm wrote:
> * Gember Breuk wrote:
>
>> Here is the script that makes it work:
>
> Attention! I don't believe this works correctly.
>
> From my understanding, it *overwrites* the header following User-Agent
> (the "anchor")
Here's what should do the job in a minimal way. It should also answer
MikeV06's question about combining different functionalities in
OnSendingMessage: the best way is using include.
In CustomScripts, create a new script called "Include_AddAnyHeader".
Paste in the following (unfold the procedure line):
--------------
procedure AddAnyHeader(AddHeader:String; var Message:TStringlist;
IsEmail:Boolean);
var i: integer;
begin
If not IsEmail then begin
i := 1;
while Message[i] <> '' do
i := i+1;
Message.insert(i, AddHeader);
end
end;
--------------
Save, *don't* compile.
In OnBeforeSendingMessage, after the program line, add
{$I Include_AddAnyHeader.ds}
Inside the function OnBeforeSendingMessage, add the following line:
AddAnyHeader ('X-No-Archive: banter', Message, IsEmail);
You can add more lines for any additional header you'd like to add. I'll
demonstrate it in this message.
Save and *do* compile. Reload scripts to be sure.
For example, my script now looks like this:
--------------
program OnBeforeSendingMessage;
{$I CancelLock_include.ds}
{$I Include_AddAnyHeader.ds}
function OnBeforeSendingMessage(var Message: TStringlist; Servername:
string; IsEmail: boolean):boolean;
begin
result:=true;
CLMain_CancelLock (Message, IsEmail);
AddAnyHeader ('X-CustomScript: AddAnyHeader', Message, IsEmail);
AddAnyHeader ('X-ScriptMadeBy: me, myself & I', Message, IsEmail);
end;
begin
end.
--------------
--
The nice thing about standards is that you have so many to choose
from; furthermore, if you do not like any of them, you can just
wait for next year's model.
Andrew Tanenbaum, _Computer Networks_ (1981), p. 168.
Technical Details
Message-ID:
<iwlennvzcrnu.dlg@mid.crommatograph.info>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!auth.beige.octanews.com.POSTED!not-for-mailReferences:
<40lhz7pt2tqo.dlg@sqwertz.com> <1td7qgn0qa5kx$.dlg@blackholespam.net> <1l5i97dcyjakx$.dlg@sqwertz.com> <1cfxfs0ud4v2i.dlg@blackholespam.net> <1cq6okvpxxuxn$.dlg@mid.crommatograph.info>Show Full Headers
Complete Article Headers
Message-ID: <iwlennvzcrnu.dlg@mid.crommatograph.info>
Subject: Re: [Dialog] I need two X-No-Archive Headers
Date: Fri, 22 Feb 2008 15:51:36 -0500
From: Oliver Cromm <lispamateur@yahoo.de>
References: <40lhz7pt2tqo.dlg@sqwertz.com> <1td7qgn0qa5kx$.dlg@blackholespam.net> <1l5i97dcyjakx$.dlg@sqwertz.com> <1cfxfs0ud4v2i.dlg@blackholespam.net> <1cq6okvpxxuxn$.dlg@mid.crommatograph.info>
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!auth.beige.octanews.com.POSTED!not-for-mail
Newsgroups: news.software.readers
User-Agent: 40tude_Dialog/2.0.15.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Organization: École Nationale Supérieure de la Bananologie
X-Face: .f:ZE>c\~9oJ+1nK#>ntSHOQS~4x"Qx2m(<D<@p$G"tzb1lgWLUGY.zApKa@VL_?d$r(8=?VjrD9=uY:x!+H=hvj58Uw7)Y9<:KMYD.+^~#qMpeg2rvt`{#2a~7YoyFaFaBEdo4.TJzBqgtCZZ:mku4J|hey}DE}_"z(rl0N)\Pxh*0$"3B2mr\01&YPY7WJ:2kSe'I#PqiTxs1s49!S#W85'\zMXy*wRgD,,k.=4:3M{(P"i6S;
\az~ut3z`; ?*Y;
&]11<(EPF-SN`|3PhyL%~AuZpoFjjE_oM1`znHPq_?uib2WXwE+q@m),cLq~B$r^5uO]u6?CEecn=%xsDXNVa(1DX.)O(
Cancel-Lock: sha1:Alfh/PnJt8BkYOeFWVwFg2CIV28=
X-CustomScript: AddAnyHeader
X-ScriptMadeBy: me, myself & I
Lines: 78
NNTP-Posting-Date: 22 Feb 2008 14:51:30 CST
X-Complaints-To: abuse@octanews.net
X-Original-Bytes: 3372