SMC Anti-Spam Filter Code
Blocks spam without blocking any legitimate messages
Brought to you by:
xald
# -*- mode: rst -*- ============================================================================= SMC anti-spam e-mail filter ============================================================================= SMC anti-spam e-mail milter (plug-in) is an software application designed to significantly reduce the amount of SPAM/UCE (junk-mail) you receive. SMC uses a greylisting like technique to stops the junk-mail and a set of dynamic auto "whitelists" for unknown, but legitimate senders. Table of contents: ================== 1. SMC algorithms 2. SMC configuration 3. Basic installation 4. Configuring sendmail 5. Configuring postfix 6. Starting SMC-milter 7. Warnings 8. Copying 9. Trademarks 1. SMC algorithms ================= NOTE: Please see the both of COPYING section below and the file COPYING in this directory for full copyright information. SMC uses a Greylisting technique for blocking undesirable mail and a set of powerful algorithms of automatic "white lists" for definition of legal mail which will be delivered without any delays. * Greylisting algorithm based on statistical check of delivery delays, generated by a [tempfail] return code, that allows to exclude a direct receiving of a mail, which not passed through the standard mail server. NOTE: Using this feature the delivery of the mail from unknown, but legitimate senders will be delayed for a count of 5-minutes checks, which setted by the "maxcount" configuration parameter. * AutoSPF algorithm simulates a dynamic whitelist and will always accept the messages from mail systems satisfying to following conditions: + Mail domain name (the host part of the sender's e-mail address) must have an MX records; + Mail domain name and the connection host address must be resolved; + Connection host must be listed at the one of nameservers which hold the sender's mail domain name. For more information, visit the AutoSPF homepage: http://www.autospf.org/ * SPF (Sender Policy Framework) algorithm basically used as a next dynamic whitelist. SPF is an extension to the Simple Mail Transfer Protocol (SMTP). SPF allows software to identify and reject forged addresses in the SMTP MAIL FROM (Return-Path), a typical nuisance in e-mail spam. SPF is defined in RFC 4408. For more information, visit the SPF homepage: http://www.openspf.org/ * AutoSWL (Auto Sender White List) algorithm is very simple. The sender of a "mail contact" (sender-recipient pair) means as authenticated (whitelisted) if the filters statistics module has registered the both of a sended forward (request) and a received backward (reply) messages of this contact. The messages from the such authenticated senders will never be delayed by the previous greylisting algorithm. 2. SMC configuration ==================== Please type "smc-milter -h" in SMC programs directory to see all of configuration options. 3. Basic installation ===================== The simplest way to compile this package is: 1) "cd" to the directory containing the package's source code and type "./configure" to configure the package for your system. 2) Type "make" in the directory containing the package's source code to compile the package. 3) Type "make install" to place a program files into the defined location. 4) You can remove the program binaries and object files from the source code directory by typing "make clean". 5) Configure Filter by editing the smc-milter.conf file. 6) You can specify in smc-milter.users file the trusted recipients, which mail must be accepted without any checks. 7) You can indicate in smc-milter.hosts file the IP addresses or networks, from which the mail must be received without any checks. 4. Configuring sendmail ======================= 1) "cd" to the Sendmail's configuration files directory. Usually /etc/mail. 2) Add following lines to the sendmail.mc file: define(`confMILTER_MACROS_ENVFROM', `{auth_type}, {mail_addr}')dnl define(`confMILTER_MACROS_ENVRCPT', `{rcpt_addr}')dnl INPUT_MAIL_FILTER(`SMC-milter', \ `S=local:/var/lib/smc-milter/smc-milter.sock, \ F=T, T=C:30m;S:10m;R:10m;E:30m')dnl 3) Type "make" in Sendmail's configuration files directory to compile the new sendmail.cf 5. Configuring postfix ====================== 1) "cd" to the Sendmail's configuration files directory. Usually /etc/postfix. 2) Add following lines to the main.cf file (customize for your needs): smtpd_milters = unix:/var/lib/smc-milter/smc-milter.sock milter_protocol = 4 milter_mail_macros = {auth_type} {mail_addr} milter_rcpt_macros = {rcpt_addr} milter_default_action = accept 3) Restart your mail transfer agent (MTA) with new configuration. NOTE: The Postfix user 'postfix' needs access to the milter socket. For this purpose milter should be run under user 'postfix'. The first step in making this possible is to have both of the /var/run/smc-milter/ and /var/lib/smc-milter/ owned by the user and group 'postfix'. 6. Starting SMC-milter ====================== 1) Type "smc-milter" to run Filter in background or you can type "smc-milter -f" to run Filter in foreground. 2) Restart your Sendmail with new configuration. 7. Warning ========== THE AUTHOR DOES NOT ACCEPT ANY RESPONSIBILITY FOR MAIL REJECTED OR POSSIBLE LOSS OF BUSINESS THROUGH THE USE OF THIS SOFTWARE. PLEASE REVIEW BOTH THIS DOCUMENT AND THE SOURCE CODE. USE AT YOUR OWN RISK. 8. Copying ========== This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Please see the file COPYING in this directory for full copyright information. For more information, visit the SMC homepage: http://milter.sourceforge.net/ 9. Trademarks ============= Linux is a trademark of Linus Torvalds. Sendmail is a trademark of Sendmail, Inc. ============================================================================= END =============================================================================