I don’t want let spammers take control of my mail server, I have configured my mail server but I am not sure how do I test my mail server for open relay? But what is an open mail realy?
An open mail relay occurs when a mail server processes a mail message where neither the sender nor the recipient is a local user. In this example, both the sender and the recipient are outside the local domain (or rather, the local IP range, for the technically inclined). The mail server is an entirely unrelated third party to this transaction. The message really has no business passing through this server.
I can check my server for open relay using any one of the following methods.
The old way (open relay server test)
Telnet to mail.myserver.com at port 25 and issue all the following commands:
mail from: email@example.com
rcpt to: firstname.lastname@example.org
$ telnet mail.myserver.com 25Output:
Trying 202.51.x.xxx... Connected to mail.myserver.com. Escape character is '^]'. 220 mail.myserver.com ESMTP Postfix helo client.server.com 250 mail.myserver.com mail from: email@example.com 250 Ok rcpt to: firstname.lastname@example.org 554 : Relay access denied
As you see access denied to send email i.e. my mail server is NOT open relay.
The new way
Another and the best way is to use this website to test an open relay.
- ORDB FAQ
This is an old post created by LinuxTitli but it was deleted accidentally by me 🙁 I had restored the same from Google cache 🙂
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source & DevOps topics via:
|Category||List of Unix and Linux commands|
|Firewall||Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04|
|Network Utilities||dig • host • ip • nmap|
|OpenVPN||CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04|
|Package Manager||apk • apt|
|Processes Management||bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time|
|Searching||grep • whereis • which|
|User Information||groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w|
|WireGuard VPN||Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04|