Showing posts with label SMTP. Show all posts
Showing posts with label SMTP. Show all posts

Thursday, June 6, 2013

SMTP MTA Performance Tool

JMeter

 

Telnet 
 date '+%a, %d %b %Y %H:%M:%S %z'
 Thu, 06 Jun 2013 12:21:18 -0700  
 
[user@host]# telnet smtp.domain.com 25
Trying 192.168.0.1...
Connected to smtp.domain.com (192.168.0.1).
Escape character is '^]'.
220 myrelay.domain.com ESMTP
HELO smtp.domain.com
250 myrelay.domain.com
MAIL FROM:<alice@hacker.com>
250 sender <alice@hacker.com> ok
RCPT TO:<bob@secure.net>
250 recipient <bob@secure.net> ok
DATA
354 go ahead
From: [Alice Hacker] <alice@hacker.com>
To: [Bob Smith] <bob@secure.net>
Date: Mon, 12 Apr 2010 14:21:26 -0400
Subject: Test Message

Hi there!
This is supposed to be a real email...

Have a good day!
Alice


.
250 ok:  Message 222220902 accepted
QUIT
221 myrelay.domain.com
Connection closed by foreign host.
[user@host]#
 
 ---
  [admin@sec-emps62 ~]# cat m1.sh
 {
  sleep 2;
  echo 'helo test.com';
  sleep 2;
  echo 'MAIL FROM:<Test@test.com>';
  sleep 2;
  echo 'RCPT TO: <kyle@test_dest.com>';
  sleep 2;
  echo 'DATA';
  sleep 2;
  echo -e 'To:kyle@testdest.com\nMIME-Version: 1.0 (mime-construct 1.9)\nContent-Type: application/zip\nContent-Transfer-Encoding: base64\n\n';
  dd if=/dev/urandom bs=4 count=10 2>/dev/null | openssl base64;
  echo '.';
 } | telnet 172.16.233.51 25
 
Netcat
    /usr/bin/nc smtp.domain.com 25 < /tmp/message
 
EHLO tyo270.gate.nec.co.jp
MAIL From:<m-ozawa@cnt.nic.nec.co.jp> SIZE=300981
RCPT To:<m-ozawa@wx.cnt.nesic.jp.nec.com>
DATA
 
...
 
.
QUIT

 

Friday, May 24, 2013

SMTP Status 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<domain> Service ready

421<domain> Service not available, closing transmission channel
HELO

250Requested mail action okay, completed

500Syntax error, command unrecognised

501Syntax error in parameters or arguments

504Command parameter not implemented

521<domain> does not accept mail [rfc1846]

421<domain> Service not available, closing transmission channel
EHLO

250Requested mail action okay, completed

550Not implemented

500Syntax error, command unrecognised

501Syntax error in parameters or arguments

504Command parameter not implemented

421<domain> Service not available, closing transmission channel
MAIL

250Requested mail action okay, completed

552Requested mail action aborted: exceeded storage allocation

451Requested action aborted: local error in processing

452Requested action not taken: insufficient system storage

500Syntax error, command unrecognised

501Syntax error in parameters or arguments

421<domain> Service not available, closing transmission channel
RCPT

250Requested mail action okay, completed

251User not local; will forward to <forward-path>

550Requested action not taken: mailbox unavailable

551User not local; please try <forward-path>

552Requested mail action aborted: exceeded storage allocation

553Requested action not taken: mailbox name not allowed

450Requested mail action not taken: mailbox unavailable

451Requested action aborted: local error in processing

452Requested action not taken: insufficient system storage

500Syntax error, command unrecognised

501Syntax error in parameters or arguments

503Bad sequence of commands

521<domain> does not accept mail [rfc1846]

421<domain> Service not available, closing transmission channel
DATA

354Start mail input; end with <CRLF>.<CRLF>

451Requested action aborted: local error in processing

554Transaction failed

500Syntax error, command unrecognised

501Syntax error in parameters or arguments

503Bad sequence of commands

421<domain> Service not available, closing transmission channel
received data

250Requested mail action okay, completed

552Requested mail action aborted: exceeded storage allocation

554Transaction failed

451Requested action aborted: local error in processing

452Requested action not taken: insufficient system storage
RSET

200(nonstandard success response, see rfc876)

250Requested mail action okay, completed

500Syntax error, command unrecognised

501Syntax error in parameters or arguments

504Command parameter not implemented

421<domain> Service not available, closing transmission channel
SEND

250Requested mail action okay, completed

552Requested mail action aborted: exceeded storage allocation

451Requested action aborted: local error in processing

452Requested action not taken: insufficient system storage

500Syntax error, command unrecognised

501Syntax error in parameters or arguments

502Command not implemented

421<domain> Service not available, closing transmission channel
SOML

250Requested mail action okay, completed

552Requested mail action aborted: exceeded storage allocation

451Requested action aborted: local error in processing

452Requested action not taken: insufficient system storage

500Syntax error, command unrecognised

501Syntax error in parameters or arguments

502Command not implemented

421<domain> Service not available, closing transmission channel
SAML

250Requested mail action okay, completed

552Requested mail action aborted: exceeded storage allocation

451Requested action aborted: local error in processing

452Requested action not taken: insufficient system storage

500Syntax error, command unrecognised

501Syntax error in parameters or arguments

502Command not implemented

421<domain> Service not available, closing transmission channel
VRFY

250Requested mail action okay, completed

251User not local; will forward to <forward-path>

550Requested action not taken: mailbox unavailable

551User not local; please try <forward-path>

553Requested action not taken: mailbox name not allowed

500Syntax error, command unrecognised

501Syntax error in parameters or arguments

502Command not implemented

504Command parameter not implemented

421<domain> Service not available, closing transmission channel
EXPN

250Requested mail action okay, completed

550Requested action not taken: mailbox unavailable

500Syntax error, command unrecognised

501Syntax error in parameters or arguments

502Command not implemented

504Command parameter not implemented

421<domain> Service not available, closing transmission channel
HELP

211System status, or system help reply

214Help message

500Syntax error, command unrecognised

501Syntax error in parameters or arguments

502Command not implemented

504Command parameter not implemented

421<domain> Service not available, closing transmission channel
NOOP

200(nonstandard success response, see rfc876)

250Requested mail action okay, completed

500Syntax error, command unrecognised

421<domain> Service not available, closing transmission channel
QUIT

221<domain> Service closing transmission channel

500Syntax error, command unrecognised
TURN

250Requested mail action okay, completed

502Command not implemented

500Syntax error, command unrecognised

503Bad sequence of commands