RE: Welcome/unwelcome list not working correctly.

2023-07-20 Thread Marc

:) If I have to convert my old blacklists, is the blacklist than now a welcome 
list or a unwelcome list?


Re: Welcome/unwelcome list not working correctly.

2023-07-20 Thread Henrik K via users
On Thu, Jul 20, 2023 at 04:14:05PM -0700, Grant Keller wrote:
> Could be me doing something wrong, but I can't get Welcome/unwelcome
> lists to work the way I expect them to. We are running Spamassassin
> 4.0.0 on Centos 7.9 and have the user configs stored via mysql. Custom
> scores, Welcomelist, Blocklist, all seem to be working correctly. But if
> I have the following config entries:
> 
> | gvk  | unwhitelist_from| grant.kel...@sonic.com   | 7421538 |
> | gvk  | whitelist_from  | grant.kel...@sonic.com   | 7526210 |
> 
> Still, a message from that address to the gvk user results in the
> following rules being hit:
> 
> tests=ALL_TRUSTED,SCC_BODY_SINGLE_WORD,SONIC_BX_A2,SONIC_FRIEND,SPF_HELO_NONE,
> T_SCC_BODY_TEXT_LINE,USER_IN_WELCOMELIST
> 
> 
> I'm out of ideas to try on my side. Is there a way to have spamassasin
> or spamc print the config, or perhaps debugging I can enable to try to
> track down this problem?

This is the default query:

select username, value from userpref
where username = _USERNAME_ or username = '@GLOBAL'
order by username asc;

As you see the only sort is done with username and otherwise MySQL makes
_no_ guarantees about returned order.  If whitelist_from is returned last,
it works exactly the same as a physical .cf file would have it last.  Why do
you have an obviously redundant whitelist_from in the table messing up
things?



Re: Welcome/unwelcome list not working correctly.

2023-07-20 Thread John Hardin

On Thu, 20 Jul 2023, Grant Keller wrote:


I have the following config entries:

| gvk  | unwhitelist_from| grant.kel...@sonic.com   | 7421538 |
| gvk  | whitelist_from  | grant.kel...@sonic.com   | 7526210 |

Still, a message from that address to the gvk user results in the
following rules being hit:

tests=ALL_TRUSTED,SCC_BODY_SINGLE_WORD,SONIC_BX_A2,SONIC_FRIEND,SPF_HELO_NONE,
T_SCC_BODY_TEXT_LINE,USER_IN_WELCOMELIST


Wild guess: it's processing them in order by the 4th column, so the 
whitelist_from is the last seen and is the one whose effects remain.


Column headers would aid analysis.

Can you swap the numbers in the 4th column and see if that changes the 
behavior?



--
 John Hardin KA7OHZhttp://www.impsec.org/~jhardin/
 jhar...@impsec.org pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
---
  Back in 1969 the technology to fake a Moon landing didn't exist,
  but the technology to actually land there did.
  Today, it is the opposite.   -- unknown
---
 Today: the 54th anniversary of Apollo 11 landing on the Moon


Re: Welcome/unwelcome list not working correctly.

2023-07-20 Thread Greg Troxel
Grant Keller  writes:

> | gvk  | unwhitelist_from| grant.kel...@sonic.com   | 7421538 |
> | gvk  | whitelist_from  | grant.kel...@sonic.com   | 7526210 |

What do you think that means?  What's the fourth column?

Note that we are in transition from white to welcome, but that shouldn't
matter.

> Still, a message from that address to the gvk user results in the
> following rules being hit:
>
> tests=ALL_TRUSTED,SCC_BODY_SINGLE_WORD,SONIC_BX_A2,SONIC_FRIEND,SPF_HELO_NONE,
> T_SCC_BODY_TEXT_LINE,USER_IN_WELCOMELIST

the welcomelist is hitting.


> I'm out of ideas to try on my side. Is there a way to have spamassasin
> or spamc print the config, or perhaps debugging I can enable to try to
> track down this problem?

std () 
{ 
spamassassin -t -D < $1 > /tmp/STDOUT 2> /tmp/STDERR
}

not quite what you asked, but better than where you are now.


Welcome/unwelcome list not working correctly.

2023-07-20 Thread Grant Keller
Could be me doing something wrong, but I can't get Welcome/unwelcome
lists to work the way I expect them to. We are running Spamassassin
4.0.0 on Centos 7.9 and have the user configs stored via mysql. Custom
scores, Welcomelist, Blocklist, all seem to be working correctly. But if
I have the following config entries:

| gvk  | unwhitelist_from| grant.kel...@sonic.com   | 7421538 |
| gvk  | whitelist_from  | grant.kel...@sonic.com   | 7526210 |

Still, a message from that address to the gvk user results in the
following rules being hit:

tests=ALL_TRUSTED,SCC_BODY_SINGLE_WORD,SONIC_BX_A2,SONIC_FRIEND,SPF_HELO_NONE,
T_SCC_BODY_TEXT_LINE,USER_IN_WELCOMELIST


I'm out of ideas to try on my side. Is there a way to have spamassasin
or spamc print the config, or perhaps debugging I can enable to try to
track down this problem?