perl filter & "standard" headers
Julien ÉLIE
julien at trigofacile.com
Tue May 20 20:46:29 UTC 2008
Hi Matija,
> Playing with INN perl filter, and trying to implement some nifty things, it
> has come to my attention that INN passes only "standard" headers to perl
> filter code in %hdr array.
Yes! And I think that Fred also wanted "X-Complaints-To" (well I have doubts
but I believe it was Fred and this header...).
> X-Complaints-To
> Complaints-To
Is the second one really used?
> X-NoArchive
Isn't it X-No-Archive?
> Cancel-Lock
And Cancel-Key too?
> It should be rather trivial to include ARTHEADERINIT() calls for them unless
> I'm overseeing some subtle code ?
Yes it is.
> Also, any other suggestions for other useful headers ?
In-Reply-To?
I also thought about X-Face, X-PGP-Sig, Mime-Version and Content-Transfer-Encoding
but I do not know if they are really useful for filters...
> Would a (trivial, and tested of course) patch for adding
> those be accepted ?
Of course it is :-)
It is something I have wanted to do for a year (May 2007)...
> And/or maybe provide generic $hdr{__HEADERS__} (or $hdr{__ARTICLE__} if it
> is easier) which would contain read-only string containing all headers (or
> all headers+body) ?
It sounds a great idea!
Here is a copy of what I sent last year, in order to provide some more information.
Thanks again,
Julien
----- Message d'origine -----
De : "Julien ÉLIE" <julien at trigofacile.com>
À : <inn-bugs at isc.org>
Envoyé : mercredi 2 mai 2007 16:43
Objet : Adding other headers in %hdr
> Hi,
>
> First of all, there is a discrepancy between the actual
> headers in %hdr and what is mentioned in hook-perl/python.pod;
> indeed, these fields are missing in hook-perl.pod while
> there are in innd.c:
>
> Xref
> Date-Received
> Posted
> Posting-Version
> Received
> Relay-Version
> X-Newsposter
> User-Agent
> X-Original-Message-ID
>
>
> I believe they should be added to hook-perl.pod. Then
> hook-perl.pod should be updated accordingly.
>
>
> By the way, can new headers be added?
> Here is an interesting list:
>
> X-Complaints-To
> NNTP-Posting-Date
> In-Reply-To
> X-No-Archive
> X-Face
> Mime-Version
> Content-Transfer-Encoding
> Cancel-Lock
> Cancel-Key
>
>
> Do you know other useful headers which could be appended
> to that list?
>
> When a good list is set, there is only these fields to
> add in innd.c, hook-perl/python.pod, tests\innd\fakeinnd.c
> and samples\filter_innd.py (easy to do I believe but
> I do not provide a patch because I do not know the exact
> headers list you wish to add).
>
> Regards,
>
> --
> Julien ÉLIE
>
> « La grippe, ça dure huit jours si on la soigne et une semaine
> si on ne fait rien. » (Raymond Devos)
More information about the inn-workers
mailing list