example.com is a domain in my server. While testing using telnet, I can see example.com is open for relay and anyone can send mail from example.com without any authentication. How can we stop this?
Please see following test I have done.
Please see following test I have done.
Code:
# telnet mail.example.com 25
Trying 10.10.10.10 ...
Connected to mail.example.com.
Escape character is '^]'.
220-mailserver.example.com ESMTP Exim 4.92 #2 Sat, 28 Sep 2019 06:46:11 -0400
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.
HELO any.name.com
250 mailserver.example.com Hello any.name.com [1.2.3.4]
MAIL From: <[email protected]>
250 OK
RCPT to: <[email protected]>
250 Accepted
DATA
354 Enter message, ending with "." on a line by itself
From: <[email protected]>
To: <[email protected]>
Subject: hello
.
250 OK id=1iEAFE-0002EJ-J2
QUIT
221 mailserver.example.com closing connection
Connection closed by foreign host.