Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howto:spamd [2010/02/25 00:01] digitalmanhowto:spamd [2013/09/14 02:27] (current) – Fix typo (testing email notification) digitalman
Line 1: Line 1:
 ====== Use SpamAssassin with the Synchronet Mail Server ====== ====== Use SpamAssassin with the Synchronet Mail Server ======
-{{tag>antispam}} + 
-FIXME+The Synchronet [[:server:mail|SMTP Server]] may use a SpamAssassin server ([[http://spamassassin.apache.org/full/3.1.x/doc/spamd.html|spamd]]) to rate received messages and tag or even reject them based on the results.  
 + 
 +===== Installation ===== 
 + 
 +When installing SpamAssassin, make sure you enable the ''spamd'' (daemon). 
 + 
 +==== Windows ==== 
 + 
 +Apparently, [[http://wiki.apache.org/spamassassin/SpamdOnWindows|it is possible]] to run ''spamd'' on Windows, but *nix OSes are much preferred. 
 + 
 +==== Linux ==== 
 + 
 +On some Linux distributions, you may enable the SpamAssassin daemon (spamd) using ''chkconfig'' command: 
 + 
 +  chkconfig --add spamassassin 
 +  
 + 
 +On some Linux distributions, you may start/stop/query the SpamAssasin daemon (spamd) using the ''service'' command:  
 + 
 +  service spamassasin start 
 +  
 +Or by directly executing the init script: 
 + 
 +  /etc/init.d/spamassassin start 
 +  
 + 
 +Don't forget to create a daily cron job to update your SpamAssasin database: 
 + 
 +<file /etc/cron.daily/sa-update
 +sa-update && /etc/init.d/spamassassin restart 
 +</file> 
 + 
 +===== Configuration ===== 
 + 
 +Synchronet comes with a [[:module:spamc|JavaScript implementation]] of the SpamAssassin spamd client (''[[module:spamc]]''). 
 + 
 +To enable this client as a Synchronet //External Mail Processor//, edit your ''[[dir:ctrl]]/[[config:mailproc.ini]]'' file, adding or updating the following section: 
 +<file mailproc.ini> 
 +[SPAMC] 
 +Command=spamc.js 
 +AccessRequirements=user equal 0 or guest 
 +ProcessSpam=false 
 +ProcessDNSBL=false 
 +Disabled=false 
 +</file> 
 + 
 +The ''AccessRequirements'' key value above tells the Synchronet Mail Server not to execute this mail processor for unauthenticated clients (''user equal 0'') or for the //Guest// user account, if there is one. 
 + 
 +The ''ProcessSpam'' and ''ProcessDNSBL'' options tell the Synchronet Mail Server not to execute this mail processor if the message was received from a [[:config:spamblock.cfg|SPAM-blocked]] or [[:config:dns_blacklist.cfg|DNS-Blacklisted]] sender. 
 + 
 +Alternatively, you may specify ''To'' and/or ''From'' keys to limit the mail sender and/or recipients for which messages will be processed by SpamAssassin. 
 + 
 +==== Command Line ==== 
 + 
 +The Synchronet [[:module:spamc]] module supports some of the same command line options as the SpamAssassin ''spamc'' program and these may be included (with or without the dashes) in the ''Command'' key value included in the ''[SPAMC]'' section of your ''[[config:mailproc.ini]]'' file: 
 + 
 +^Option ^Usage          ^Description^ 
 +|d      |''-d //address//'' |Specify IP address of ''spamd'' host (default: ''127.0.0.1'')| 
 +|p      |''-p //port//''    |Specify the TCP port number of the ''spamd'' server (default: 783)| 
 +|u      |''-u //username//''|Specify the user-id that ''spamd'' should run as| 
 +|s      |''-s //bytes//''   |Specify the maximum message size (in bytes) that ''spamc'' will attempt to process (default: 500000)| 
 + 
 +In addition, the Synchronet [[:module:spamc]] supports the following command line options: 
 + 
 +^Option   ^Usage          ^Description^ 
 +|spamonly |''spamonly''   |Modify SPAM messages only (default: modify all messages)| 
 +|reject   |''reject //level//''|Reject SPAM messages over specified score threshold, modify and pass-through HAM| 
 +|debug    |''debug''      |Enable debug log output| 
 + 
 +=== Examples === 
 + 
 +Modify and pass-through all messages: 
 +  Command=spamc.js 
 + 
 +Modify SPAM messages only, pass-through all: 
 +  Command=spamc.js spamonly 
 + 
 +Reject SPAM messages, modify and pass-through HAM: 
 +  Command=spamc.js reject 
 + 
 +Reject SPAM messages over specified score threshold (8.0 in this example), modify and pass-through HAM: 
 +  Command=spamc.js reject 8.0 
 + 
 +Reject SPAM messages over specified score threshold (8.0 in this example), modify SPAM, and pass-through HAM and SPAM: 
 +  Command=spamc.js reject 8.0 spamonly 
 + 
 ===== See Also ===== ===== See Also =====
   * [[:server:mail|Mail Server]]    * [[:server:mail|Mail Server]] 
Line 7: Line 93:
   * [[:config:mailproc.ini]]   * [[:config:mailproc.ini]]
   * [[:howto:|HowTo index]]   * [[:howto:|HowTo index]]
 +
 +{{tag>antispam email spam}}