TCP/IP and NFS FAQ
When your GUI mail client doesn't work, you need to know whether
the problem is at the server or the client. You could download
a different client (Thunderbird, if you are using Outlook or Apple
Mail) but why spend that time when you can test from the command line?
Note that some ISP's won't allow you to make port 25 connections
to anything but their mail servers. This is to keep viruses from
sending mail. If you need to test some other server, you may not be able to
without using a system that does not impose this restriction.
The lines preceded by numbers are typical responses. The
actual response may be different.
$ telnet mail.somewhere.com 25
Connected to smtp.somewhere.com.
Escape character is '^]'.
220 smtp.somewhere.net ESMTP Sendmail 8.9.3+Sun/8.9.1; Thu,
12 Oct 2000 04:39:40 -0700 (PDT)
mail from: email@example.com
250 firstname.lastname@example.org... Sender ok
rcpt to: email@example.com
550 firstname.lastname@example.org... Relaying denied
rcpt to: email@example.com
250 firstname.lastname@example.org... Recipient ok
354 Enter mail, end with . on a line by itself
look ma no headers!
250 HA00945 Message accepted for delivery
221 smtp.somewhere.com closing connection
You might also need to do a
first, and addresses may need to be in angle brackets:
Remember: some ISP'S block your outgoing packets, only allowing port
25 to their SMTP server. You won't be able to test any other server
if this is true.
If your server accepts secure smtp (it should), you can use openssl instead of telnet:
openssl s_client -connect mail.yourserver.com:465 -crlf
(If you don't use the "-crlf" you may have trouble using "." to end a DATA input)
I also have found Clean Code Email very helpful for command line testing.
If you have sendmail. you can use it from the command line with -v to see what really happens. See Debugging sendmail problems
If this page was useful to you, please help others find it:
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site:
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Publishing your articles here
Jump to Comments
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.