Actually I write Perl programs since many years, but I am not so familiar with the object oriented programming and I can not discover the secrets of Spamassassin. Contretely: I was not able to access the body of a mail.
I included Plugin\Test.pm into my configuration and gave it a score of 0.1. This worked, each mail got this score. In the sub with the line "hard work goes here..." (how true!!!) there are the scalars $self and $permsgstatus. I added some code which saves $self into a file. The result was a hash reference. I tried keys() and found the key "main". Sounds promising, doesn't it? But the result was another hash reference. It's keys didn't look like the message body. I gave it up. I looked into some other plugins and ended with this code: my ($self, $permsgstatus) = @_; my $array = $permsgstatus->get_decoded_stripped_body_text_array(); my $text = join (' ', @$array); But $text contains only "I need to make this message body somewhat long so TextCat preloads I need to make this message body somewhat long so TextCat preloads ......"