logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

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

Database Format

       [XXX: TBD]

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.

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.

Name

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

Pod Errors

       Hey! Theabovedocumenthadsomecodingerrors,whichareexplainedbelow:

       Around line 90:
           You can't have =items (as at line 102) unless the first thing after the =over is an =item

perl v5.36.0                                       2023-01-22                Mail::Milter::Module::AccessDB(3pm)

See Also

       Mail::Milter::Object

Synopsis

           use Mail::Milter::Module::AccessDB;

           my $milter = new Mail::Milter::Module::AccessDB(\%hashref);

           my $milter2 = &AccessDB(\%hashref); # convenience

See Also