This link has been bookmarked by 105 people . It was first bookmarked on 02 Jul 2006, by Richard.
-
06 Dec 16
-
04 Mar 15
-
05 Sep 14
-
22 Aug 12
-
02 Jul 12
Kevin LandreneauTelnet - SMTP Commands (sending mail using telnet)
In order to access your mailbox you will need 3 things:
An active internet connection (an embarrasing stage to miss sometimes!)
The address of a mail server capable of relaying for you - usually provided by your dialup provider (e.g. mail.domain.ext)
A valid email address (e.g. mail@domain.ext)
The first thing to do is to open a connection from your computer to your mail server.
telnet mail.domain.ext 25
You should receive a reply like:
Trying ???.???.???.???...
Connected to mail.domain.ext.
Escape character is '^]'.
220 mail.domain.ext ESMTP Sendmail ?version-number?; ?date+time+gmtoffset?
You will then need to delcare where you are sending the email from:
HELO local.domain.name - dont worry too much about your local domain name although you really should use your exact fully qualified domain name as seen by the outside world the mail server has no choice but to take your word for it as of RFC822-RFC1123.
This should give you:
250 mail.domain.ext Hello local.domain.name [loc.al.i.p], pleased to meet you
Now give your email address:
(On many mailservers the space after the : is required rather that optional. Thanks to Justing Goldberg)
MAIL FROM: mail@domain.ext
Should yeild:
250 2.1.0 mail@domain.ext... Sender ok
If it doesn't please see possible problems.
Now give the recipients address:
RCPT TO: mail@otherdomain.ext
Should yeild:
250 2.1.0 mail@otherdomain.ext... Recipient ok
If it doesn't please see possible problems.
To start composing the message issue the command DATA
If you want a subject for your email type Subject:-type subject here- then press enter twice (these are needed to conform to RFC 882)
You may now proceed to type the body of your message (e.g. hello mail@otherdomain.ext from mail@domain.ext)
To tell the mail server that you have completed the message enter a single "." on a line on it's own.
The mail server should reply with: 250 2.0.0 ???????? Message accepted for delivery
You can close the connection by issuing the QUIT command.
The mailserver should reply with something like:221 2.0.0 mail.domain.ext closing connection
Connection closed by foreign host.
Here are a list of problems I've encountered and their fixes
501 nouser@nosuchplace.here... Sender domain must exist
The domain that you are sending from must exist
503 Need MAIL before RCPT
A recipient has been specified before a sender.
550 mail@domain.ext... Relaying Denied
The mail server has refused to relay mail for you, this may be for any number of reasons but typical resons include:
Not using this provider for an internet connection and/or
Not using an email address provided by the owner of the server.
Some things to watch out for:
1. If you type too quickly, sometimes it won't recognise your text (weird!)
2. The backspace key sometimes does not work with some telnet clients (even though it may seem as though it does)
I'll be putting more as and when I get them and figure out how to fix each problem. -
12 Jun 12
-
10 Feb 12
-
16 Nov 11
-
22 Aug 11
-
01 Aug 11
-
07 Mar 11
-
12 Jan 11
-
telnet mail.domain.ext 25
-
HELO local.domain.name -
AIL FROM:
-
RCPT TO: mail@otherdomain.ext
-
o start composing the message issue the command
DATA
If you want a subject for your email typeSubject:-type subject here-then press enter twice (these are needed to conform to RFC 882)
You may now proceed to type the body of your message (e.g.hello mail@otherdomain.ext from mail@domain.ext)
To tell the mail server that you have completed the message enter a single "." on a line on it's own.
The mail server should reply with:250 2.0.0 ???????? Message accepted for delivery
You can close the connection by issuing theQUITcommand.
The mailserver should reply with something like:221 2.0.0 mail.domain.ext closing connection
Connection closed by foreign host.
-
-
24 Dec 10
-
23 Nov 10
-
26 Oct 10
-
16 Oct 10
-
24 May 10
-
13 May 10
-
01 Feb 10
-
08 Sep 09
-
29 Jul 09
-
11 Feb 09
-
09 Feb 09
-
26 Jan 09
-
31 Dec 08
-
25 Nov 08
-
15 Nov 08
-
02 Nov 08
-
23 Oct 08
Andrés AquinoNow give your email address:
MAIL FROM: mail@domain.ext
Should yeild:
250 2.1.0 mail@domain.ext... Sender ok
If it doesn't please see possible problems.
Now give the recipients address:
RCPT TO: mail@otherdomain.ext
Should yeild:
250 2.1.0 mail@otherdomawork unix tutorials tutorial troubleshooting tools tips telnet
-
30 Sep 08
-
24 Sep 08
Igor Longagnaniocal.domain.nam
work unix tutorials tutorial troubleshooting tools telnet tips linux network networking
-
17 Sep 08
-
08 Aug 08
-
18 Jul 08
-
10 Jul 08
-
08 May 08
Richard SheppardAnnotated link http://www.diigo.com/bookmark/http%3A%2F%2Fwww.yuki-onna.co.uk%2Femail%2Fsmtp.html
-
27 Feb 08
-
22 Feb 08
-
18 Feb 08
-
14 Feb 08
-
10 Jan 08
-
09 Jan 08
-
23 Oct 07
-
23 Aug 07
-
04 Jun 07
-
17 May 07
-
11 Apr 07
-
29 Mar 07
-
26 Feb 07
-
06 Feb 07
-
15 Nov 06
-
07 Aug 06
-
26 Jun 06
-
18 Jun 06
-
27 Apr 06
-
04 Apr 06
-
06 Mar 06
-
08 Feb 06
-
16 Dec 05
-
04 Jan 05
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.