🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
9 messages
9 total messages Started by Jerzy Kedra Thu, 06 Oct 2005 16:45
Sender header
#72407
Author: Jerzy Kedra
Date: Thu, 06 Oct 2005 16:45
14 lines
1594 bytes
Hello,
INN 2.4 can insert authenticated sender name in Sender header
when nnrpdauthsender is set in inn.conf or readers.conf.

This is the nice feature to modify Sender in filter_nnrpd.pl.
But I cannot delete it - inn seems to regenerate the original.
$modify_headers is set ;-)

Why deleted Sender is recreated again?

I would like to crypt real sender into X-Sender header.
In Sender is real mail address which shouldn't be exposed.

Jurek
Re: Sender header
#72409
Author: Jeffrey M. Vinocur
Date: Thu, 06 Oct 2005 20:50
29 lines
1999 bytes
In article <di3kbp$6bk$1@news.onet.pl>, Jerzy Kedra  <jxa@onet.pl> wrote:
>
>INN 2.4 can insert authenticated sender name in Sender header
>when nnrpdauthsender is set in inn.conf or readers.conf.
>
>This is the nice feature to modify Sender in filter_nnrpd.pl.
>But I cannot delete it - inn seems to regenerate the original.

Looking at the source in nnrpd/perl.c:HandleHeaders(), it seems
to me that this code does not permit deletion of headers at all.
That is, it works by looking through each %hdr entry and updating
the corresponding part of the article.  Therefore if something is
removed from %hdr, INN will not notice.

(Russ, do you think this is worth reworking that code for?)



>I would like to crypt real sender into X-Sender header.
>In Sender is real mail address which shouldn't be exposed.

This seems like a reasonable thing to do.  But you can get the
authenticated username via the Perl variable $user.  Then you
shouldn't need nnrpdauthsender at all.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Sender header
#72420
Author: Jerzy Kedra
Date: Fri, 07 Oct 2005 13:08
21 lines
1901 bytes
Jeffrey M. Vinocur wrote:

> Looking at the source in nnrpd/perl.c:HandleHeaders(), it seems
> to me that this code does not permit deletion of headers at all.
[...]
> (Russ, do you think this is worth reworking that code for?)

Jeffrey thanks for you response. I have found an example
about deleting X-Trace header this way in INN FAQ
(http://www.eyrie.org/~eagle/faqs/inn.html -
Hide the X-Trace header). So I had hope, it will work
with Sender also :-)


> [...] But you can get the
> authenticated username via the Perl variable $user.

You are right - I will switch to $user.

Regards,
Jurek
Re: Sender header
#72811
Author: Russ Allbery
Date: Mon, 12 Dec 2005 00:27
25 lines
2104 bytes
Jeffrey M Vinocur <jeff@litech.org> writes:
> Jerzy Kedra  <jxa@onet.pl> wrote:

>> INN 2.4 can insert authenticated sender name in Sender header
>> when nnrpdauthsender is set in inn.conf or readers.conf.

>> This is the nice feature to modify Sender in filter_nnrpd.pl.
>> But I cannot delete it - inn seems to regenerate the original.

> Looking at the source in nnrpd/perl.c:HandleHeaders(), it seems
> to me that this code does not permit deletion of headers at all.
> That is, it works by looking through each %hdr entry and updating
> the corresponding part of the article.  Therefore if something is
> removed from %hdr, INN will not notice.

> (Russ, do you think this is worth reworking that code for?)

Yeah, I think it would be a good idea, although I don't have time to do it
at the moment.  Added to TODO.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Sender header
#72820
Author: aioe
Date: Tue, 13 Dec 2005 08:37
16 lines
1537 bytes
On Sun, 11 Dec 2005 16:27:19 -0800, Russ Allbery wrote:

>> Looking at the source in nnrpd/perl.c:HandleHeaders(), it seems
>> to me that this code does not permit deletion of headers at all.
>> That is, it works by looking through each %hdr entry and updating
>> the corresponding part of the article.  Therefore if something is
>> removed from %hdr, INN will not notice.

this seems false
nnrpd perl filter can delete headers (try:
delete $hdr{'somewhat'};
$hdr{'somewhat'} = undef; )



  
Re: Sender header
#72823
Author: Russ Allbery
Date: Tue, 13 Dec 2005 17:21
15 lines
1570 bytes
aioe <estasi@aioe.org> writes:

> this seems false
> nnrpd perl filter can delete headers (try:
> delete $hdr{'somewhat'};
> $hdr{'somewhat'} = undef; )

Those changes aren't propagated back to the article that's actually
posted.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Sender header
#72824
Author: Bill Davidsen
Date: Tue, 13 Dec 2005 21:20
31 lines
2889 bytes
Russ Allbery wrote:
> aioe <estasi@aioe.org> writes:
> 
> 
>>this seems false
>>nnrpd perl filter can delete headers (try:
>>delete $hdr{'somewhat'};
>>$hdr{'somewhat'} = undef; )
> 
> 
> Those changes aren't propagated back to the article that's actually
> posted.
> 
I just looked at that code, and my first thought is that the code is 
really ugly in there :-(

That said, it looks as if changes get propagated back to the article, if 
not why have all that code for HeaderModified. And while the *name* of 
the header won't go away with current code, the text can certainly be 
set to a null string, which is probably all the O.P. really needs.

To make delete work in the sense of make the header go away would 
require a change in the code to verify each header still exists, a 
somewhat formidable effort given the lack of comments in that section of 
the code. Of course an option to "DELETE_EMPTY_HEADERS" would clean up 
posting in general, and provide a way to delete as a side effect.

-- 
bill davidsen
   SBC/Prodigy Yorktown Heights NY data center
   http://newsgroups.news.prodigy.com
Re: Sender header
#72825
Author: Russ Allbery
Date: Tue, 13 Dec 2005 21:33
41 lines
2952 bytes
Bill Davidsen <davidsen@deathstar.prodigy.com> writes:
> Russ Allbery wrote:
>> aioe <estasi@aioe.org> writes:

>>> this seems false
>>> nnrpd perl filter can delete headers (try:
>>> delete $hdr{'somewhat'};
>>> $hdr{'somewhat'} = undef; )

>> Those changes aren't propagated back to the article that's actually
>> posted.

> I just looked at that code, and my first thought is that the code is
> really ugly in there :-(

Yup, on my list to rewrite.

> That said, it looks as if changes get propagated back to the article, if
> not why have all that code for HeaderModified. And while the *name* of
> the header won't go away with current code, the text can certainly be
> set to a null string, which is probably all the O.P. really needs.

I think innd then rejects the message as a syntax error, and this doesn't
work with extra headers.  I didn't say that changes weren't propagated
back; I said that deletions weren't.  :)

> To make delete work in the sense of make the header go away would
> require a change in the code to verify each header still exists, a
> somewhat formidable effort given the lack of comments in that section of
> the code. Of course an option to "DELETE_EMPTY_HEADERS" would clean up
> posting in general, and provide a way to delete as a side effect.

There are much better ways to write that whole block of code, and in fact
much better ways of doing header handling in nnrpd.  Now if only I had
more time....

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: Sender header
#72832
Author: Bill Davidsen
Date: Wed, 14 Dec 2005 18:31
56 lines
3603 bytes
Russ Allbery wrote:
> Bill Davidsen <davidsen@deathstar.prodigy.com> writes:
> 
>>Russ Allbery wrote:
>>
>>>aioe <estasi@aioe.org> writes:
> 
> 
>>>>this seems false
>>>>nnrpd perl filter can delete headers (try:
>>>>delete $hdr{'somewhat'};
>>>>$hdr{'somewhat'} = undef; )
> 
> 
>>>Those changes aren't propagated back to the article that's actually
>>>posted.
> 
> 
>>I just looked at that code, and my first thought is that the code is
>>really ugly in there :-(
> 
> 
> Yup, on my list to rewrite.
> 
> 
>>That said, it looks as if changes get propagated back to the article, if
>>not why have all that code for HeaderModified. And while the *name* of
>>the header won't go away with current code, the text can certainly be
>>set to a null string, which is probably all the O.P. really needs.
> 
> 
> I think innd then rejects the message as a syntax error, and this doesn't
> work with extra headers.  I didn't say that changes weren't propagated
> back; I said that deletions weren't.  :)
> 
> 
>>To make delete work in the sense of make the header go away would
>>require a change in the code to verify each header still exists, a
>>somewhat formidable effort given the lack of comments in that section of
>>the code. Of course an option to "DELETE_EMPTY_HEADERS" would clean up
>>posting in general, and provide a way to delete as a side effect.
> 
> 
> There are much better ways to write that whole block of code, and in fact
> much better ways of doing header handling in nnrpd.  Now if only I had
> more time....
> 
Okay, you talked me out of it ;-) I never argue when someone says 
something is on THEIR 2do list instead of mine. Since I don't have the 
problem, I can live without the solution, I just won't look at the code 
right after I eat.

-- 
bill davidsen
   SBC/Prodigy Yorktown Heights NY data center
   http://newsgroups.news.prodigy.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads