Sentrion Overview Sentrion Platform Sentrion REAC Sentrion Mimecast Hard Appliances Virtual Appliances
Overview Policy Compliance Secure Content Filtering Cloud Partner Enterprise Community
Overview Download Security Support News Documentation Tips & Tricks DKIM FAQ Misc Milters
Overview Directory Synchronization Messaging Architecture Review High Volume Mail HIPAA Policy QUICKStart Implementation Performance Tuning Training Services Overview Message Routing and
Configuration
Message Policy
Management
Connection Control /
Attack Prevention
Directory Configuration
and Management
Overview Sendmail Partners Milter Community Industry Organizations System Integrators & Distributors
Overview Silver Support Gold Support Platinum Support Open Source Support Security Advisories Contact Support
Overview Customers Events Press Room Board & Investors Management Careers Contact Us
Overview Ask the Experts Security Chalk Talks Collateral Product Reviews & Awards IP Reputation Check Real-time Outbreak Monitor
Sendmail Inc.

HOME | CUSTOMER LOGIN
Follow Sendmail on Twitter
The Sendmail Blog
Sentrion Message Processors
Sentrion Application Store
Services
Partners
Support
Company
Resources
Open Source
 

Useful links

Table of Contents
home
Milter.Org

Further Reading

Milter API documentation (part of sendmail distribution)

App Spotlight

DLP Enabler Bundle

Adding New Mail Filters

Sendmail supports mail filters to filter incoming SMTP messages according to the "Sendmail Mail Filter API" documentation. These filters can be configured in your mc file using the two commands:

MAIL_FILTER(`name', `equates')
INPUT_MAIL_FILTER(`name', `equates')

The first command, MAIL_FILTER(), simply defines a filter with the given name and equates. For example:

MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R')

This creates the equivalent sendmail.cf entry:

Xarchive, S=local:/var/run/archivesock, F=R

The INPUT_MAIL_FILTER() command performs the same actions as MAIL_FILTER but also populates the m4 variable ` confINPUT_MAIL_FILTERS' with the name of the filter such that the filter will actually be called by sendmail.

For example, the two commands:

INPUT_MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R')
INPUT_MAIL_FILTER(`spamcheck', `S=inet:2525@localhost, F=T')

are equivalent to the three commands:  

MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R')
MAIL_FILTER(`spamcheck', `S=inet:2525@localhost, F=T')
define(`confINPUT_MAIL_FILTERS', `archive, spamcheck')

In general, INPUT_MAIL_FILTER() should be used unless you need to define more filters than you want to use for `confINPUT_MAIL_FILTERS'.

Note that setting `confINPUT_MAIL_FILTERS' after any INPUT_MAIL_FILTER() commands will clear the list created by the prior INPUT_MAIL_FILTER() commands.

Back to Table Of Contents cf/README for Sendmail 8.12.11 Eric Allman of the Sendmail Consortium Rev: 1.1.1.1, Updated 2006/10/11 Back to Top


Site Map | Privacy Policy | Terms & Conditions | Copyright © 1998-2013 Sendmail, Inc. All Rights Reserved.