Elbow Macaroni - Email using Telnet 101
This is how your mail software works behind the scenes. Sometimes however you may need to send emails without using Outlook, Agent or whatever else you use. Knowledge of the SMTP commands is necessary.
1. Connect to your mail server. Open a command line, then run:
Telnet mail.domain.ext 25
2. If you establish a sucessful connection you will see the following:
Connected to mail.domain.ext. Escape character is '^]'. 220 domain.ext ESMTP MDaemon 6.7.6; Tue, 25 Mar 2003 11:37:02 +0000
3. The next step is to tell the mail server where you are mailing from. This is the FQDN or the IP address of your local machine
HELO local.domain.name
A well configured mail server will check you are who you say you are (so, if you lie about your machine FQDN or IP, you may well caught), then respond
250 mail.domain.ext Hello local.domain.name [a.b.c.d], pleased to meet you
4.Next you specify who the mail is from:
MAIL FROM: mail@domain.ext
Which should return:
250 2.1.0 mail@domain.ext... sender ok
Some mail servers will check that the domain you use in the MAIL FROM: command exists.
5. Now tell the mail server who the email is to :
RCPT TO: mail@destinationdomain.ext
This should return:
250 2.1.0 mail@destinationdomain.ext... Recipient ok
6.Now tell the mail server that you are going to send the email :
DATA
7.Now you can start writing your email. Start by entering the email headers. Note the space between the: terminating the header name and the value. This is mandatory.
From: Your Name
To: Their name
CC: someone else
Subject: Your subject.
8. Once you finished with your header, press enter to leave a blank line before you begin the message body, and then enter your email contents.
9. To tell the mail server that you have completed the message enter a single "." on a line on its own. 10. The mail server should reply with the following:
250 2.0.0 OK Message saved for delivery
11.You should close the connection by issuing the QUIT command. The mail server should sign off with the following:
221 2.0.0 mail.domain.ext closing connection Connection closed by foreign host.
Old school - Elbow Macaroni
This is how your mail software works behind the scenes. Sometimes however you may need to send emails without using Outlook, Agent or whatever else you use. Knowledge of the SMTP commands is necessary.
1. Connect to your mail server. Open a command line, then run:
Telnet mail.domain.ext 25
2. If you establish a sucessful connection you will see the following:
Connected to mail.domain.ext. Escape character is '^]'. 220 domain.ext ESMTP MDaemon 6.7.6; Tue, 25 Mar 2003 11:37:02 +0000
3. The next step is to tell the mail server where you are mailing from. This is the FQDN or the IP address of your local machine
HELO local.domain.name
A well configured mail server will check you are who you say you are (so, if you lie about your machine FQDN or IP, you may well caught), then respond
250 mail.domain.ext Hello local.domain.name [a.b.c.d], pleased to meet you
4.Next you specify who the mail is from:
MAIL FROM: mail@domain.ext
Which should return:
250 2.1.0 mail@domain.ext... sender ok
Some mail servers will check that the domain you use in the MAIL FROM: command exists.
5. Now tell the mail server who the email is to :
RCPT TO: mail@destinationdomain.ext
This should return:
250 2.1.0 mail@destinationdomain.ext... Recipient ok
6.Now tell the mail server that you are going to send the email :
DATA
7.Now you can start writing your email. Start by entering the email headers. Note the space between the: terminating the header name and the value. This is mandatory.
From: Your Name
To: Their name
CC: someone else
Subject: Your subject.
8. Once you finished with your header, press enter to leave a blank line before you begin the message body, and then enter your email contents.
9. To tell the mail server that you have completed the message enter a single "." on a line on its own. 10. The mail server should reply with the following:
250 2.0.0 OK Message saved for delivery
11.You should close the connection by issuing the QUIT command. The mail server should sign off with the following:
221 2.0.0 mail.domain.ext closing connection Connection closed by foreign host.
Old school - Elbow Macaroni
Labels: USEFUL TECH


0 Comments:
Post a Comment
<< Home