How to run the SpamAssassin (SpamD) process on a separate server from SecurityGateway
This article explains how to set up SecurityGateway to utilize a SpamAssassin process on another server on your network. You may wish to do this in order to free up more resources on your server if you have a large number of messages to process; or if you have more than one SecurityGateway server and want to use the same SpamAssassin settings, rules, and Bayesian database for all.
To run the SpamAssassin process on a separate server, follow these instructions:
- Copy the 'Program Files\Alt-N Technologies\SecurityGateway\SpamAssassin' folder and its content and subfolders from the original server to the new one. The path on the destination server does not have to match the old path.
- Create a batch file named 'run-spamd.cmd', with the following commands: cd x:\SpamAssassin sgspamd -C x:\SpamAssassin\default_rules --siteconfigpath=x:\SpamAssassin\rules -x -m5 -D -A 192.168.1.0/24 -i 192.168.1.1
- Replace the drive letter and paths in the batch file with the correct drive letter and paths in your environment
- The value for -A is the allowed IP address(es) that can connect to the SpamAssassin daemon. You can use a single IP host or CIDR notation as in the example above.
- The value for -i is the IP address for the server SGSpamD will be running on.
- Save and run the batch file, then configure SecurityGateway as below.
To configure SecurityGateway to use the remote SpamAssassin process, log into SecurityGateway. From the Dashboard:
- Click on Security in the lower-left corner
- Locate the Anti-Spam section
- Click on Heuristics and Bayesian
- On the right, under Location (All Domains), select the option 'Use a remote SpamAssassin daemon (SpamD)'
- In the Host Address box specify the address of the server where the remote process is located
- If you are using a port other than the default (783) enter it in the Port box
- Click on the Test button to verify that SecurityGateway can connect successfully to the remote SpamAssassin process
Note that these settings will affect the entire server, and cannot be configured for individual domains.
KBA-01895 Configuring spam-scoring and Bayesian-learning options in SecurityGateway