Skip to content

SpamAssassin

Using MailMum with SpamAssassin is pretty straightforward and the preferred way to get started. We recommend to setup MailMum in your SpamAssassin configuration to start with the monitoring mode. This allows you to see which mail systems contact your server. Start to make a picture of your traffic.

Step 1: Add MailMum as RBL to SpamAssassin Setup

SpamAssassin uses a plugin system for RBL checks. The setup is usually located in /etc/mail/spamassassin/local.cf file. You can add the following lines to the configuration file:

ifplugin Mail::SpamAssassin::Plugin::DNSEval
  header RCVD_IN_MAILMUM_RBL eval:check_rbl('in_mailmum_rbl', '<uuid>.mailmum.io')
  describe RCVD_IN_MAILMUM_RBL Sender listed in in.mailmum.io
endif

Replace <uuid> with your MailMum UUID. You can find your UUID in the MailMum Dashboard.

In the monitoring mode you can see the requests in the MailMum Dashboard. No IP addresses or domains get any scores or are blocked. This is the default mode to start with MailMum.

Step 2: Reload SpamAssassin

After adding the configuration, you need to reload SpamAssassin to apply the changes. This is done by running the following command:

sudo /etc/init.d/spamassassin reload

If you are using SystemV, you can use the following command:

sudo service spamassassin reload

If you are using systemd, you can use the following command:

sudo systemctl reload spamassassin

Step 3: Test the Setup

To test the configuration, you can send an email to your server from an email address using an external E-Mail Service like Google Mail or Outlook.com.

If the setup was successful, the email should be delivered to your mail servers by passing your mail filter (SpamAssassin) and you should see an entry in the MailMum Dashboard.

Note: If you don't have any block entries in the MailMum system, MailMum behaves like a monitoring system. It only logs the requests from your System and enhance them with additional information.

Step 4: Increase the Score for your MailMum RBL

If you got familiar with the monitoring mode and or already has some bad actors to be scored or being blocked, you can increase the score for the MailMum RBL in the SpamAssassin configuration. You can do this by adding the following:

ifplugin Mail::SpamAssassin::Plugin::DNSEval
  header RCVD_IN_MAILMUM_RBL eval:check_rbl('in_mailmum_rbl', '<uuid>.mailmum.io')
  describe RCVD_IN_MAILMUM_RBL Sender listed in in.mailmum.io
  score RCVD_IN_MAILMUM_RBL 3.0
endif

Note: The score is a floating point number. You can adjust the score to your needs. The higher the score, the more likely the mail will be blocked. We recommend starting with a score of 2.0 and increase it step by step according to the trust you get in your block listing skills. It is your responsibility to make sure you increase the score in a responsible way.