Quoting Henrik K via users (2023-07-20 21: 31:36)
> On Thu, Jul 20, 2023 at 04: 14:05PM -0700, Grant Keller wrote:
Date: Fri, 21 Jul 2023 17:06:06 -0700
Message-ID: <168998436665.2589812.12928834362200380...@gkeller.vdi.sonic.net>
User-Agent: alot/0.9

> > 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;
I don't think the query result order masters here, from what I could
gather in the spamassassin source, the  welcome list is built in 2
steps:
1. Create the list using the whitelist_from values.
2. Remove from that list everything in unwhitelist_from

> 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?
It isn't redundant, it is just the simplest case I could use for
troubleshooting. The original case I was having issues with was more
like this:
| gvk      | unwhitelist_from        | grant.kel...@sonic.com   | 7421538 |
| gvk      | whitelist_from          | *@sonic.com   | 7526210 |
Which had the same problem as the values for both being identical, I was
just trying to narrow down the issue.

Reply via email to