Greetings,

smtpd.conf filter question:

I want to check inbound SMTP connections
to verify that the HELO/EHLO name matches
the associated rDNS entry.

I failed and ask for guidance.
I looked at the mail archives and found
some discussion, but it did not apply.


MY FILTER
filter "HELO_FQDN" phase ehlo match !helo rdns disconnect "NNN:msg."

REPORTED ERROR
doas smtpd -n
/etc/mail/smtpd.conf:191: syntax error

IDEA ORIGINATION (smtpd.conf man page, as follows)
match
 [!] helo helo-name | <helo-name>
  Specify that session's HELO/EHLO should match the string \
     or list table helo-name.

ALSO TRIED
filter "HELO_FQDN" phase ehlo match !helo {rdns} disconnect "NNN:msg."
filter "HELO_FQDN" phase ehlo match !helo fcrdns disconnect "NNN:msg."
filter "HELO_FQDN" phase ehlo match !helo {fcrdns} disconnect "NNN:msg."
with identical errors to that above.

SAMPLE OF MAIL I AM ATTEMPTING TO BLOCK
A line from the header of an unwanted message received via OpenSMTPd:
Received: from fet.org (v133-18-214-25.vir.kagoya.net [133.18.214.25])
I think 'fet.org' is the HELO name
133.18.214.25 is the IP address of the connecting SMTP process.
v133-18-214-25.vir.kagoya.net <http://v133-18-214-25.vir.kagoya.net/> is the 
rDNS

'fet.org' does not match 'v133-18-214-25.vir.kagoya.net'
I would like to reject/disconnect such delivery attempts.

SUMMARY
smtpd has the rDNS name associated with the calling SMTP session;
how to use that name in a filter?

Thank you for your consideration,
Marty Cawthon

Reply via email to