On my postfix/courier debian 9 server I can send mails via telnet with the result
250 2.1.0 Ok
Now I try to block users from sending mails via telnet HELO comand using my own domain without authentification.
I added this in my postfix main.cf
:
smtpd_helo_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
check_helo_access hash:/etc/postfix/check_helo_access,
...
This is my file /etc/postfix/check_helo_access
:
/mydomain\.de$/ 550 Forged HELO/EHLO command
Now this kind of works, but when I try to send email via telnet it is blocked, but I get the error:
451 4.3.5 <mydomain.de>: Helo command rejected: Server configuration error
I also tried settin just this in /etc/postfix/check_helo_access
:
mydomain.de REJECT
resulting in the same errormessage. The same error, if I set the option in smtpd_recipient_restrictions
instead of smtpd_helo_restrictions
.
How do I configure this right, so I get a sound error message in telnet? Or is this the correct way and the error message is just misleading?