OCTADE |
mail  files  register  groups  login |
1 |
<6b03eb75eb84c4640cb112d3f68b6197$1@sybershock.com>
copy midhttps://news.octade.net/rocksolid/article-flat.php?id=398&group=rocksolid.nodes.help#398
copy link Newsgroups: rocksolid.nodes.helpWill someone please refresh my memory ...
Where do I need to locate the file, header_filters.conf for rslight to read it?
header_filters.conf blocks messages from:
remote server on pull?
local server posted by local user?
header_filters.conf is activated, how?
If I recall correctly an entry in header_filters.conf is a single line with a header name followed by regex string, like this:
From: /test/
Is this correct?
--
SugarBug <3883@sugar.bug> | sybershock.com
<f8d7c2c157a032e2cb7a97c3d3ce957c$1@www.novabbs.org>
copy midhttps://news.octade.net/rocksolid/article-flat.php?id=400&group=rocksolid.nodes.help#400
copy link Newsgroups: rocksolid.nodes.helpOn Fri, 22 Mar 2024 16:04:32 -0500, SugarBug wrote:
> Will someone please refresh my memory ...
>
> Where do I need to locate the file, header_filters.conf for rslight to read it?
In $config_dir
> header_filters.conf blocks messages from:
>
> remote server on pull?
Yes.
> local server posted by local user?
I'm pretty sure it does not.
> header_filters.conf is activated, how?
By existing :)
> If I recall correctly an entry in header_filters.conf is a single line with a header name followed by regex string, like this:
>
> From: /test/
>
> Is this correct?
From: <1mk68gcb4f6tf$.12pg7u6934ohl.dlg@40tude.net>
Try $config_dir/header_filters.conf
This should work with the following headers:
'Message-ID'
'Subject'
'From'
'Path'
The format should be the header AND header content, and is a regex:
From: /black@hole\.url/
From: /Black Hole \<black@hole\.url\>/
From: /Black Hole/
Subject: /Buy Illegal Crap Today/
-----
Good luck :)
<a58de901aed2096fe6876f650237f93b$1@sybershock.com>
copy midhttps://news.octade.net/rocksolid/article-flat.php?id=401&group=rocksolid.nodes.help#401
copy link Newsgroups: rocksolid.nodes.helpIt seems that if one or more lines of the header_filters.conf file have a regex formatting error that not even the properly formatted lines will result in blocking any incoming messages.
For instance I put this in:
From: /<fake.broken.remove.this@hello.dude>/
From: /test5/
From: /test6/
From: /test7/
From: /test8/
From: /test9/
And the result is that blocking did not work, and, a message that seemed blocked previously showed up in the spool a couple cron jobs after the bad formatting was tested.
Also, even with properly formatted lines, it still doesn't block, or arbitrarily, and there seems no rhyme or reason. It let most messages through and blocked only a few.
I am missing something here as it seems that header_filters.conf is having no effect in group rocksolid.nodes.help.
I did a upgrade install with most recent git pull and I tried this:
~$ cat header_filters.conf
From: /test/i
From: /SugarBug/
From: /Marco Moock/
From: /Kyonshi/
From: /Retro Guy/
From: /yamo/
Then I ran the cron job a few times, and the messages from these users still show up in the spool:
https://rocksolid.sybershock.com/rocksolid/thread.php?group=rocksolid.nodes.help
However the line:
From: /test/i
did seem to be filter the messages, as shown here:
https://rocksolid.sybershock.com/random/thread.php?group=alt.test
This did filter out test messages with 'test' as a substring in the From: header. But it is not working with all the others tested in the same runs.
What am I missing?
--
3883@sugar.bug | sybershock.com
<e6fe02899f6a1ab6dc47bdca26ff85e1$1@sybershock.com>
copy midhttps://news.octade.net/rocksolid/article-flat.php?id=402&group=rocksolid.nodes.help#402
copy link Newsgroups: rocksolid.nodes.helpP.S. One more test ...
I changed header_filters.conf to contain only a single line:
From: /Retro Guy/
and this seemed to filter out all messages from Retro Guy.
But having more than one line there is failure, as before.
Then I tried again with this line:
From: /SugarBug/
and this seemed to filter out all messages from SugarBug.
But once there is more than one line in the file it seems to fail to filter most or all, in a hit and miss fashion.
I must have something configured out of whack here, but I don't know where to look. Ideas?
<fac7ff00037a2be7d953637c87e7a825$1@www.novabbs.org>
copy midhttps://news.octade.net/rocksolid/article-flat.php?id=403&group=rocksolid.nodes.help#403
copy link Newsgroups: rocksolid.nodes.helpOn Sat, 23 Mar 2024 12:30:33 -0500, SugarBug wrote:
> P.S. One more test ...
>
> I changed header_filters.conf to contain only a single line:
>
> From: /Retro Guy/
>
> and this seemed to filter out all messages from Retro Guy.
>
> But having more than one line there is failure, as before.
>
> Then I tried again with this line:
>
> From: /SugarBug/
>
> and this seemed to filter out all messages from SugarBug.
>
> But once there is more than one line in the file it seems to fail to filter most or all, in a hit and miss fashion.
>
> I must have something configured out of whack here, but I don't know where to look. Ideas?
I will look into this now. Maybe more that one line is an issue? I will
check.
Tbh, I don't use this filter, I only use spamassassin on my installs, so
feedback is appreciated.
<8053438047064cccfbf270f1470db748$1@www.novabbs.org>
copy midhttps://news.octade.net/rocksolid/article-flat.php?id=404&group=rocksolid.nodes.help#404
copy link Newsgroups: rocksolid.nodes.helpOn Sat, 23 Mar 2024 12:15:37 -0500, SugarBug wrote:
> It seems that if one or more lines of the header_filters.conf file have a regex formatting error that not even the properly formatted lines will result in blocking any incoming messages.
>
> For instance I put this in:
>
> From: /<fake.broken.remove.this@hello.dude>/
> From: /test5/
> From: /test6/
> From: /test7/
> From: /test8/
> From: /test9/
>
> And the result is that blocking did not work, and, a message that seemed blocked previously showed up in the spool a couple cron jobs after the bad formatting was tested.
>
> Also, even with properly formatted lines, it still doesn't block, or arbitrarily, and there seems no rhyme or reason. It let most messages through and blocked only a few.
>
> I am missing something here as it seems that header_filters.conf is having no effect in group rocksolid.nodes.help.
>
> I did a upgrade install with most recent git pull and I tried this:
>
> ~$ cat header_filters.conf
> From: /test/i
> From: /SugarBug/
> From: /Marco Moock/
> From: /Kyonshi/
> From: /Retro Guy/
> From: /yamo/
>
> Then I ran the cron job a few times, and the messages from these users still show up in the spool:
>
> https://rocksolid.sybershock.com/rocksolid/thread.php?group=rocksolid.nodes.help
>
> However the line:
>
> From: /test/i
>
> did seem to be filter the messages, as shown here:
>
> https://rocksolid.sybershock.com/random/thread.php?group=alt.test
>
> This did filter out test messages with 'test' as a substring in the From: header. But it is not working with all the others tested in the same runs.
>
> What am I missing?
Ok, I think I see the issue. As I mentioned, I don't use this so I don't
notice these things.
Each header should be one line in header_filters.conf:
From: /test5|test6|test7|test8|test9/
Only one line per header.
In the code:
$from_filter = get_config_value('header_filters.conf', 'From');
if (preg_match($from_filter, $from[1])) {
So, the one line for From: is checked as one big regex.
<utn4rk$2om4v$1@novabbs.org>
copy midhttps://news.octade.net/rocksolid/article-flat.php?id=405&group=rocksolid.nodes.help#405
copy link Newsgroups: rocksolid.nodes.helpOn Sat, 23 Mar 2024 10:38:06 -0700
Retro Guy <retroguy@novabbs.org> wrote:
> On Sat, 23 Mar 2024 12:30:33 -0500, SugarBug wrote:
>
> > P.S. One more test ...
> >
> > I changed header_filters.conf to contain only a single line:
> >
> > From: /Retro Guy/
> >
> > and this seemed to filter out all messages from Retro Guy.
> >
> > But having more than one line there is failure, as before.
> >
> > Then I tried again with this line:
> >
> > From: /SugarBug/
> >
> > and this seemed to filter out all messages from SugarBug.
> >
> > But once there is more than one line in the file it seems to fail to filter most or all, in a hit and miss fashion.
> >
> > I must have something configured out of whack here, but I don't know where to look. Ideas?
>
> I will look into this now. Maybe more that one line is an issue? I will
> check.
>
> Tbh, I don't use this filter, I only use spamassassin on my installs, so
> feedback is appreciated.
I almost have it narrowed down, but not entirely so. At this point it seems mostly that the first From: line gets filtered, and then the From: lines after that do not get filtered. After a few tests this seems to be the case. If you compare my group, alt.test, to your spool, you should see what I mean, for 'From: /t3st1ng/'.
--
3883@sugar.bug | sybershock.com
<ff5afde6edf9d96348e723df867b81db$1@sybershock.com>
copy midhttps://news.octade.net/rocksolid/article-flat.php?id=406&group=rocksolid.nodes.help#406
copy link Newsgroups: rocksolid.nodes.helpOn Sat, 23 Mar 2024 10:45:26 -0700
Retro Guy <retroguy@novabbs.org> wrote:
> On Sat, 23 Mar 2024 12:15:37 -0500, SugarBug wrote:
>
> > It seems that if one or more lines of the header_filters.conf file have a regex formatting error that not even the properly formatted lines will result in blocking any incoming messages.
> >
> > For instance I put this in:
> >
> > From: /<fake.broken.remove.this@hello.dude>/
> > From: /test5/
> > From: /test6/
> > From: /test7/
> > From: /test8/
> > From: /test9/
> >
> > And the result is that blocking did not work, and, a message that seemed blocked previously showed up in the spool a couple cron jobs after the bad formatting was tested.
> >
> > Also, even with properly formatted lines, it still doesn't block, or arbitrarily, and there seems no rhyme or reason. It let most messages through and blocked only a few.
> >
> > I am missing something here as it seems that header_filters.conf is having no effect in group rocksolid.nodes.help.
> >
> > I did a upgrade install with most recent git pull and I tried this:
> >
> > ~$ cat header_filters.conf
> > From: /test/i
> > From: /SugarBug/
> > From: /Marco Moock/
> > From: /Kyonshi/
> > From: /Retro Guy/
> > From: /yamo/
> >
> > Then I ran the cron job a few times, and the messages from these users still show up in the spool:
> >
> > https://rocksolid.sybershock.com/rocksolid/thread.php?group=rocksolid.nodes.help
> >
> > However the line:
> >
> > From: /test/i
> >
> > did seem to be filter the messages, as shown here:
> >
> > https://rocksolid.sybershock.com/random/thread.php?group=alt.test
> >
> > This did filter out test messages with 'test' as a substring in the From: header. But it is not working with all the others tested in the same runs.
> >
> > What am I missing?
>
> Ok, I think I see the issue. As I mentioned, I don't use this so I don't
> notice these things.
>
> Each header should be one line in header_filters.conf:
> From: /test5|test6|test7|test8|test9/
>
> Only one line per header.
>
> In the code:
> $from_filter = get_config_value('header_filters.conf', 'From');
> if (preg_match($from_filter, $from[1])) {
>
> So, the one line for From: is checked as one big regex.
So, I should list all the substrings on one single line prefixed with that header name?
I'll test that and get back in touch.
--
3883@sugar.bug | sybershock.com
<15f543c2094fa5d0db1f4ff2b51fd836$1@sybershock.com>
copy midhttps://news.octade.net/rocksolid/article-flat.php?id=407&group=rocksolid.nodes.help#407
copy link Newsgroups: rocksolid.nodes.helpOn Sat, 23 Mar 2024 12:58:24 -0500
SugarBug <3883@sugar.bug> wrote:
> On Sat, 23 Mar 2024 10:45:26 -0700
> Retro Guy <retroguy@novabbs.org> wrote:
>
> > On Sat, 23 Mar 2024 12:15:37 -0500, SugarBug wrote:
> >
> > > It seems that if one or more lines of the header_filters.conf file have a regex formatting error that not even the properly formatted lines will result in blocking any incoming messages.
> > >
> > > For instance I put this in:
> > >
> > > From: /<fake.broken.remove.this@hello.dude>/
> > > From: /test5/
> > > From: /test6/
> > > From: /test7/
> > > From: /test8/
> > > From: /test9/
> > >
> > > And the result is that blocking did not work, and, a message that seemed blocked previously showed up in the spool a couple cron jobs after the bad formatting was tested.
> > >
> > > Also, even with properly formatted lines, it still doesn't block, or arbitrarily, and there seems no rhyme or reason. It let most messages through and blocked only a few.
> > >
> > > I am missing something here as it seems that header_filters.conf is having no effect in group rocksolid.nodes.help.
> > >
> > > I did a upgrade install with most recent git pull and I tried this:
> > >
> > > ~$ cat header_filters.conf
> > > From: /test/i
> > > From: /SugarBug/
> > > From: /Marco Moock/
> > > From: /Kyonshi/
> > > From: /Retro Guy/
> > > From: /yamo/
> > >
> > > Then I ran the cron job a few times, and the messages from these users still show up in the spool:
> > >
> > > https://rocksolid.sybershock.com/rocksolid/thread.php?group=rocksolid.nodes.help
> > >
> > > However the line:
> > >
> > > From: /test/i
> > >
> > > did seem to be filter the messages, as shown here:
> > >
> > > https://rocksolid.sybershock.com/random/thread.php?group=alt.test
> > >
> > > This did filter out test messages with 'test' as a substring in the From: header. But it is not working with all the others tested in the same runs.
> > >
> > > What am I missing?
> >
> > Ok, I think I see the issue. As I mentioned, I don't use this so I don't
> > notice these things.
> >
> > Each header should be one line in header_filters.conf:
> > From: /test5|test6|test7|test8|test9/
> >
> > Only one line per header.
> >
> > In the code:
> > $from_filter = get_config_value('header_filters.conf', 'From');
> > if (preg_match($from_filter, $from[1])) {
> >
> > So, the one line for From: is checked as one big regex.
>
> So, I should list all the substrings on one single line prefixed with that header name?
>
> I'll test that and get back in touch.
Confirmed. It appears that the filters do work when on a single line for each header as you have shown above.
Question: is there a line concatenation charcter that PHP recognizes, in the way that bash recognizes '\' at line ending?
--
3883@sugar.bug | sybershock.com
<48097657ec4b445a09648de822c6131e@www.rocksolidbbs.com>
copy midhttps://news.octade.net/rocksolid/article-flat.php?id=408&group=rocksolid.nodes.help#408
copy link Newsgroups: rocksolid.nodes.helpSugarBug wrote:
> On Sat, 23 Mar 2024 12:58:24 -0500
> SugarBug <3883@sugar.bug> wrote:
>> On Sat, 23 Mar 2024 10:45:26 -0700
>> Retro Guy <retroguy@novabbs.org> wrote:
>>
>> > On Sat, 23 Mar 2024 12:15:37 -0500, SugarBug wrote:
>> >
>> > > It seems that if one or more lines of the header_filters.conf file have a regex formatting error that not even the properly formatted lines will result in blocking any incoming messages.
>> > >
>> > > For instance I put this in:
>> > >
>> > > From: /<fake.broken.remove.this@hello.dude>/
>> > > From: /test5/
>> > > From: /test6/
>> > > From: /test7/
>> > > From: /test8/
>> > > From: /test9/
>> > >
>> > > And the result is that blocking did not work, and, a message that seemed blocked previously showed up in the spool a couple cron jobs after the bad formatting was tested.
>> > >
>> > > Also, even with properly formatted lines, it still doesn't block, or arbitrarily, and there seems no rhyme or reason. It let most messages through and blocked only a few.
>> > >
>> > > I am missing something here as it seems that header_filters.conf is having no effect in group rocksolid.nodes.help.
>> > >
>> > > I did a upgrade install with most recent git pull and I tried this:
>> > >
>> > > ~$ cat header_filters.conf
>> > > From: /test/i
>> > > From: /SugarBug/
>> > > From: /Marco Moock/
>> > > From: /Kyonshi/
>> > > From: /Retro Guy/
>> > > From: /yamo/
>> > >
>> > > Then I ran the cron job a few times, and the messages from these users still show up in the spool:
>> > >
>> > > https://rocksolid.sybershock.com/rocksolid/thread.php?group=rocksolid.nodes.help
>> > >
>> > > However the line:
>> > >
>> > > From: /test/i
>> > >
>> > > did seem to be filter the messages, as shown here:
>> > >
>> > > https://rocksolid.sybershock.com/random/thread.php?group=alt.test
>> > >
>> > > This did filter out test messages with 'test' as a substring in the From: header. But it is not working with all the others tested in the same runs.
>> > >
>> > > What am I missing?
>> >
>> > Ok, I think I see the issue. As I mentioned, I don't use this so I don't
>> > notice these things.
>> >
>> > Each header should be one line in header_filters.conf:
>> > From: /test5|test6|test7|test8|test9/
>> >
>> > Only one line per header.
>> >
>> > In the code:
>> > $from_filter = get_config_value('header_filters.conf', 'From');
>> > if (preg_match($from_filter, $from[1])) {
>> >
>> > So, the one line for From: is checked as one big regex.
>>
>> So, I should list all the substrings on one single line prefixed with that header name?
>>
>> I'll test that and get back in touch.
> Confirmed. It appears that the filters do work when on a single line for each header as you have shown above.
Great! I'm glad it works :)
> Question: is there a line concatenation charcter that PHP recognizes, in the way that bash recognizes '\' at line ending?
I'm pretty sure you can continue on another line. Not sure if it will cause an issue in the middle of a regex though. The regex would probably see a space as a space, but maybe a cr/lf is ok?
I don't tend to do this, but I believe you can. Give it a try :)
--
Retro Guy
1 |