Helping with BTS Spam

You've noticed that there's spam in the BTS, and you'd like to help. Here are some things that you can do!

Spamassassin Rules

The BTS uses ?SpamAssassin to identify spam. You can propose new rules to our spamassassin configuration by submitting a merge request on salsa from the spamassassin_config repository.

[This spamassassin configuration is also shared with]

Reporting Spam in the BTS

If you notice bugs which have spam, you can report them by clicking the "report bug contains spam" link at the bottom.

This creates a list of bugs which is occasionally manually reviewed to increase the accuracy of our spam filters.

Using debbugs-spam

If you're part of the debbugs group, you can use debbugs-spam to help clear out spam in the BTS.

First, start a spamd that you can use to work with:

sudo -u debbugs -H /usr/sbin/spamd --socketpath=/home/debbugs/spamd_socket \
    --nouser-config --cf='include /home/debbugs/.spamassassin/user_prefs' \
    --cf='allow_user_rules 1' --cf='report_safe 0' --allow-tell

Then use debbugs-spam to do operations. You can

score a bug:

sudo -u debbugs -H debbugs-spam --spamc-opts '-U' --spamc-opts '/home/debbugs/spamd_socket' score 12345


learn from a bug

sudo -u debbugs -H debbugs-spam --spamc-opts '-U' --spamc-opts '/home/debbugs/spamd_socket' learn 12345

mark spam/ham matching a regex

find . -type f -iname '*.log' -mtime -10| \
perl -pe 's{.+?(\d+)\.log$}{$1}'|\
xargs sudo -u debbugs debbugs-spam \
--spamc-opts '-U' --spamc-opts '/home/debbugs/spamd_socket' \