Error: Helo name contains a ip address (HELO was 123.123.123.123) and not is valid / Access denied - Invalid HELO name

Post Reply
User avatar
isscbta
Posts: 39
Joined: Mon Jul 19, 2021 1:41 am

If you see those errors in the email client:
Helo name contains a ip address (HELO was 123.123.123.123) and not is valid
or
Access denied - Invalid HELO name (See RFC2821 4.1.3)

In order to fix this, in your SSH, as root, run:

Code: Select all

mcedit /etc/exim4/exim4.conf.template
Here you should see this code block and insert those red lines:
acl_check_mail:
deny condition = ${if eq{$sender_helo_name}{}}
message = HELO required before MAIL

drop message = Helo name contains a ip address (HELO was $sender_helo_name) and not is valid
condition = ${if match{$sender_helo_name}{\N((\d{1,3}[.-]\d{1,3}[.-]\d{1,3}[.-]\d{1,3})|([0-9a-f]{8})|([0-9A-F]{8}))\N}{yes}{no}}
condition = ${if match{${lc:$sender_host_name}}{.telenor.rs}{false}{true}}
condition = ${if match{${lc:$authenticated_id}}{domain.com}{false}{true}}
condition = ${if match {${lookup dnsdb{>: defer_never,ptr=$sender_host_address}}\}{$sender_helo_name}{no}{yes}}
delay = 45s

drop condition = ${if isip{$sender_helo_name}}
condition = ${if match{${lc:$authenticated_id}}{domain.com}{false}{true}}
message = Access denied - Invalid HELO name (See RFC2821 4.1.3)
Instead of the domain.com, insert your domain

At the end, run:

Code: Select all

systemctl restart exim4

Tags:
Post Reply