How to integrate Bitdefender for Mail Servers with CommuniGate Pro

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:

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

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 ‘}’ that already exist in the file
(if you already a section named ExternalFilters, you only have to add also the Bitdefender filter without creating another ExternalFilters section):
            
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://:8010):
                                                                                                                                                
1. Go to Settings → General (you will be required to login);
                                                                                                                                                    
2. Go to the Helpers tab and look at Content Filtering

3. For the CommuniGate Pro version less than 5 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 Settings → Mail → Rules 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 value 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.


Rate this article:

Submit