Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mail::milter::module::connectregex(3pm) [debian man page]

Mail::Milter::Module::ConnectRegex(3pm) 		User Contributed Perl Documentation		   Mail::Milter::Module::ConnectRegex(3pm)

NAME
Mail::Milter::Module::ConnectRegex - milter to accept/reject connecting hosts matching regex(es) SYNOPSIS
use Mail::Milter::Module::ConnectRegex; my $milter = new Mail::Milter::Module::ConnectRegex('^foo$'); my $milter2 = &ConnectRegex(qw{^foo$ ^bar$}); # convenience $milter2->set_message('Connections from %H disallowed'); DESCRIPTION
This milter module rejects any connecting host whose hostname or IP address matches user-supplied regular expressions. It can also func- tion as a whitelisting Chain element; see "accept_match()". METHODS
new(REGEX[, ...]) Accepts one or more regular expressions, as strings or qr// precompiled regexes. They are tested in sequence, and the first match ter- minates checking. Note that all IP address literals will be enclosed in [square brackets]; so to test an IP address rather than a hostname, ensure those brackets exist: ^[ADDRESS]$ accept_match(FLAG) If FLAG is 0 (the default), a matching regex will cause the connection to be rejected. If FLAG is 1, a matching regex will cause this module to return SMFIS_ACCEPT instead. This allows a "ConnectRegex" to be used inside a "Mail::Milter::Chain" container (in accept_break(1) mode), to function as a whitelist rather than a blacklist. This method returns a reference to the object itself, allowing this method call to be chained. set_message(MESSAGE) Sets the message used when rejecting connections. This string may contain the substring %H, which will be replaced by the matching hostname or IP address. This method returns a reference to the object itself, allowing this method call to be chained. BUGS
In Sendmail 8.11 and 8.12, a milter rejection at "connect" stage does not allow the reply message to be set -- it simply becomes "not accepting messages". However, this module still attempts to set the reply code and message in the hope that this will be fixed. AUTHOR
Todd Vierling, <tv@duh.org> <tv@pobox.com> SEE ALSO
Mail::Milter::Object perl v5.8.8 2004-02-26 Mail::Milter::Module::ConnectRegex(3pm)

Check Out this Related Man Page

Courier::Filter::Module::SpamAssassin(3pm)		User Contributed Perl Documentation		Courier::Filter::Module::SpamAssassin(3pm)

NAME
Courier::Filter::Module::SpamAssassin - SpamAssassin message filter module for the Courier::Filter framework SYNOPSIS
use Courier::Filter::Module::SpamAssassin; my $module = Courier::Filter::Module::SpamAssassin->new( prefs_file => '/etc/courier/filters/courier-filter-spamassassin.cf', sa_options => { # any Mail::SpamAssassin options }, logger => $logger, inverse => 0, trusting => 0, testing => 0, debugging => 0 ); my $filter = Courier::Filter->new( ... modules => [ $module ], ... ); DESCRIPTION
This class is a filter module class for use with Courier::Filter. It matches a message if its SpamAssassin spam score exceeds the configured threshold. Constructor The following constructor is provided: new(%options): returns Courier::Filter::Module::SpamAssassin Creates a new SpamAssassin filter module. %options is a list of key/value pairs representing any of the following options: prefs_file The path of a SpamAssassin preferences file. If this option is specified, its value is passed to the Mail::SpamAssassin constructor's "userprefs_filename" option . If undef, SpamAssassin is instructed not to read any preferences besides its default configuration files. Defaults to undef. sa_options A hash-ref specifying options for the Mail::SpamAssassin object used by this filter module. See "new" in Mail::SpamAssassin for the supported options. All options of the Courier::Filter::Module constructor are also supported. Please see "new" in Courier::Filter::Module for their descriptions. Instance methods See "Instance methods" in Courier::Filter::Module for a description of the provided instance methods. SEE ALSO
Courier::Filter::Module, Courier::Filter::Overview. For AVAILABILITY, SUPPORT, COPYRIGHT, and LICENSE information, see Courier::Filter::Overview. AUTHOR
Julian Mehnle <julian@mehnle.net> perl v5.14.2 2011-12-27 Courier::Filter::Module::SpamAssassin(3pm)
Man Page