Discussion:
[SATLUG] using telnet to send emails
Chris Lemire
2007-12-28 21:42:52 UTC
Permalink
How can I send an email using telnet and my mail server including my
name. For example.

***@ubuntu:~$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 ubuntu ESMTP Postfix (Ubuntu)
HELO server.com
250 ubuntu
MAIL FROM: Chris L.
555 5.5.4 Unsupported option: >.
MAIL FROM: Chris
555 5.5.4 Unsupported option:
MAIL FROM: Chris ***@gmail.com
555 5.5.4 Unsupported option: ***@gmail.com
MAIL FROM: "Chris ***@gmail.com"
250 2.1.0 Ok
MAIL FROM: "Chris L. ***@gmail.com"
503 5.5.1 Error: nested MAIL command

- --
Christopher Lemire
Sean Carolan
2007-12-28 21:51:57 UTC
Permalink
Try this, filling in your own details instead of the ones below:

telnet localhost 25
HELO server.domain.com
MAIL FROM: ***@server.domain.com
RCPT TO: ***@somehost.com
DATA
Type your text here
.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
How can I send an email using telnet and my mail server including my
name. For example.
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 ubuntu ESMTP Postfix (Ubuntu)
HELO server.com
250 ubuntu
MAIL FROM: Chris L.
555 5.5.4 Unsupported option: >.
MAIL FROM: Chris
250 2.1.0 Ok
503 5.5.1 Error: nested MAIL command
- --
Christopher Lemire
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: http://firegpg.tuxfamily.org
iD4DBQFHdW3bxp8Ys+E7CQkRAkgJAJdqZjOk/egpvXZBhFR3avhN8871AKCD7Lwi
f38tNhIu7z6lMbqmQnk9fQ==
=9pEB
-----END PGP SIGNATURE-----
--
_______________________________________________
SATLUG mailing list
http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
Powered by Rackspace (www.rackspace.com)
Chris Lemire
2007-12-28 22:50:39 UTC
Permalink
That doesn't tell the name of the person that the email was sent from which is the problem I'm having.

Sean Carolan <***@gmail.com> wrote: Try this, filling in your own details instead of the ones below:

telnet localhost 25
HELO server.domain.com
MAIL FROM: ***@server.domain.com
RCPT TO: ***@somehost.com
DATA
Type your text here
.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
How can I send an email using telnet and my mail server including my
name. For example.
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 ubuntu ESMTP Postfix (Ubuntu)
HELO server.com
250 ubuntu
MAIL FROM: Chris L.
555 5.5.4 Unsupported option: >.
MAIL FROM: Chris
250 2.1.0 Ok
503 5.5.1 Error: nested MAIL command
- --
Christopher Lemire
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: http://firegpg.tuxfamily.org
iD4DBQFHdW3bxp8Ys+E7CQkRAkgJAJdqZjOk/egpvXZBhFR3avhN8871AKCD7Lwi
f38tNhIu7z6lMbqmQnk9fQ==
=9pEB
-----END PGP SIGNATURE-----
--
_______________________________________________
SATLUG mailing list
http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
Powered by Rackspace (www.rackspace.com)
--
_______________________________________________
SATLUG mailing list
***@satlug.org
http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
Powered by Rackspace (www.rackspace.com)



---------------------------------
Never miss a thing. Make Yahoo your homepage.
Sean Carolan
2007-12-28 22:53:09 UTC
Permalink
Post by Chris Lemire
That doesn't tell the name of the person that the email was sent from which is the problem I'm having.
What exactly are you trying to do? Someone sent you an email and you
want to find out their name? For this you might have better luck
looking at the SMTP headers.
Chris Lemire
2007-12-28 22:58:10 UTC
Permalink
Whenever you sent an email, this is your information shown.

Sean Carolan <***@gmail.com>

This is not your only information shown.

***@gmail.com

When I send an email, I want the name and address to be show to the recipient.
Post by Chris Lemire
That doesn't tell the name of the person that the email was sent from which is the problem I'm having.
What exactly are you trying to do? Someone sent you an email and you
want to find out their name? For this you might have better luck
looking at the SMTP headers.
--
_______________________________________________
SATLUG mailing list
***@satlug.org
http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
Powered by Rackspace (www.rackspace.com)



---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
Sean Carolan
2007-12-28 23:28:49 UTC
Permalink
Post by Chris Lemire
When I send an email, I want the name and address to be show to the recipient.
This is normally put into the DATA section of the email as you can see
in the headers:

Date: Fri, 28 Dec 2007 14:58:08 -0800 (PST)
From: Chris Lemire <***@yahoo.com>
Subject: Re: [SATLUG] using telnet to send emails

If you have your heart set on sending email via telnet, you can
probably type all your header info in by hand. But if you want to be
really hardcore, you have to do it from your iphone (wink).
Brian Lewis
2007-12-28 23:47:01 UTC
Permalink
Hater :)

Sent from my iPhone
Post by Sean Carolan
Post by Chris Lemire
When I send an email, I want the name and address to be show to the recipient.
This is normally put into the DATA section of the email as you can see
Date: Fri, 28 Dec 2007 14:58:08 -0800 (PST)
Subject: Re: [SATLUG] using telnet to send emails
If you have your heart set on sending email via telnet, you can
probably type all your header info in by hand. But if you want to be
really hardcore, you have to do it from your iphone (wink).
--
_______________________________________________
SATLUG mailing list
http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
Powered by Rackspace (www.rackspace.com)
Brad Knowles
2007-12-29 09:17:05 UTC
Permalink
Post by Chris Lemire
How can I send an email using telnet and my mail server including my
name. For example.
Note that what you put in the headers does not necessarily have to
have anything to do with what you claim as the envelope sender (used
in "MAIL From:") or the envelope recipient (used in "RCPT To:").

The three best explanations I've been able to find for this process are:

http://weblogs.asp.net/owscott/archive/2005/03/15/Troubleshooting-email_2C00_-the-Telnet-way.aspx
http://arnab.org/notes/using-telnet-to-send-mail-by-smtp
http://www.yuki-onna.co.uk/email/smtp.html
--
Brad Knowles <***@shub-internet.org>
LinkedIn Profile: <http://tinyurl.com/y8kpxu>
Deeþan Chakravarthy
2007-12-29 13:18:41 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
How can I send an email using telnet and my mail server including my
name. For example.
What are you trying exactly ? Why not configure pine or mutt ?
--
Deepan
http://codeshepherd.com/
http://codeshepherd.blogspot.com/
http://sudoku-solver.net/
Jon Mark Allen
2007-12-29 14:00:51 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
How can I send an email using telnet and my mail server including my
name. For example.
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 ubuntu ESMTP Postfix (Ubuntu)
HELO server.com
250 ubuntu
MAIL FROM: Chris L.
555 5.5.4 Unsupported option: >.
MAIL FROM: Chris
250 2.1.0 Ok
503 5.5.1 Error: nested MAIL command
Like this:

MAIL FROM: Jon Mark Allen <***@not-a-real-domain.com>

Likewise you could do:

RCPT TO: SATLUG <***@satlug.org>

to include the recipient's address.

Are you using telnet to verify SMTP functions or you simply want to
send email the old fashioned way? If it's the former, swaks [1] is an
excellent perl script that eases the process significantly. It shows
the SMTP conversation in the terminal so there is no question about
what is going on. I used to use telnet, but I really love swaks.

Probably more info than was asked for, but....

JM

[1] http://www.jetmore.org/john/code/#swkas
--
"And can the liberties of a nation be thought secure when we have
removed their only firm basis, a conviction in the minds of the people
that these liberties are the gift of God?"
-- Thomas Jefferson
Brad Knowles
2007-12-29 19:30:25 UTC
Permalink
No. Trust me, as someone who's been sending e-mail manually via
telnet for over fifteen years, "MAIL FROM:" and "RCPT TO:" do not
work this way. Including the user name and e-mail address is
something you put into the headers which are included as the first
part of the information you provide during the "DATA" phase. At the
earlier "envelope phase", all you use is pure e-mail addresses,
nothing else.

See the other examples that I referenced. They have it correct.
--
Brad Knowles <***@shub-internet.org>
LinkedIn Profile: <http://tinyurl.com/y8kpxu>
Wayne Walker
2007-12-31 02:37:28 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
How can I send an email using telnet and my mail server including my
name. For example.
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 ubuntu ESMTP Postfix (Ubuntu)
HELO server.com
250 ubuntu
MAIL FROM: Chris L.
555 5.5.4 Unsupported option: >.
MAIL FROM: Chris
250 2.1.0 Ok
503 5.5.1 Error: nested MAIL command
Those are all illegal email addresses.
- --
Christopher Lemire
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: http://firegpg.tuxfamily.org
iD4DBQFHdW3bxp8Ys+E7CQkRAkgJAJdqZjOk/egpvXZBhFR3avhN8871AKCD7Lwi
f38tNhIu7z6lMbqmQnk9fQ==
=9pEB
-----END PGP SIGNATURE-----
--
_______________________________________________
SATLUG mailing list
http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
Powered by Rackspace (www.rackspace.com)
--
Wayne Walker

# Code comments are lies waiting to happen

***@bybent.com Do you use Linux?!
http://www.bybent.com Get Counted! http://counter.li.org/
Perl - http://www.perl.org/ Perl User Groups - http://www.pm.org/
Jabber: ***@jabber.bybent.com AIM: lwwalkerbybent
IRC: wwalker on freenode.net
Wayne Walker
2007-12-31 02:40:18 UTC
Permalink
Post by Wayne Walker
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
How can I send an email using telnet and my mail server including my
name. For example.
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 ubuntu ESMTP Postfix (Ubuntu)
HELO server.com
250 ubuntu
MAIL FROM: Chris L.
555 5.5.4 Unsupported option: >.
MAIL FROM: Chris
250 2.1.0 Ok
503 5.5.1 Error: nested MAIL command
Those are all illegal email addresses.
Ignore me. As Brad said, only the ***@domain.com is valid in the
MAIL and RCPT commands.
--
Wayne Walker

# Code comments are lies waiting to happen

***@bybent.com Do you use Linux?!
http://www.bybent.com Get Counted! http://counter.li.org/
Perl - http://www.perl.org/ Perl User Groups - http://www.pm.org/
Jabber: ***@jabber.bybent.com AIM: lwwalkerbybent
IRC: wwalker on freenode.net
Chris Lemire
2007-12-31 08:40:32 UTC
Permalink
Right, I was just giving examples. Those aren't the actual addresses that I used.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
How can I send an email using telnet and my mail server including my
name. For example.
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 ubuntu ESMTP Postfix (Ubuntu)
HELO server.com
250 ubuntu
MAIL FROM: Chris L.
555 5.5.4 Unsupported option: >.
MAIL FROM: Chris
250 2.1.0 Ok
503 5.5.1 Error: nested MAIL command
Those are all illegal email addresses.

MAIL FROM: Chris L.
- --
Christopher Lemire
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: http://firegpg.tuxfamily.org
iD4DBQFHdW3bxp8Ys+E7CQkRAkgJAJdqZjOk/egpvXZBhFR3avhN8871AKCD7Lwi
f38tNhIu7z6lMbqmQnk9fQ==
=9pEB
-----END PGP SIGNATURE-----
--
_______________________________________________
SATLUG mailing list
http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
Powered by Rackspace (www.rackspace.com)
--
Wayne Walker

# Code comments are lies waiting to happen

***@bybent.com Do you use Linux?!
http://www.bybent.com Get Counted! http://counter.li.org/
Perl - http://www.perl.org/ Perl User Groups - http://www.pm.org/
Jabber: ***@jabber.bybent.com AIM: lwwalkerbybent
IRC: wwalker on freenode.net
--
_______________________________________________
SATLUG mailing list
***@satlug.org
http://alamo.satlug.org/mailman/listinfo/satlug to unsubscribe
Powered by Rackspace (www.rackspace.com)



---------------------------------
Never miss a thing. Make Yahoo your homepage.
Loading...