Mailing List Archive

installing spamassassin plugins on debian
Is there a recommended way of installing a spamassassin plugin on
debian (or ubuntu) such that the plugin gets updated via say apt? I'm
guessing no because I don't see many spamassassin plugins when I do an
"apt search".

Up to now, I have been manually putting things in /etc/spamassassin/
but I feel like there has to be a better way to manage these.

What do people do to keep things up to date easily?
Re: installing spamassassin plugins on debian [ In reply to ]
On Fri, Mar 17, 2023 at 04:52:41AM -0400, Michael Grant via users wrote:
> Is there a recommended way of installing a spamassassin plugin on
> debian (or ubuntu) such that the plugin gets updated via say apt? I'm
> guessing no because I don't see many spamassassin plugins when I do an
> "apt search".
>
> Up to now, I have been manually putting things in /etc/spamassassin/
> but I feel like there has to be a better way to manage these.
>
> What do people do to keep things up to date easily?

There is no automated handling of third party plugins. It's up the
maintainers to provide or not provide any support. Which usually just means
monitoring some github repo etc.
Re: installing spamassassin plugins on debian [ In reply to ]
On Fri, Mar 17, 2023 at 11:26:21AM +0200, Henrik K wrote:
> On Fri, Mar 17, 2023 at 04:52:41AM -0400, Michael Grant via users wrote:
> > Is there a recommended way of installing a spamassassin plugin on
> > debian (or ubuntu) such that the plugin gets updated via say apt? I'm
> > guessing no because I don't see many spamassassin plugins when I do an
> > "apt search".
> >
> > Up to now, I have been manually putting things in /etc/spamassassin/
> > but I feel like there has to be a better way to manage these.
> >
> > What do people do to keep things up to date easily?
>
> There is no automated handling of third party plugins. It's up the
> maintainers to provide or not provide any support. Which usually just means
> monitoring some github repo etc.

What about CPAN? Do people use that? It seems like there's quite a
few modules in CPAN already. I will admit that if I see a debian
package, I go for that, I rarely if ever install stuff from CPAN but I
could be convinced to use it more if this created some order out of
the chaos.
Re: installing spamassassin plugins on debian [ In reply to ]
On Fri, Mar 17, 2023 at 05:34:37AM -0400, Michael Grant via users wrote:
> On Fri, Mar 17, 2023 at 11:26:21AM +0200, Henrik K wrote:
> > On Fri, Mar 17, 2023 at 04:52:41AM -0400, Michael Grant via users wrote:
> > > Is there a recommended way of installing a spamassassin plugin on
> > > debian (or ubuntu) such that the plugin gets updated via say apt? I'm
> > > guessing no because I don't see many spamassassin plugins when I do an
> > > "apt search".
> > >
> > > Up to now, I have been manually putting things in /etc/spamassassin/
> > > but I feel like there has to be a better way to manage these.
> > >
> > > What do people do to keep things up to date easily?
> >
> > There is no automated handling of third party plugins. It's up the
> > maintainers to provide or not provide any support. Which usually just means
> > monitoring some github repo etc.
>
> What about CPAN? Do people use that? It seems like there's quite a
> few modules in CPAN already. I will admit that if I see a debian
> package, I go for that, I rarely if ever install stuff from CPAN but I
> could be convinced to use it more if this created some order out of
> the chaos.

Again, it's up to the plugin developer to publish it in CPAN or not, some
can be found there. But it really isn't any different or more safe than
wgetting some Plugin.pm file manually from Github. It's not recommended to
automate either way, since you could just be downloading some incompatible
or worst case, a malicious file. Always audit and test updates manually.
Re: installing spamassassin plugins on debian [ In reply to ]
Michael Grant via users skrev den 2023-03-17 09:52:

> What do people do to keep things up to date easily?

i just use gentoo, or freebsd, not a precompiled problems (hehe)

but what plugin do you need with spamassassin 4 now ?

are you willing to apt maintain a custom plugin in debian ?, i see no
problem if you do this :)
Re: installing spamassassin plugins on debian [ In reply to ]
On Fri, Mar 17, 2023 at 04:03:03PM +0100, Benny Pedersen wrote:
> Michael Grant via users skrev den 2023-03-17 09:52:
>
> > What do people do to keep things up to date easily?
>
> i just use gentoo, or freebsd, not a precompiled problems (hehe)
>
> but what plugin do you need with spamassassin 4 now ?
>
> are you willing to apt maintain a custom plugin in debian ?, i see no
> problem if you do this :)

I want to try the ExtractText plugin.

What if I just install this from CPAN? It installs in
/usr/share/perl5/Mail/SpamAssassin/Plugin/ which looks correct.

It was also recommended to me maybe use cpan2deb and install that, but
then I'm maintaining my own private debian package which I really did
not want to do. What's wrong with just installing from CPAN in this case?
Re: installing spamassassin plugins on debian [ In reply to ]
On Fri, Mar 17, 2023 at 12:24:39PM -0400, Michael Grant via users wrote:
> On Fri, Mar 17, 2023 at 04:03:03PM +0100, Benny Pedersen wrote:
> > Michael Grant via users skrev den 2023-03-17 09:52:
> >
> > > What do people do to keep things up to date easily?
> >
> > i just use gentoo, or freebsd, not a precompiled problems (hehe)
> >
> > but what plugin do you need with spamassassin 4 now ?
> >
> > are you willing to apt maintain a custom plugin in debian ?, i see no
> > problem if you do this :)
>
> I want to try the ExtractText plugin.
>
> What if I just install this from CPAN? It installs in
> /usr/share/perl5/Mail/SpamAssassin/Plugin/ which looks correct.
>
> It was also recommended to me maybe use cpan2deb and install that, but
> then I'm maintaining my own private debian package which I really did
> not want to do. What's wrong with just installing from CPAN in this case?

https://metacpan.org/pod/Mail::SpamAssassin::Plugin::ExtractText

I guess you didn't notice that you are actually installing SpamAssassin
4.0.0, since that's what you are looking at from CPAN? It's part of the
official SA package starting from 4.0.0, not a standalone plugin.

With luck the plugin will work even on 3.4 without troubles, but uhh yeah..
Re: installing spamassassin plugins on debian [ In reply to ]
> I guess you didn't notice that you are actually installing SpamAssassin
> 4.0.0, since that's what you are looking at from CPAN? It's part of the
> official SA package starting from 4.0.0, not a standalone plugin.

Thank you! I did not notice that, now I see its there. I know why, I
have 2 boxes, one with the older 3.4 and a newer one with 4.0.0. So
that little problem is now a non-issue!
Re: installing spamassassin plugins on debian [ In reply to ]
>> Michael Grant via users skrev den 2023-03-17 09:52:
>> > What do people do to keep things up to date easily?

>On Fri, Mar 17, 2023 at 04:03:03PM +0100, Benny Pedersen wrote:
>> i just use gentoo, or freebsd, not a precompiled problems (hehe)
>>
>> but what plugin do you need with spamassassin 4 now ?
>>
>> are you willing to apt maintain a custom plugin in debian ?, i see no
>> problem if you do this :)

On 17.03.23 12:24, Michael Grant via users wrote:
>I want to try the ExtractText plugin.
>
>What if I just install this from CPAN? It installs in
>/usr/share/perl5/Mail/SpamAssassin/Plugin/ which looks correct.

use SA 4 which has ExtractText built in.

>It was also recommended to me maybe use cpan2deb and install that, but
>then I'm maintaining my own private debian package which I really did
>not want to do. What's wrong with just installing from CPAN in this case?

I recommend not to mix CPAN with anything package-based.


--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
2B|!2B, that's a question!
Re: installing spamassassin plugins on debian [ In reply to ]
Michael Grant via users skrev den 2023-03-17 17:24:

> I want to try the ExtractText plugin.

is in core spamassassin 4

> What if I just install this from CPAN? It installs in
> /usr/share/perl5/Mail/SpamAssassin/Plugin/ which looks correct.

dont install spamassassin core plugins from cpan unless you install all
spamassassin from cpan

> It was also recommended to me maybe use cpan2deb and install that, but
> then I'm maintaining my own private debian package which I really did
> not want to do. What's wrong with just installing from CPAN in this
> case?

you dont need this

maybe ask how to configure extracttext ?
Re: installing spamassassin plugins on debian [ In reply to ]
> you dont need this

I see, I stand corrected!

> maybe ask how to configure extracttext ?

Sure, I'd be happy to see some examples. The man page looks pretty
straight forward.

I see it depends on some external tools like tesseract and odt2txt so
I had better install those first.

I have not had good luck with tesseract out of the box, I wonder if
there's some options to tune it to make it work better. Is there
anything better?

To see how well this is working, I am hoping to be able to see the
output of these tools with -D so I can write some rules.

Similarly, is there a way to see the 'body' text that is fed into the
rules? I don't see that in the output of -D. By 'body', I mean the
text with the html cleaned out of it plus the subject line. I have a
message and I want to write a new body rule, I want to see what
spamassassin is using as the 'body' so I can write the regex. I don't
see the body text in -D.
Re: installing spamassassin plugins on debian [ In reply to ]
>> you dont need this
>
>I see, I stand corrected!
>
>> maybe ask how to configure extracttext ?

On 17.03.23 13:59, Michael Grant via users wrote:
>Sure, I'd be happy to see some examples. The man page looks pretty
>straight forward.

I use exactly what's in the docs and it seems to work.

I have added for debugging:

add_header all ExtractText-Chars _EXTRACTTEXTCHARS_
add_header all ExtractText-Words _EXTRACTTEXTWORDS_
add_header all ExtractText-Tools _EXTRACTTEXTTOOLS_
add_header all ExtractText-Types _EXTRACTTEXTTYPES_
add_header all ExtractText-Extensions _EXTRACTTEXTEXTENSIONS_
add_header all ExtractText-Flags _EXTRACTTEXTFLAGS_

(I use spamass-milter so these headers don't appear in the incoming mail,
only when I feet it to SA)

>I see it depends on some external tools like tesseract and odt2txt so
>I had better install those first.
>
>I have not had good luck with tesseract out of the box, I wonder if
>there's some options to tune it to make it work better. Is there
>anything better?

I have looked at gocr/ocrad/tesseract >15 years ago, at that time gocr seemed
to be the best alternative.
Since then, google started sponsoring tesseract and it seems to be the best.
you just need to install scripts and language files for it.

>To see how well this is working, I am hoping to be able to see the
>output of these tools with -D so I can write some rules.
>
>Similarly, is there a way to see the 'body' text that is fed into the
>rules? I don't see that in the output of -D. By 'body', I mean the
>text with the html cleaned out of it plus the subject line. I have a
>message and I want to write a new body rule, I want to see what
>spamassassin is using as the 'body' so I can write the regex. I don't
>see the body text in -D.

no idea here

--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I intend to live forever - so far so good.