Andries filmer

Feel free with Open Source Software

Andries Filmer - Internet professional sinds 1996.
Ik ben groot voorstander van Free- en Opensource Software (FOSS) en laat deze site jouw overtuigen waarom dit goed is.
Home Over deze website Kennisbank Ezelsoren Freelancer Online gereedschap

Mailservers debug with SWAKS - SMTP reply codes

Index
  1. Testing SMTP servers with SWAKS
  2. Traditional mail debug
    1. Debug smtp
    2. Debug pop3
    3. Debug imap
  3. SMTP reply codes
  4. Comments

Testing SMTP servers with SWAKS

Swaks is a SMTP transaction tester

 sudo apt-get install swaks

Simple test

 swaks -t andries.filmer@gmail.com -f andries@filmer.nl -a -tls -au andries@filmer.nl -ap "mypasswd" -s mail.filmer.nl

Traditional mail debug

> client input
< server response

Debug smtp

 telnet localhost 25
 
 < 220 smtp.example.com ESMTP Sendmail 8.9.2/8.9.2/Debian/GNU; Sat, 9 Jun 2001 12:27:28 +0100 (BST)
 > HELO user123.example.com
 < 250 smtp.example.com Hello user123.example.com [10.0.0.100], pleased to meet you
 > MAIL FROM: user123@example.com
 < 250 user123@example.com Sender ok
 > RCPT TO: test@example.com
 < 250 test@example.com Recipient ok
 > DATA
 < 354 Enter mail, end with "." on a line by itself
 > Hello
 >.

With auth login, first base64 string

 perl -e 'use MIME::Base64; print encode_base64("andries\@gnoom.nl");'

output: YW5kcmllc0Bnbm9vbS5ubA==

Second base64 string

 perl -e 'use MIME::Base64; print encode_base64("test");'

output: dGVzdA==

 telnet localhost 25
 
 < Connected to mail.filmer.nl.
 < Escape character is '^]'.
 < 220 mail.filmer.nl ESMTP
 > auth login
 < 334 VXNlcm5hbWU6
 > YW5kcmllc0Bnbm9vbS5ubA==
 < 334 UGFzc3dvcmQ6
 > dGVzdA==
 < 235 ok, go ahead (#2.0.0)
 > MAIL FROM: user123@example.com
 < 250 user123@example.com Sender ok
 > RCPT TO: test@example.com
 < 250 test@example.com Recipient ok
 > DATA
 < 354 Enter mail, end with "." on a line by itself
 > Hello
 >.

To a qmail server. With auth login

 telnet localhost 25
 
 < Connected to mail.filmer.nl.
 < Escape character is '^]'.
 < 220 mail.filmer.nl ESMTP
 > auth login
 < 334 VXNlcm5hbWU6
 > YW5kcmllc0BtYWRyaWQubmV0ZXhwby5ubA==
 < 334 UGFzc3dvcmQ6
 > a2lraTEzMTM=
 < 235 ok, go ahead (#2.0.0)
 > MAIL FROM: user123@example.com
 < 250 user123@example.com Sender ok
 > RCPT TO: test@example.com
 < 250 test@example.com Recipient ok
 > DATA
 < 354 Enter mail, end with "." on a line by itself
 > Hello
 >.
 >quit

Without auth login

 telnet localhost 25
 
 < Trying 62.250.10.138...
 < Connected to mars.soctek.nl.
 < Escape character is '^]'.
 < 220 mars.soctek.nl ESMTP
 > helo andries@filmer.nl
 < 250 mars.soctek.nl
 > mail
 < 250 ok 
 > rcpt to:andries@test.soctek.nl
 < 250 ok
 > data
 < 354 go ahead
 >
 > This is a test
 > .
 > quit

Debug pop3

> client input
< server response

 telnet localhost 110
 
 < Trying 127.0.0.1...
 < Connected to localhost.localdomain.
 < Escape character is '^]'.
 < +OK Hello there.
 > user user@example.com
 < +OK Password required.
 > pass [password]
 < +OK logged in.
 > quit
 < +OK Bye-bye.
 < Connection closed by foreign host.

Debug imap

> client input < server response

 telnet localhost 143
  
 < Trying 127.0.0.1...
 < Connected to localhost.localdomain.
 < Escape character is '^]'.
 < * OK Courier-IMAP ready. Copyright 1998-2001 Double Precision, Inc. See COPYING for distribution information.
 > a001 login user@example.com [password]
 < a001 OK LOGIN Ok.
 > a001 logout
 < * BYE Courier-IMAP server shutting down
 < a001 OK LOGOUT completed
 < Connection closed by foreign host.

SMTP reply codes

See rfc2821 for the basic specification of SMTP; see also rfc1123 for important additional information. See rfc1893 and rfc2034 for information about enhanced status codes

 Check the RFC index for further mail-related RFCs.
 Reply codes in numerical order Code 	Meaning
 200 	(nonstandard success response, see rfc876)
 211 	System status, or system help reply
 214 	Help message
 220 	<domain> Service ready
 221 	<domain> Service closing transmission channel
 250 	Requested mail action okay, completed
 251 	User not local; will forward to <forward-path>
 354 	Start mail input; end with <CRLF>.<CRLF>
 421 	<domain> Service not available, closing transmission channel
 450 	Requested mail action not taken: mailbox unavailable
 451 	Requested action aborted: local error in processing
 452 	Requested action not taken: insufficient system storage
 500 	Syntax error, command unrecognised
 501 	Syntax error in parameters or arguments
 502 	Command not implemented
 503 	Bad sequence of commands
 504 	Command parameter not implemented
 521 	<domain> does not accept mail (see rfc1846)
 530 	Access denied (???a Sendmailism)
 550 	Requested action not taken: mailbox unavailable
 551 	User not local; please try <forward-path>
 552 	Requested mail action aborted: exceeded storage allocation
 553 	Requested action not taken: mailbox name not allowed
 554 	Transaction failed

Reply codes grouped by command Command Code Description

 connect
	220	 Service ready
	421	 Service not available, closing transmission channel
 HELO
	250	Requested mail action okay, completed
	500	Syntax error, command unrecognised
	501	Syntax error in parameters or arguments
	504	Command parameter not implemented
	521	 does not accept mail [rfc1846]
	421	 Service not available, closing transmission channel
 EHLO
	250	Requested mail action okay, completed
	550	Not implemented
	500	Syntax error, command unrecognised
	501	Syntax error in parameters or arguments
	504	Command parameter not implemented
	421	 Service not available, closing transmission channel
 MAIL
	250	Requested mail action okay, completed
	552	Requested mail action aborted: exceeded storage allocation
	451	Requested action aborted: local error in processing
	452	Requested action not taken: insufficient system storage
	500	Syntax error, command unrecognised
	501	Syntax error in parameters or arguments
	421	 Service not available, closing transmission channel
 RCPT
	250	Requested mail action okay, completed
	251	User not local; will forward to 
	550	Requested action not taken: mailbox unavailable
	551	User not local; please try 
	552	Requested mail action aborted: exceeded storage allocation
	553	Requested action not taken: mailbox name not allowed
	450	Requested mail action not taken: mailbox unavailable
	451	Requested action aborted: local error in processing
	452	Requested action not taken: insufficient system storage
	500	Syntax error, command unrecognised
	501	Syntax error in parameters or arguments
	503	Bad sequence of commands
	521	 does not accept mail [rfc1846]
	421	 Service not available, closing transmission channel
 DATA
	354	Start mail input; end with .
	451	Requested action aborted: local error in processing
	554	Transaction failed
	500	Syntax error, command unrecognised
	501	Syntax error in parameters or arguments
	503	Bad sequence of commands
	421	 Service not available, closing transmission channel
 received data
	250	Requested mail action okay, completed
	552	Requested mail action aborted: exceeded storage allocation
	554	Transaction failed
	451	Requested action aborted: local error in processing
	452	Requested action not taken: insufficient system storage
 RSET
	200	(nonstandard success response, see rfc876)
	250	Requested mail action okay, completed
	500	Syntax error, command unrecognised
	501	Syntax error in parameters or arguments
	504	Command parameter not implemented
	421	 Service not available, closing transmission channel
 SEND
	250	Requested mail action okay, completed
	552	Requested mail action aborted: exceeded storage allocation
	451	Requested action aborted: local error in processing
	452	Requested action not taken: insufficient system storage
	500	Syntax error, command unrecognised
	501	Syntax error in parameters or arguments
	502	Command not implemented
	421	 Service not available, closing transmission channel
 SOML
	250	Requested mail action okay, completed
	552	Requested mail action aborted: exceeded storage allocation
	451	Requested action aborted: local error in processing
	452	Requested action not taken: insufficient system storage
	500	Syntax error, command unrecognised
	501	Syntax error in parameters or arguments
	502	Command not implemented
	421	 Service not available, closing transmission channel
 SAML
	250	Requested mail action okay, completed
	552	Requested mail action aborted: exceeded storage allocation
	451	Requested action aborted: local error in processing
	452	Requested action not taken: insufficient system storage
	500	Syntax error, command unrecognised
	501	Syntax error in parameters or arguments
	502	Command not implemented
	421	 Service not available, closing transmission channel
 VRFY
	250	Requested mail action okay, completed
	251	User not local; will forward to 
	550	Requested action not taken: mailbox unavailable
	551	User not local; please try 
	553	Requested action not taken: mailbox name not allowed
	500	Syntax error, command unrecognised
	501	Syntax error in parameters or arguments
	502	Command not implemented
	504	Command parameter not implemented
	421	 Service not available, closing transmission channel
 EXPN
	250	Requested mail action okay, completed
	550	Requested action not taken: mailbox unavailable
	500	Syntax error, command unrecognised
	501	Syntax error in parameters or arguments
	502	Command not implemented
	504	Command parameter not implemented
	421	 Service not available, closing transmission channel
 HELP
	211	System status, or system help reply
	214	Help message
	500	Syntax error, command unrecognised
	501	Syntax error in parameters or arguments
	502	Command not implemented
	504	Command parameter not implemented
	421	 Service not available, closing transmission channel
 NOOP
	200	(nonstandard success response, see rfc876)
	250	Requested mail action okay, completed
	500	Syntax error, command unrecognised
	421	 Service not available, closing transmission channel
 QUIT
	221	 Service closing transmission channel
	500	Syntax error, command unrecognised
 TURN
	250	Requested mail action okay, completed
	502	Command not implemented
	500	Syntax error, command unrecognised
	503	Bad sequence of commands

This page is created on 2009-11-24 and updated on 2011-03-24

I appreciate if you give some comment about this page. Please go ahead.
Your e-mailaddress will not be published it is only to contact you (if needed).

 
Your name
Your e-mailaddress
To prefent robots to use this form I ask you kindly to type the next characters in the input field.
 

 


Mijn Curriculum vitae | De content op deze website heeft de Creativecommons 3.0 licentie | © 2011
Andries Filmer | http://andries.filmer.nl | andries@filmer.nl | © 2011
Deze website wordt gerealiseerd met Free- en Open Source Software: | | | | | |