Could you resend with proper line breaks. This is difficult to read.


Sorry, the line breaks got messed up.

I'm using OpenSTMPD 6.8 portable and want to filter on DNS names or HELO
strings with regular expressions. Therefore I created the following
minified config:

--------------------------------
$ cat /etc/opensmtpd/smptd.conf
table helotable db:/etc/opensmtpd/helotable.db
filter block_helo phase helo match helo regex <helotable> disconnect
"554 Not welcome"
listen on 0.0.0.0 filter { block_helo }

$ makemaup -U /etc/opensmtpd/helotable.db
myte.t <set>
--------------------------------

However the filter "block_helo" only matches when someone connects with
the verbatim string "HELO myte.t" (with a dot), which is of course not
how regex are supposed to work.
As soon as I replace the database entry with a regular text file (table
helotable file:/etc/opensmtpd/helotable.txt), the regex starts to work,
ie "HELO mytest" or "HELO mytett" are matched.
Question: How can I use regular expressions in db files? Text files
don't seem to be an option, because they are only read on startup so I
cannot update them on the fly.

Reply via email to