Here’s a handy cheat sheet for testing mail accounts via telnet. The commands you need to type are in bold text
telnet mail.yourdomain.com 110
Connects to the pop3 server
This submits your username to the server
This submits your password to the server
This will list the emails in the inbox, including their ID number, and size
if you want to read an email from the list, type retr # where # is the number of the email you want read. For example, to read the 2nd messge in the list, retr 2
This will delete an email. After you issue the dele command, you put a number. This is the number of the email you want to delete. So for example, to delete message 1, type dele 1
Once you have finished, you need to make sure you type quit, otherwise it does not save the changes you made.
telnet mail.yourdomain.com 143
This opens the session to the IMAP server.
a LOGIN YourUsername YourPassword
This sends the username and password to the system (the “a” is a required part of the command)
a LIST “” “*”
This shows a listing of all the IMAP folders the account has
a SELECT INBOX
This will select the INBOX folder. You can repalce INBOX with any folder you wish to use.
a fetch 1:* flags
This will list all the emails in the selected folder, and will also tell you the flags like “seen” or “NonJunk”.
a fetch 1 body[header]
This command lists the header information of message 1 in the selected folder.
a fetch 1 body
This will list the header AND the contents of message 1 in the selected folder.
a store 1 +flags deleted
This command will set message 1 to be deleted. (NOTE: it will not delete until the expunge command has been run)
This will delete any emails that you flagged to be deleted with the previous command
Disconnect from the IMAP server
telnet mail.yourdomain.com 25
This opens up a connection to the SMTP server
This should be your own hostname (the computer hostname you are connecting FROM)
MAIL from: <[email protected]>
This is the email address you want to send the test email FROM
RCPT to: <[email protected]>
This is the email address you are sending your test email TO
Begins the data entry for the email headers
From: [email protected]
To: [email protected]
Subject: Test message
After each of these lines press enter to start the next line. After the 3rd line, press enter twice so that it puts a blank line between the Subject, and the body of the email
This is a test message.
This is the body of the message. Type whatever message you want here
A period on a line all by itself indicates that is the end of the email. It will then try to send this email to the recipient from the sender email address using the data you provided in the headers above.