Changes

Jump to navigation Jump to search
1,882 bytes added ,  20:45, 13 April 2019
Created page with "<span id="_top">Qpsmtpd#Plugins</span> = NAME = rcpt_regexp - check recipients against a list of regular expressions = DESCRIPTION = '''rcpt_reg..."
<span id="_top">[[Qpsmtpd#Plugins]]</span>
= [[#___top|NAME]] =

rcpt_regexp - check recipients against a list of regular expressions

= [[#___top|DESCRIPTION]] =

'''rcpt_regexp''' reads a list of regular expressions, return codes and comments from the ''rcpt_regexp'' config file. If the regular expression does NOT match ''m#^(/.*/)$#'', it is used as a string which is compared with ''eq lc($rcpt)''. The recipient addresses are checked against this list, and if the first matches, the return code from that line and the comment are returned to qpsmtpd. Return code can be any valid plugin return code from [http://search.cpan.org/perldoc?Qpsmtpd%3A%3AConstants Qpsmtpd::Constants]. Matching is always done case insenstive.

= [[#___top|CONFIG FILE]] =

The config file ''rcpt_regexp'' contains lines with a perl RE, including the &quot;/&quot;s, a return code and a comment, which will be returned to the sender, if the code is not OK or DECLINED. Example:

<pre> # rcpt_regexp - config for rcpt_regexp plugin
me@myhost.org OK Accepting mail
/^user\d+\@doma\.in$/ OK Accepting mail
info@myhost.com DENY User not found.
/^unused\@.*/ DENY User not found.
/^.*$/ DECLINED Fall through to next rcpt plugin</pre>
= [[#___top|NOTE]] =

The <tt>rcpt_regexp</tt> config file should be writeable by trusted users only: the regexes are compiled with ''eval()''.

= [[#___top|COPYRIGHT AND LICENSE]] =

Copyright (c) 2005 Hanno Hecker

This plugin is licensed under the same terms as the qpsmtpd package itself. Please see the LICENSE file included with qpsmtpd for details.

<!-- Generated Sat Apr 13 15:45:03 EDT 2019 using
perldoc -T -ohtml $plugins/$1 \|pandoc -f html -t mediawiki \|sed '1 i\\n\n\n<span id="_top">[[Qpsmtpd#Plugins]]</span>' \|sed -e 's#</d.>##'
-->
----
[[Category:Qpsmtpd|rcpt_regexp]]

Navigation menu