> On Dec 14, 2017, at 5:00 AM, Hadmut Danisch <had...@danisch.de> wrote: > > Sure, PCRE are possible, but I tend to avoid them, since RE are > expensive, and changing needs (afaik) a full reload of postfix, while a > mod to a database file is easier (although I agree that a RE might still > be faster than a database file lookup).
Note that each smtpd(8) process loads a fresh copy of RE tables on startup. If you reduce max_idle to say 5s, and assume that connection re-use is not a major factor, then the tables are typically much less than 500s stale. That should be good enough for most cases, and not require a reload. You can also add an empty indexed table for some restriction class that's never used, but causes smtpd(8) to restart at the end of an SMTP session if the table has been updated. main.cf: indexed = ${default_database_type}:${config_directory}/ smtpd_restriction_classes = ... restart restart = check_client_access ${indexed}restart restart: # Empty table, touch the "compiled" hash,btree,cdb or lmdb # database file to expedite restart of smtpd(8) processes. -- Viktor.