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

Fundamentals

Setting up VOIP lab

This week I’ve started setting up a VOIP lab to explore the technology and when I’m done, I plan to integrate it into my home network.

2009.06.13 · 1 min
Switching

Network Duct Tape Gone Wrong

As many of you may know, I’m in the middle of a huge network redesign, last week our new firewalls finally arrived and it became time for us to start migrating services onto the …

2011.09.01 · 4 min
Fundamentals

JunOS Olive Demonstration

As a follow up to my JunOS Olive tutorial, I made a demonstration video that shows Multicast functioning via OSPF to another Olive and an ImageStream VM.

2009.10.04 · 1 min