I have been applying the following rule to mark as spam if the body contains any reference or coincidence with the following "earn free money":
`#if body :contains "earn free money" {
# fileinto "Junk";
# stop;
#}
#if anyof (
# header :matches "Subject" "earn free money",
# regex :matches ".*gana dinero*" "i" :content "text/plain"
#) {
# fileinto "Junk";
# stop;
#}
#if header :contains "Content-Type" "text/plain" {
# if allof (header :contains "Subject" "earn free money",
# anyof (header :matches "Content-Type" "*text/plain*",
# header :matches "Content-Type" "*text/html*"),
# anyof (body :contains "earn free money",
# body :matches ".*earn free money*"))
# {
# fileinto "Junk";
# stop;
# }
#}
Note: It is commenting the rules due to the errors it generates.
I run the rules:
sievec /etc/dovecot/sieve/spamfilter.sieve
And I get the following error:
sievec(root): Debug: Effective uid=0, gid=0, home=/root
spamfilter: line 35: error: unknown test 'body' (only reported once at first occurrence).
spamfilter: error: validation failed.
sievec(root): Fatal: failed to compile sieve script '/etc/dovecot/sieve/spamfilter.sieve'
I am using the Dovecot
2.3.13 version and apparently the body module
is no longer available and I also do the following sieve_extprograms
I have executed the following code to search for information matching what is required but it does not find anything, additionally I have already checked folder by folder and nothing neither:
sudo find / -name "libdovecot_body_plugin.so"
In the following path I found a file called "Pigeonhole.Sieve.Plugins.Extprograms.txt": dovecot-2.3.13\dovecot-2.3.13\doc\wiki
I leave the information here in case it is useful: https://jsfiddle.net/5wn2fray/
I have Dovecot installed and configured to use
SpamAssassin`
If it is no longer available, there is another alternative to be able to filter spam using information sent about the content/body of the mail received.