I have configured my custom plugin in /etc/spamassassin/local.cf: Code: loadplugin Mail::SpamAssassin::Plugin::DomainAge /etc/spamassassin/DomainAge.pm header DOMAIN_AGE eval:check_domain_age('FROM') describe DOMAIN_AGE Assign score based on domain age When I test it by running: cat 1735847536.M475893P26810.abraham,S=8525,W=8735:2, | spamassassin -D it works as intended but when spamd is started the plugin is loaded but never gets invoked when email is received. The other rules do get executed and the e-mail gets a spam score, only my custom plugin's rule is not executed. Am I supposed to do some config via the ispconfig database? The plugin simply adds additional score if the domain is too new.
Ok, so amavis doesn't even talk to spamd. Amavis calls spamassassin via library calls and therefore my file config does nothing. I see a bunch of sql queries just before amavis calls spamassassin and that is probably where amavis is loading the spamassassin config from the ispconfig database. I either need to somehow tell amavis to always load my plugin and setup the rule or I need to inject that config somewhere in the spamassassin config in the ispconfig db so that amavis can load it and configure spamassassin for me dynamically. Digging on...
In the end the rule started working. I might've been thrown off by spamassassin showing log entires when ran manually but under amavis I would get nothing in /var/log/mail.log