Sending mail with a telnet client

In the next example the gets user spam@tr.ap a subscribtion on the Debian PowerPC mailing list.
It is the hardway for clicking on mailto:debian-powerpc-request@lists.debian.org?subject=subscribe .

Find the host where to deliver the message.
$ host -t mx lists.debian.org
lists.debian.org MX 0 murphy.debian.org
lists.debian.org MX 5 master.debian.org
lists.debian.org MX 10 gluck.debian.org
The one the with highest prioritory ( lowest number ) is murphy

Now can start the action.
Note:macwheel.xs4all.nl is my computer.


$ telnet murphy.debian.org smtp
Trying 65.125.64.134...
Connected to murphy.debian.org.
Escape character is '^]'.
220 murphy.debian.org ESMTP Postfix (Debian/GNU)

helo macwheel.xs4all.nl
250 murphy.debian.org
mail from: spam@tr.ap
250 Ok
rcpt to: debian-powerpc-request@lists.debian.org
250 Ok
data
354 End data with <CR><LF>.<CR><LF>
From: spam@tr.ap
To: debian-powerpc-request@lists.debian.org
Subject: subscribe
Date: Mon, 30 Dec 2002 18:55:46 +0100

an allmost empty message
.

250 Ok: queued as 6BFE91F3BE
quit
221 Bye
Connection closed by foreign host.
$

Only the smtp commands:

helo macwheel.xs4all.nl
mail from: spam@tr.ap
rcpt to: debian-powerpc-request@lists.debian.org
data
mail box format
mail box format

.
quit