Brightmail AntiSpam (BMI) suppport

Support for Brightmail AntiSpam is Experimental

Brightmail AntiSpam is a commercial package. Please see http://www.brightmail.com for more information on the product. For the sake of clarity, we'll refer to it as "BMI" from now on.

BMI concept and implementation overview

In contrast to how spam-scanning with SpamAssassin is implemented in exiscan-acl, BMI is more suited for per -recipient scanning of messages. However, each message is scanned only once, but multiple "verdicts" for multiple recipients can be returned from the BMI server. The exiscan implementation passes the message to the BMI server just before accepting it. It then adds the retrieved verdicts to the messages header file in the spool. These verdicts can then be queried in routers, where operation is per-recipient instead of per-message. To use BMI, you need to take the following steps:

These steps are explained in more details below.

1. Adding support for BMI at compile time

  EXPERIMENTAL_BRIGHTMAIL=yes
  CFLAGS=-I/path/to/the/dir/with/the/includefile
  EXTRALIBS_EXIM=-L/path/to/the/dir/with/the/library -lbmiclient_single

2. Setting up BMI support in the Exim main configuration

  bmi_config_file = /opt/brightmail/etc/brightmail.cfg

3. Set up ACL control statement

  accept  domains       = +local_domains
          endpass
          verify        = recipient
          control       = bmi_run

  accept  domains       = +relay_to_domains
          endpass
          verify        = recipient
          control       = bmi_run

4. Setting up routers to use BMI verdicts

        # don't deliver messages handled by the BMI server
        bmi_blackhole:
          driver = redirect
          bmi_dont_deliver
          data = :blackhole:

      # special router for BMI rule #5, #8 and #11
      bmi_rule_redirect:
        driver = redirect
        bmi_rule = 5:8:11
        data = postmaster@mydomain.com

      localuser:
        driver = accept
        check_local_user
        headers_add = X-Brightmail-Verdict: $bmi_base64_verdict
        transport = local_delivery

      localuser:
        driver = accept
        check_local_user
        headers_add = X-Brightmail-Tracker: $bmi_base64_tracker_verdict
        transport = local_delivery

5. Using per-recipient opt-in information (Optional)

    user1@mydomain.com:   <OPTIN STRING1>:<OPTIN STRING2>
    user2@thatdomain.com: <OPTIN STRING3>

    accept  domains   = +relay_to_domains
            endpass
            verify    = recipient
            bmi_optin = ${lookup{$local_part@$domain}\
                        lsearch{/etc/exim/bmi_optin_data}}
            control   = bmi_run

EximWiki: BrightMail (last edited 2008-09-25 11:39:29 by localhost)