How do I check in procmail whether at least two out of three spam filters see the mail as spam? I don't want to have duplicate code due to multiple checks on the spam headers.
# Invoke bogofilter
:0 fw
| bogofilter -C -d /home/shared_directories/bogofilter -p -e
# Invoke bmf
:0 fw
| bmf -d /home/shared_directories/bmf -f text -p
# Invoke spambayes
:0 fw
| sb_filter -d /home/shared_directories/spambayes
# If two out of three filters agree it's spam, file it.
:0
* ^X-Bogosity: Spam
* ^X-Spam-Status: Yes
* ^X-Spambayes-Classification: spam
{
# Process the mail
}