SMC Milter - Installation and Setup

From Tau Projects
Revision as of 03:03, 7 June 2015 by Admin (Talk | contribs)

Jump to: navigation,
SMC Milter Logo

SMC Milter Configuration

Please type smc-milter -h in SMC Milter programs directory to see all of configuration options.

Basic Installation

The simplest way to compile this package is:

  1. In a terminal, 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.

Configuring Sendmail

In a terminal, cd to the Sendmail's configuration files directory. Usually /etc/mail. Then, 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

Type make in Sendmail's configuration files directory to compile the new sendmail.cf

Configuring postfix

At first, cd to the Sendmail's configuration files directory. Usually /etc/postfix. Then, add following lines to the main.cf file (customize for your needs):

smtpd_milters = unix:private/smc-milter.sock
milter_protocol = 4
milter_mail_macros = {auth_type} {mail_addr}
milter_rcpt_macros = {rcpt_addr}
milter_default_action = accept

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.

Starting SMC-milter

Type smc-milter to run SMC Milter in background or you can type smc-milter -f to run SMC Milter in foreground.

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.

Copying and using SMC Milter

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 3 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, see http://www.gnu.org/licenses/.