You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Skip Brott <sb...@dmp.com> on 2007/07/18 20:15:16 UTC

Really Stupid Question: Plugins

I haven't yet had to implement any pdf plugins, but I am looking to do so.
I am running SA 3.1.9 and perl 5.8.8.  From what I can see, my plugins are
here:

/usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/

And there is no related folder for 5.8.8

Is that the location where I want to install the plugin?

- Skip


Re: Really Stupid Question: Plugins

Posted by Michael Parker <pa...@pobox.com>.
Skip Brott wrote:
> I haven't yet had to implement any pdf plugins, but I am looking to do so.
> I am running SA 3.1.9 and perl 5.8.8.  From what I can see, my plugins are
> here:
> 
> /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/
> 
> And there is no related folder for 5.8.8
> 
> Is that the location where I want to install the plugin?
> 

I usually recommend that people place third party plugins into their
site or local rules directory (ie /etc/mail/spamassassin) and then
specify that path in the loadplugin line.

For instance, if you download MyPlugin.pm from the wiki, copy it to
/etc/mail/spamassassin.  Create a myplugin.pre file and put the following:

loadplugin MyPlugin /etc/mail/spamassassin/MyPlugin.pm


In the above config line the name of the plugin is actually the perl
package name, so if its Mail::SpamAssassin::Plugin::MyPlugin then the
config line will look like:

loadplugin Mail::SpamAssassin::Plugin::MyPlugin
/etc/mail/spamassassin/MyPlugin.pm

Mucking around with the site_perl lib directories by hand is asking for
trouble.

Michael

Re: Really Stupid Question: Plugins

Posted by Theo Van Dinter <fe...@apache.org>.
On Wed, Jul 18, 2007 at 01:15:16PM -0500, Skip Brott wrote:
> I haven't yet had to implement any pdf plugins, but I am looking to do so.
> I am running SA 3.1.9 and perl 5.8.8.  From what I can see, my plugins are
> here:
> 
> /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/
> 
> Is that the location where I want to install the plugin?

No, and you probably don't have your plugins directly there either.
The default plugins are in .../Mail/SpamAssassin/Plugins.  You could put
your own plugins there, but it's not a requirement.  It also, imo, makes
it annoying in certain situations.  Upgrading a plugin, for instance --
I can't remember that path, and I'm tired of having to look it up when
I need it.  YMMV.

I'd probably shove my own plugins in /etc/mail/spamassassin/plugins so that
they're in the same place as the configs I would edit to enable them.  Then
you just set the loadplugin line to aim at the path and you're done.  (see
perldoc Mail::SpamAssassin::Conf's loadplugin area to see what I mean.)

-- 
Randomly Selected Tagline:
"The weaknesses and the strengths of computer networking derive from the same
 feature: it is easy to send messages to anyone who has access to the
 network." - Donald A. Norman, The Trouble with Networks (Datamation 1/1982)