Scroll to navigation

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

NAME

Mail::Milter::Module::AccessDB - emulator for Sendmail "access_db" in a milter

SYNOPSIS

    use Mail::Milter::Module::AccessDB;
    my $milter = new Mail::Milter::Module::AccessDB(\%hashref);
    my $milter2 = &AccessDB(\%hashref); # convenience

DESCRIPTION

Sendmail's "access_db" is a powerful access restriction database tool, but it is limited only to data explicitly available through the SMTP session. This milter module allows rewriting to take place (such as through Mail::Milter::Wrapper::DecodeSRS) before applying the access rules.

Not all access_db functionality is duplicated here; some is unimplemented, while some is Sendmail-internal only. See DATABASE FORMAT, below, for a list of supported tags and result codes in this module.

NOTE: As of this version, this module might not be thread-safe. A future version of this module will share the hashref between threads and lock it properly.

ESPECIALLY NOTE: This module is highly experimental, does not support all accessdb data types yet, and is not guaranteed to work at all. Feel free to try it out and to send comments to the author, but it is not yet recommended to use this module in a production setup.

DATABASE FORMAT

[XXX: TBD]

METHODS

new(HASHREF)

Create this milter using a provided hash reference. This may be a tied hash, such as to an already opened Sendmail-style database.

Currently there is no support for automatically reopening databases, hence this one-shot constructor. (Sendmail does not support automatic reopening either, for that matter.)

ignore_tempfail(FLAG)

If FLAG is 0 (the default), a DNS lookup which fails the underlying DNS query will cause the milter to return a temporary failure result (SMFIS_TEMPFAIL).

If FLAG is 1, a temporary DNS failure will be treated as if the lookup resulted in an empty record set (SMFIS_CONTINUE).

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 messages. This string may contain the substring %0, which will be replaced by the matching lookup key (not including type tag).

This method returns a reference to the object itself, allowing this method call to be chained.

AUTHOR

Todd Vierling, <tv@duh.org> <tv@pobox.com>

SEE ALSO

Mail::Milter::Object

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

You can't have =items (as at line 102) unless the first thing after the =over is an =item
2023-01-22 perl v5.36.0