BitDefender and CommuniGate Pro howto

The BitDefender Security for Mail Servers product offers support for the CommuniGate Pro server, but in certain special cases the integration might not work entirely out of the box. The following article explains the additional steps that need to be followed in order to fully integrate BitDefender with CommuniGate.

First, when BitDefender is installed, the MTA with which you want to integrate with must be CommuniGate Pro. If such a product is already installed on the server, the BitDefender installer will automatically detect it and display it as default option for MTA integration.

If BitDefender is already installed and integrated with another MTA, for example Sendmail, you can change it by disabling the milter integration and activating the CommuniGate Pro one:

# ./bdsafe agent disable milter
# ./bdsafe agent enable cgate
# cd /opt/BitDefender/bin

The second step is to add some lines in the Mail.settings file of the CommuniGate Pro server, located in /var/CommuniGate/Settings.

Use your favorite editor to edit the Main.settings file (do not forget to make a backup of it first, in case something goes wrong). Add the following lines somewhere in the configuration file, between the first ‘{‘ and the last ‘}’:

ExternalFilters = (
    {
        Enabled = YES;
        LogLevel = 5;
        Name = BitDefender;
        ProgramName = "/opt/BitDefender/bin/bdcgated";
        RestartPause = 1m;
        Timeout = 2m;
    }
);

After this, modify the Rules.settings file (again, make a backup first) and add a rule for the BitDefender filter:

(
    5,
    BitDefender,
    (("Message Size", "greater than", 1)),
    ((ExternalFilter, BitDefender))
)

Another way and the recommended one to enable the BitDefender integration, is to use the CommuniGate management web interface (by default it listens on http://<your-host>:8010):

1. go to SettingsGeneral (you will be required to login);

2. go to the Helpers tab and look at Content Filtering, for the CommuniGate Pro version;

3. do the following actions:

3.1. check the Use Filter box;

3.2. enter BitDefender in the text box;

3.3. set the Log list to Problems;

3.4. set Timeout to 2 minutes

In the Program Path, enter /opt/BitDefender/bin/bdcgated. For CommuniGate Pro version 5 and above, the method is slightly different:

3.1. enable the filter using the drop-down combo box;

3.2. enter BitDefender in the corresponding text box;

3.3. set the Log Level to Problems;

3.4. set Timeout to 2 minutes;

3.5. in the Program Path text box, enter /opt/BitDefender/bin/bdcgated;

3.6. set Auto-Restart to 5 seconds;

3.7. press Update;

4. go to the SettingsMailRules tab;

5. enter BitDefender and press Create New or Add Rule, in version 5;

6. press the Edit button next to the BitDefender filter. Do the following:

6.1. look at the Data list and set it to Message Size;

6.2. set Operation to greater than;

6.3. set Parameter to 1;

6.4. look at the Action list and set it to External Filter;

6.5. enter BitDefender in the Parameters box;

6.6. press Update;

7. restart the BitDefender services;

8. restart the CommuniGate Pro server.

BitDefender will now start scanning your incoming messages.

With the latest update, BitDefender Security for Mail Servers can provide some additional information to CommuniGate Pro server, in order to mark spam messages and to deliver them in the designated folder (Junk), depending on the digital range bar score from the email headers. In order to enable this feature, do the following:

# cd /opt/BitDefender/bin
# ./bdsafe group configure mygroup antispam cgatecompat Y
# ./bdsafe reloadsettings

Change mygroup with the name of your group. If you have a default installation, mygroup is default (bdsafe group configure default antispam cgatecompat Y).

From this moment on, BitDefender will add a new header, which looks something like this: X-Junk-Score: 92 [XXXX]. The number of X-s is given by the value of the spam level, so the digital score bar range will look like this:

0  []
1-39  [X]
40-80  [XX]
81-90  [XXX]
91-95  [XXXX]
96-99  [XXXXX]
100  [XXXXXX]

If the email is not spam, the range is ‘0 []’, if the value increases, the range bar will do the same, ‘1-39 [X]’ and so on.

The administrator of the CommuniGate Pro server can set the actions for this kind of emails. From Settings->Users->Domains, the Junk Mail control can set the action for spam e-mails. For example, High probability->Store in junk, Medium probability->Mark as Junk, Low priority->Mark as junk.

If the user receives an e-mail that is marked as spam (X-Junk-Score: 100 [XXXXXX]), this mail will be moved in the Junk directory. Using this header, the administrator of the CommuniGate Pro server can filter the e-mails delivered to the users.

For more information, read the BitDefender user guide and this chapter on CommuniGate Server flags.

Comments are closed.