Automation & Tools

Mail Server Relay Testing

Tony Mattke · 2009.09.15 · 4 min read

As you may know, I am not big in the server world, even less into mail servers. They make me sick. But, today I found a nifty little tool you can use to test your mail server against many different types of relay attempts. Best of all, its dead simple. From your servers console, telnet to relay-test.mail-abuse.org. Here is the output from me testing the server I host my email and this site on.

text
tonhe@Benzaiten:~$ telnet relay-test.mail-abuse.org
Trying 168.61.4.13...
Connected to cygnus.mail-abuse.org.
Escape character is '^]'.
Connecting to 69.162.120.13 ...
<<< 220 Benzaiten.mattke.net ESMTP Postfix (Debian/GNU)
>>> HELO cygnus.mail-abuse.org
<<< 250 Benzaiten.mattke.net
:Relay test: #Quote test
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <"[email protected]">
<<< 554 5.7.1 <[email protected]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 1
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <[email protected]>
<<< 554 5.7.1 <[email protected]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 2
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <[email protected]>
<<< 554 5.7.1 <[email protected]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #test 3
>>> mail from: <spamtest@localhost>
<<< 250 2.1.0 Ok
>>> rcpt to: <[email protected]>
<<< 554 5.7.1 <[email protected]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 4
>>> mail from: <spamtest>
<<< 250 2.1.0 Ok
>>> rcpt to: <[email protected]>
<<< 554 5.7.1 <[email protected]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 5
>>> mail from: <>
<<< 250 2.1.0 Ok
>>> rcpt to: <[email protected]>
<<< 554 5.7.1 <[email protected]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 6
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <[email protected]>
<<< 554 5.7.1 <[email protected]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 7
>>> mail from: <spamtest@[69.162.120.13]>
<<< 250 2.1.0 Ok
>>> rcpt to: <[email protected]>
<<< 554 5.7.1 <[email protected]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 8
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <nobody%[email protected]>
<<< 554 5.7.1 <nobody%[email protected]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 9
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <nobody%mail-abuse.org@[69.162.120.13]>
<<< 554 5.7.1 <nobody%mail-abuse.org@[69.162.120.13]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 10
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <"[email protected]">
<<< 554 5.7.1 <[email protected]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 11
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <"nobody%mail-abuse.org">
<<< 554 5.7.1 <nobody%mail-abuse.org>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 12
>>> mail from: <spamtest@[69.162.120.13]>
<<< 250 2.1.0 Ok
>>> rcpt to: <[email protected]@benzaiten.mattke.net">
<<< 501 5.1.3 Bad recipient address syntax
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 13
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <"[email protected]"@[69.162.120.13]>
<<< 554 5.7.1 <[email protected]@[69.162.120.13]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 14
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <[email protected]@[69.162.120.13]>
<<< 554 5.7.1 <[email protected]@[69.162.120.13]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 15
>>> mail from: <spamtest@[69.162.120.13]>
<<< 250 2.1.0 Ok
>>> rcpt to: <@benzaiten.mattke.net:[email protected]>
<<< 554 5.7.1 <[email protected]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 16
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <@[69.162.120.13]:[email protected]>
<<< 554 5.7.1 <[email protected]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #Test 17
>>> mail from: <spamtest@[69.162.120.13]>
<<< 250 2.1.0 Ok
>>> rcpt to: <mail-abuse.org!nobody>
<<< 554 5.7.1 <mail-abuse.org!nobody>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #test 18
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <mail-abuse.org!nobody@[69.162.120.13]>
<<< 554 5.7.1 <mail-abuse.org!nobody@[69.162.120.13]>: Relay access denied
>>> rset
<<< 250 2.0.0 Ok
:Relay test: #test 19
>>> mail from: <[email protected]>
<<< 250 2.1.0 Ok
>>> rcpt to: <[email protected]>
<<< 554 5.7.1 <[email protected]>: Relay access denied
>>> rset
<<< 421 4.7.0 Benzaiten.mattke.net Error: too many errors
Connecting to 69.162.120.13 ...
<<< 220 Benzaiten.mattke.net ESMTP Postfix (Debian/GNU)
>>> HELO cygnus.mail-abuse.org
<<< 250 Benzaiten.mattke.net
>>> QUIT
<<< 221 2.0.0 Bye
Tested host banner: 220 Benzaiten.mattke.net ESMTP Postfix (Debian/GNU)
System appeared to reject relay attempts
Connection closed by foreign host.
More in Automation & Tools

Related Posts

Automation & Tools · 3 min read

Netcat – secret weapon

2010.04.19

Netcat or nc, is a forgotten tool in too many arsenals these days. It lays dormant waiting at the command line to make connections across the globe for you.

Automation & Tools · 9 min read

Networks Are Graphs. NetAI Acts Like It.

2026.05.19

Dr. Deepak Kakadia got about ninety seconds into his NFD40 talk before he said the thing nobody else on the AI Ops circuit is willing to say out loud. LLMs were invented to model human behavior.