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
comments powered by Disqus

Related Posts

2017.08.16 Homelab & Misc 1 min read

PCAP PCAP PCAP – Changes to RJ Store

I made a couple changes to the RouterJockey store this week and I wanted to make sure I got the word out. Previously the store worked in sprints that I tried to open up 2-3x a year.

2010.06.01 Switching 4 min read

Introduction to Private VLANs

The concepts behind Private VLANs are in fact rather simple, but it is quite easy to get discombobulated in the details.