Hi, I seem to have resolved the issue but time will tell.
Using my AOL account as a test, I amended the filter line in smtpd.conf so it read “550 Connection dropped.” *I didn’t put the SMTP error code in before. After doing so, it seems to have resolved the issue.* Here’s the command I used for debugging: smtpd -dv -T all >smtpd.log 2>&1 After sending a couple test mails, I saw this entry in the ’smtpd.log’: lookup: match "sonic304-56.consmr.mail.bf2.yahoo.com" as REGEX in table static:rejecthost -> true 013352e3bbdd5118 filters protocol phase=ehlo, resume=n, action=disconnect, filter=hostrejects, query=sonic304-56.consmr.mail.bf2.yahoo.com, response=550 Connection dropped. I used the same regular expression syntax as shown below ie. ^.*.yahoo.com$ Cool! Pete. > On 19 Jul 2023, at 20:18, Pete Long <p...@valar.uk.net> wrote: > > Hi all, > > Need some help here. > > I would like to find a way to drop connections (with an arbitrary message) > without having to wait for the connecting clients to issue anything at all. > > Here’s my configuration line in /etc/mail/smtpd.conf in OpenBSD 7.3 running > OpenSMTPD 7.0.0: > > filter hostrejects phase ehlo match helo regex <rejecthost> disconnect > "Connection dropped.” > > > The filter ‘works’ in the sense that I get “421 Internal Server Error” when > something matches my regex table. > > > Here’s the format of one line in my <rejecthost> table: > > ^.*.prod-infinitum.com.mx$ > > > Have I screwed up the regex, the config line or both? > > Please let me know if you require further information. > > Thanks for your time. > > > > Pete. > >