FBB::Milter(3bobcat)

Milter interface
(libbobcat-dev_6.04.00)

2005-2023

NAME

FBB::Milter - Interface to the sendmail mail filter facilities

SYNOPSIS

#include <bobcat/milter>
Linking option: -lmilter -lbobcat

DESCRIPTION

Milter defines an abtract base class interfacing to the sendmail mail filter (milter) facilities. It defines a C++ interface, based on the assumption that a single mail filter program does not implement multiple mail filters. The traditional sendmail C-based Milter API uses a (SMFICTX) pointer representing a mail connection, and a pointer to connection-specific `private' data, requiring the Milter constructor to perform quite a few administrative tasks. While acceptable in a C environment these administratve tasks distract from the main task: the Milter's mail filtering functionality. The FBB::Milter class hides these administrative tasks from the programmer, who is then able to concentrate on filtering mail. The main benefits of Milter are therefore

To activate a milter from the sendmail.mc configuration file, use, e.g., INPUT_MAIL_FILTER(`name', `S=socket'), where name is the milter's name, and socket is the name of the socket. See also the setConnection member below.

NAMESPACE

FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.

INHERITS FROM

-

ENUMERATIONS

The class defines four enumerations. One enumeration is used to indicate the callback-functions that need to be called, the second one renames the flags that can be passed to sendmail to indicate which actions the milter is allowed to perform. The third one defines status values that may be used to inform sendmail how to further process a message. The fourth one defines return values. The enumerations are:

enum CallBack
This enumeration holds the following values:

enum Flags
This enumeration holds the following values:

Status
This enumeration simplifies the extended SMFIS_ values used by the C API. These values may be used to return sfsistat values:

Return
This enumeration simplifies the extended MI_ values used by the C API. Most return values used by the Milter class, however, are bool values. The Return values are:

CONSTRUCTOR/DESTRUCTOR

Overloaded assignment operators are not available.

PUBLIC STATIC MEMBER FUNCTIONS

These functions form the heart of the Milter base-class. They can be called to initialize, start and stop the Milter.

PROTECTED MEMBER FUNCTIONS

The following members are non-virtual. They can be called by members of classes derived from Milter:

PRIVATE VIRTUAL MEMBER FUNCTIONS

The remaining functionality of the class Milter is useful only for Milter-implementations in classes derived from Milter. The following members can be overridden by derived classes. Note that clone must be overridden. Except for clone, all the members in this sections are callback functions. I.e., the MTA will call them to process parts of the mail message. Recipient-, message-, and connection-oriented callbacks are distinguished.

The recipient-oriented callback (recipient, see below) may affect the processing of a single message to a single recipient. Connection-oriented callbacks (connect, helo and close) affect the processing of the entire connection (during which multiple messages may be delivered to multiple sets of recipients). The remaining callbacks are message-oriented, affecting the processing of a single message to all its recipients.

EXAMPLE

To do

FILES

bobcat/milter - defines the class interface

SEE ALSO

bobcat(7), getpeername(2), listen(2),
http://www.milter.org (e.g., http://www.milter.org/developers/api)
http://sendmail.org/m4/readme.html
http://rfc.net/rfc821.html
http://rfc.net/rfc822.html
http://rfc.net/rfc1869.html
http://rfc.net/rfc1893.html
http://rfc.net/rfc2034.html
http://rfc.net/rfc2821.html
/usr/include/libmilter/mfapi.h

BUGS

-lmilter must be specified before -lbobcat.

BOBCAT PROJECT FILES

BOBCAT

Bobcat is an acronym of `Brokken's Own Base Classes And Templates'.

COPYRIGHT

This is free software, distributed under the terms of the GNU General Public License (GPL).

AUTHOR

Frank B. Brokken (f.b.brokken@rug.nl).