Mailing List Archive

linter ignores ifplugin
Hello,

I'm wondering if the linter is supposed to respect the ifplugin statement.
I've disabled the Mail::SpamAssassin::Plugin::WLBLEval module and this
leads to a linter error:

# spamassassin --lint
Aug 7 11:51:22.314 [32423] warn: rules: error: unknown eval 'check_from_in_whitelist' for USER_IN_WELCOMELIST
Aug 7 11:51:22.390 [32423] warn: rules: error: unknown eval 'check_to_in_whitelist' for USER_IN_WELCOMELIST_TO

Matthias
Re: linter ignores ifplugin [ In reply to ]
On Fri, 7 Aug 2020, Matthias Rieber wrote:

> I'm wondering if the linter is supposed to respect the ifplugin statement.
> I've disabled the Mail::SpamAssassin::Plugin::WLBLEval module and this
> leads to a linter error:
>
> # spamassassin --lint
> Aug 7 11:51:22.314 [32423] warn: rules: error: unknown eval 'check_from_in_whitelist' for USER_IN_WELCOMELIST
> Aug 7 11:51:22.390 [32423] warn: rules: error: unknown eval 'check_to_in_whitelist' for USER_IN_WELCOMELIST_TO

It works that way in my rules commit test script, which disables a bunch
of plugins in sequence to check for errors like that.

Are you sure the plugin is really disabled?

--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
8 days until the 75th anniversary of the end of World War II
Re: linter ignores ifplugin [ In reply to ]
Hello John,

On Fri, 7 Aug 2020, John Hardin wrote:

> On Fri, 7 Aug 2020, Matthias Rieber wrote:
>
> > I'm wondering if the linter is supposed to respect the ifplugin statement.
> > I've disabled the Mail::SpamAssassin::Plugin::WLBLEval module and this
> > leads to a linter error:
> >
> > # spamassassin --lint
> > Aug 7 11:51:22.314 [32423] warn: rules: error: unknown eval
> > 'check_from_in_whitelist' for USER_IN_WELCOMELIST
> > Aug 7 11:51:22.390 [32423] warn: rules: error: unknown eval
> > 'check_to_in_whitelist' for USER_IN_WELCOMELIST_TO
>
> It works that way in my rules commit test script, which disables a bunch of
> plugins in sequence to check for errors like that.
>
> Are you sure the plugin is really disabled?

yes, I've disabled it by removing the loadplugin statement in the
configuration. It's possible to trigger this behaviour with a fresh
install on Debian Buster.

I opened a bugreport [1]

Matthias


[1] https://bz.apache.org/SpamAssassin/show_bug.cgi?id=7848
Re: linter ignores ifplugin [ In reply to ]
On Mon, 10 Aug 2020, Matthias Rieber wrote:

> Hello John,
>
> On Fri, 7 Aug 2020, John Hardin wrote:
>
>> On Fri, 7 Aug 2020, Matthias Rieber wrote:
>>
>>> I'm wondering if the linter is supposed to respect the ifplugin statement.
>>> I've disabled the Mail::SpamAssassin::Plugin::WLBLEval module and this
>>> leads to a linter error:
>>>
>>> # spamassassin --lint
>>> Aug 7 11:51:22.314 [32423] warn: rules: error: unknown eval
>>> 'check_from_in_whitelist' for USER_IN_WELCOMELIST
>>> Aug 7 11:51:22.390 [32423] warn: rules: error: unknown eval
>>> 'check_to_in_whitelist' for USER_IN_WELCOMELIST_TO
>>
>> It works that way in my rules commit test script, which disables a bunch of
>> plugins in sequence to check for errors like that.
>>
>> Are you sure the plugin is really disabled?
>
> yes, I've disabled it by removing the loadplugin statement in the
> configuration. It's possible to trigger this behaviour with a fresh
> install on Debian Buster.
>
> I opened a bugreport [1]

Yeah, I saw that. It's *possible* that I don't see the problem because I'm
running my sandbox lint tests against trunk, where the capabilities do all
exist.



--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Vista is at best mildly annoying and at worst makes you want to
rush to Redmond, Wash. and rip somebody's liver out. -- Forbes
-----------------------------------------------------------------------
5 days until the 75th anniversary of the end of World War II
Re: linter ignores ifplugin [ In reply to ]
> Yeah, I saw that. It's *possible* that I don't see the problem because
> I'm running my sandbox lint tests against trunk, where the
> capabilities do all exist.

I confirmed it occurs with 3.4.5 pre 1 and with 4.0 trunk and that it
does NOT stop sa-update or a lint check.

It's a noisy annoyance.  I'm guessing there is no stack or a break in
the stack for the linting.

Regards,

KAM

--
Kevin A. McGrail
KMcGrail@Apache.org

Member, Apache Software Foundation
Chair Emeritus Apache SpamAssassin Project
https://www.linkedin.com/in/kmcgrail - 703.798.0171
Re: linter ignores ifplugin [ In reply to ]
On Mon, 10 Aug 2020, Kevin A. McGrail wrote:

>> Yeah, I saw that. It's *possible* that I don't see the problem because
>> I'm running my sandbox lint tests against trunk, where the
>> capabilities do all exist.
>
> I confirmed it occurs with 3.4.5 pre 1 and with 4.0 trunk and that it
> does NOT stop sa-update or a lint check.

What the heck, then? I wonder why I'm not getting that error...


--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Are you a mildly tech-literate politico horrified by the level of
ignorance demonstrated by lawmakers gearing up to regulate online
technology they don't even begin to grasp? Cool. Now you have a
tiny glimpse into a day in the life of a gun owner. -- Sean Davis
-----------------------------------------------------------------------
5 days until the 75th anniversary of the end of World War II
Re: linter ignores ifplugin [ In reply to ]
Are you using an installed version of SA because the t for has some code
that enables certain plugins?

On Tue, Aug 11, 2020, 00:09 John Hardin <jhardin@impsec.org> wrote:

> On Mon, 10 Aug 2020, Kevin A. McGrail wrote:
>
> >> Yeah, I saw that. It's *possible* that I don't see the problem because
> >> I'm running my sandbox lint tests against trunk, where the
> >> capabilities do all exist.
> >
> > I confirmed it occurs with 3.4.5 pre 1 and with 4.0 trunk and that it
> > does NOT stop sa-update or a lint check.
>
> What the heck, then? I wonder why I'm not getting that error...
>
>
> --
> John Hardin KA7OHZ http://www.impsec.org/~jhardin/
> jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
> key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
> -----------------------------------------------------------------------
> Are you a mildly tech-literate politico horrified by the level of
> ignorance demonstrated by lawmakers gearing up to regulate online
> technology they don't even begin to grasp? Cool. Now you have a
> tiny glimpse into a day in the life of a gun owner. -- Sean Davis
> -----------------------------------------------------------------------
> 5 days until the 75th anniversary of the end of World War II
>
Re: linter ignores ifplugin [ In reply to ]
On Tue, 11 Aug 2020, Kevin A. McGrail wrote:

> Are you using an installed version of SA because the t for has some code
> that enables certain plugins?

No, this is from my SVN sandbox. That script doesn't run the t tests for
this, it changes a scratch .pre file and runs a regular "spamassassin
--lint" in a loop, oncxe for each plugin.

> On Tue, Aug 11, 2020, 00:09 John Hardin <jhardin@impsec.org> wrote:
>
>> On Mon, 10 Aug 2020, Kevin A. McGrail wrote:
>>
>>>> Yeah, I saw that. It's *possible* that I don't see the problem because
>>>> I'm running my sandbox lint tests against trunk, where the
>>>> capabilities do all exist.
>>>
>>> I confirmed it occurs with 3.4.5 pre 1 and with 4.0 trunk and that it
>>> does NOT stop sa-update or a lint check.
>>
>> What the heck, then? I wonder why I'm not getting that error...

--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
There is no doubt in my mind that millions of lives could have been
saved if the people were not "brainwashed" about gun ownership and
had been well armed. ... Gun haters always want to forget the Warsaw
Ghetto uprising, which is a perfect example of how a ragtag,
half-starved group of Jews took 10 handguns and made asses out of
the Nazis. -- Theodore Haas, Dachau survivor
-----------------------------------------------------------------------
4 days until the 75th anniversary of the end of World War II