| |
Miscellaneous: Reading/Sending mail with telnet(last edit: 2001-05-02)
Introduction
This might come as a surprise to you but you don't need a mail program to send and/or
read your mail!! All you need is a telent program and you need to know the address of
your incoming and outgoing mail server.
Let's just say for this example that the incoming mail server is pop3.lowlife.org and the
outgoing mail server is smtp.lowlife.org.
Reading mail
You have to connect to your pop3 server on port '110' to read your mail. Here is a sample
session:
---
user@host:~/#telnet pop3.lowlife.org 110
Trying 192.168.1.3...
Connected to pop3.lowlife.org
Escape character is '^]'.
+OK POP3 pop3.lowlife.org v2000.69 server ready
user me
+OK User name accepted, password please
pass *******
+OK Mailbox open, 2 messages
list
+OK Mailbox scan listing follows
1 609
2 382
.
retr 1
+OK 609 octets
[THE EMAIL WILL BE SHOWED HERE]
.
dele 1
+OK Message deleted
quit
+OK Sayonara
Connection closed by foreign host.
---
These are the commands you have to use as showed above:
telnet [pop3 server] 110
user [username]
pass [password]
list
retr [mail number]
dele [mail number]
Note that the mails you delete with 'dele' will actually be delete when you quit the
connection.
Sending mail
You have to connect to port '25' if you want to send a mail. Here's a session:
---
user@host:~/#telnet smtp.lowlife.org 25
Trying 192.168.1.3...
Connected to smtp.lowlife.org
Escape character is '^]'.
220 smtp.lowlife.org ESMTP Exim 2.04 #2 Wed, 2 May 2001 09:31:54 +0200
helo lowlife.org
250 smtp.lowlife.org Hello wolf.lowlife.org [192.168.1.104]
mail from: me@lowlife.org
250 <me@lowlife.org> is syntactically correct
rcpt to: you@freebsd.lowlife.org
250 <you@freebsd.lowlife.org> is syntactically correct
data
354 Enter message, ending with "." on a line by itself
This is the data
.
250 OK id=14ur7r-0000fq-00
quit
221 smtp.lowlife.org closing connection
Connection closed by foreign host.
---
These are the commands you have to use as showed above:
telnet [mailserver] 25
helo [your domainname]
mail from: [your e-mail address]
rcpt to: [receivers e-mail address]
data
You can type your message after the 'data' command. It is nice to start with
'Subject: [a subject]' but it is not neccesary. If you're done type a dot and hit enter.
Note that the mail is send immediatly after you've entered the dot and hit enter.
You can quit with ....... the command 'quit'
Click here to go back to the index.
|