Tag: test
Using telnet to access pop3 (retrieve emails) and smtp (send emails)
by z3n on Jan.11, 2010, under Uncategorized
Problem:
How to test retrieve and send emails by raw telnet?
Solution:
Retrieving emails (bold lines are the commands, italics are outputs)
telnet mail.yourserver.com 110
Trying 1.2.3.4…
Connected to mail.yourserver.com.
Escape character is ‘^]’.
+OK Dovecot ready.
user your_email@yourserver.com
+OK
pass your_password
+OK Logged in.
list
+OK 1 messages:
1 1133
.
retr 1
message
.
quit
Sending emails:
telnet mail.youremailserver.com 25
Trying 1.2.3.4…
Connected to mail.youremailserver.com.
Escape character is ‘^]’.
220 youremailserver.com ESMTP Postfix
helo yourdomain.com
250 youremailserver.com
auth login
334 VXNlcm5hbWU6
eW91cmVtYWlsQHlvdXJkb21haW4uY29t (youremail@yourdomain.com base64 encoded)
334 UGFzc3dvcmQ6
eW91cnBhc3N3b3Jk (yourpassword base64 encoded)
235 2.0.0 Authentication successful
mail from:youremail@yourdomain.com
250 2.1.0 Ok
rcpt to: someone@somedomain.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
subject: test
hi
.
250 2.0.0 Ok: queued as 8B65ED40075
quit
Note that there’s many different authentication protocols, base64 is the less secure one, some servers may require a better authentication mechanism, or even use an ecrypted port, which will not work with telnet, try open ssl instead.
Testing email server with telnet
by z3n on Apr.28, 2009, under Tips & Hints
I keep forgeting about this so i decided to write a post.
Problem:
An easy way to test a pop3 email server.
Solution:
telnet mail.server.com 110
user username
pass yourpassword
list to list messages
stat to show status of your mailbox
retr # to show the message
dele # to delete a message
Source: