rcpt_regexp - check recipients against a list of regular expressions
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 Qpsmtpd::Constants. Matching is always done case insenstive.
The config file rcpt_regexp contains lines with a perl RE, including the "/"s, a return code and a comment, which will be returned to the sender, if the code is not OK or DECLINED. Example:
# rcpt_regexp - config for rcpt_regexp plugin email@example.com OK Accepting mail /^user\d+\@doma\.in$/ OK Accepting mail firstname.lastname@example.org DENY User not found. /^unused\@.*/ DENY User not found. /^.*$/ DECLINED Fall through to next rcpt plugin
rcpt_regexp config file should be writeable by trusted users only: the regexes are compiled with eval().
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.