Welcome to our Knowledge Base. Search or browse through the topics below to find answers to your questions.
Categories: SpamAssassin in a Box | Show all categories
The SpamAssassin used checks SPF records. The default settings for SPF can be found in 25_SPF.cf or the corresponding scores in 50_scores.cf under "C:\ProgramData\JAM Software\spamdService\sa-rules\updates_spamassassin_org".
If you are using the Exchange Server Toolbox or SmartPOP2Exchange the best way to set your own scores is to use the built-in editor for creating custom SpamAssassin config files which you can find under Spam Options.
For more information about the options, see:
https://cwiki.apache.org/confluence/display/SPAMASSASSIN/
Alternatively, you can manually create your own .cf file in which you define your "rules", this should only come last alphabetically, since SpamAssassin will evaluate the cf files in numerical-alphabetical order. (For example XMySettings.cf).
Please note that you should add the SPF records to your MX record.
URIBL (https://www.uribl.com) is a DNS-based Blackhole List which tracks IP addresses which are commonly used for sending spam mails. URIBL is enabled by default for SpamAssassin installations but allows only a certain amount of requests from the same IP every day. If this amount is exceeded, any further requests will be blocked by the URIBL servers with the info notification above.
This typically happens for SpamAssassin installations that use public DNS resolvers such as Google. As any request that is forwarded via the Google servers has the same IP when it reaches the Blackhole list, all requests will share the same limit. For usage of an alternative DNS, please follow these instructions.
For the following domains it is currently useful to set up forwarding to ensure the full functionality of SpamAssassin:
Now determine the name server for each of the mentioned domains.
Open a command prompt and issue the following command (e.g. for "lists.dnswl.org"):
nslookup -querytype=ns list.dnswl.org.
Attention: Do not omit the dot at the end of the domain, otherwise nslookup will append your local domain and the command will not work.
Example output:
list.dnswl.org nameserver = b.ns.dnswl.org
list.dnswl.org name server = c.ns.dnswl.org
b.ns.dnswl.org internet address = 74.208.14.82
c.ns.dnswl.org internet address = 173.255.241.134
c.ns.dnswl.org AAAA IPv6 address = 2600:3c01::21:1000
If you are using an enterprise firewall, you can also make these settings there. The function can be found in the 'DNS' section and is called 'DNS Request Routing' or 'DNS Redirection' or similar.
Please see the manual, section "Components and Plugins".
This happens if SpamAssassin finds rules with a score of zero. Tests with such a score a generally used in third party rule sets.
They check for a specific spam or ham sign but do not actually assign a score to leave it to the SpamAssassin admin if they want to use it or not to optimize their spam detection.
The message can be avoided by assigning a score to the related test or by removing the channel which belongs the particular rule from the sa-update call.
To assign a score, open 'local.cf' in the configuration directory (<%SACONFIGPATH%>) and add the line following line:
The path to rules and/or config dir is invalid. Make sure you run the executable (spamd.exe, spamassassin.exe, ...) from their main directory instead of specifying an absolute path to run.
Most likely SpamAssassin is not able to find a valid rule set. Please run sa-update.bat to download the latest rules.
Please see the official Wiki:
https://cwiki.apache.org/confluence/display/SPAMASSASSIN/
and the official documentation:
To add your own SpamAssassin rules, please create a plain text file that has the file extension .cf and place it into the configuration directory "C:\ProgramData\JAM Software\spamdService\sa-config". You can now add your own rules using the following syntax:
header JAM_ERECTION Subject =~ /e.?r.?e.?c.?t.?[i1|l!].?[o0].?n/i
describe JAM_ERECTION Subject contains "erection"
score JAM_ERECTION 1.0
This will create a rule which catches various spellings of the word "erection" in the subject of a mail. For more information on writing custom rules, please refer to the following topic in the official SpamAssassin Wiki: https://cwiki.apache.org/confluence/display/SPAMASSASSIN/WritingRules
Alternatively you can also define your rules in the "user_prefs" configuration file which is located in the user profile directory. For a regular user this is the following directory:
%userprofile%\.spamassassin
When executing SpamAssassin using the Windows system service account (which is the default when using SpamAssassin in a Box for example) the file will typically be located at the following directory:
"C:\Windows\System32\config\systemprofile\.spamassassin"
When using the SpamAssassin daemon (spamd.exe) for spam filtering, testing rules in the "user_prefs" file has the advantage that its contents are read for each mail and not only at the start of the process. This way you won't have to stop and start the SpamAssassin daemon each time you want to check if a certain change to your custom rule has the desired effect. If the rule is working as intended you can still copy it to a .cf file in the configuration directory (<%SACONFIGPATH%>). This is a good practice as a huge "user_prefs" file would decrease performance of the SpamAssassin daemon.
The SpamAssassin Bayes filter can be trained either using the sa-learn.exe or the spamc.exe. The main difference on a Windows system is that sa-learn will run under the currents user credentials while spamc will pass the mails that shall be trained to spamd (the SpamAssassin Daemon) which then trains the mail under the user credentials of spamd. This is especially important if you run SpamD for spam filtering under a separate user account, e.g. the Windows system user account (which is the default when using SpamAssassin in a Box for example). In this case you have to use spamc for training, as using sa-learn would just train the Bayes database for the local user.
For manual training we provide a batch script which can be used to train messages in a specific folder either as spam or ham. Besides the directory where the messages that shall be learned reside, the script requires you to decide whether the messages shall be learned as spam or ham. Please note that messages must be conform to the RFC822 format in order to make the Bayes filter work properly. For converting an Outlook message into a RFC822 conform message there are several tools available. The script tries learning using spamc first - if that fails because there is no local spamd instance available, it will "fallback" to sa-learn (assuming that learning shall be done using the local user account). To use the batch script, please follow these steps:
1. Open a command line prompt (run > cmd.exe).
2. Change directory (cd) to the installation directory of SpamAssassin in a Box .
3. Execute command: trainbayes.bat
4. Follow the instructions of the batch script.
If you want to set the folder path once without having to enter it every time you can add the line
if not defined FOLDER set "Folder=Your_path_goes_here"
below the line
set /P FOLDER=
in the trainbayes.bat.
In general, you need one license per installation. Therefore you only need one license if you administer multiple domains with a single installation.