Macintosh, Internet and Network Consulting Services

Quick Jump to:


EMAIL 101

SMTP: Why Simple Mail Transfer Protocol isn't so Simple Anymore!

Basic Email Protocols: SMTP, POP and IMAP
Why Do I Need SMTP Authentication?
Sending Mail via the 'Local' SMTP Server
Special Note About SMTP Blocking
SMTP Authentication via IP Address
SMTP Authentication via Username & pw
SMTP Authentication via POP Before Send
Popular SMTP Servers
Other SMTP Issues: EarthLink, Alt. Port 587
Anti-SPAM Black Lists (coming soon)


What Happened to Internet Email?:(top)
Internet Email used to be simple and configuring an email client to send and receive messages was no big deal. Due to the exponential explosion in the quantity of unsolicited commercial email (UCE, a.k.a. SPAM), nearly every internet service provider has had to secure their servers against unauthorized users sending thousands of messages through their servers to unsuspecting users.

Basic Email Protocols 101: (top)
There are essentially 3 standard protocols for sending and receiving email messages over the internet; SMTP, POP3 and IMAP. For sake of explanation, let's imagine sending a message to Grandma in Kansas. The message speaks several different protocols and takes makes many hops along the way to Grandma's house...

1. Your messages is typed in an email client program and you click the 'Send' button...

2. When you press 'Send', your email program connects to a server somewhere on the internet, usually at your Internet Service Provider (ISP).

3. Your ISP's mail server relays the message to Grandma's ISP's mail server, speaking a language known as the Simple Mail Transfer Protocol, or SMTP.

4. Grandma uses her email program to check her Post Office Protocol (POP3) mailbox at her ISP, reads your message and remembers what a wonderful grandchild you are. She'll be sure to get that birthday card in the mail to you on time this year!

If Grandma is particularly hi-tech, she might have configured her email client program to read the messages in her inbox with IMAP rather than POP3, but for our purposes here, let's consider POP3 and IMAP the same.

The important thing to note here is that there are two different languages being spoken; SMTP for sending messages and POP for receiving messages.



SMTP Authentication Explained
: (top)
As far as you're concerned, sending a message to Granny is easy. Unfortunately, spammers think so too and fill her mailbox with a bunch of junk messages offering Viagra™ or get-rich-quick scams.

Not too long ago, all of the SMTP servers through which we send our mail were wide open. These mail servers would 'relay' a message from any user on the internet to any other user with little regard for who was actually a legitimate user or where that user was located. Many spammers have taken advantage of 'open relays' and continue to use many unsecured serves to fill your mailbox with junk

Several methods have been developed to keep unauthorized users from relaying messages through an SMTP server:

1. Authentication by TCP/IP address
2. SMTP Auth (username and password)
3. Authentication by checking a POP account before sending


SMTP Authentication by TCP/IP Address:
(top)
When you connect to the internet, your computer has a numerical address known as a TCP/IP address. This number makes your computer unique and sets it apart from the millions of other machines on the internet.

Your ISP assigns your computer this numerical address from a pool of addresses they are assigned. Because your machine is part of this pool of addresses, it's easy for the ISP to check who is sending mail through their SMTP server by looking at the IP address from which it receives a message. If the IP address isn't that of a customer, the mail server rejects the message saying, essentially, "Go away spammer, you're not one of our customers!". If the IP address of the sender IS a customer, the ISP's server accepts the message for relay and delivers the message to it's final destination. This method of SMTP authentication is invisible to your email program. You don't need to do anything to set this up - there's nothing to configure.

This method of authentication breaks if/when you travel away from your home connection and your machine gets a different TCP/IP address. This happens when you connect your computer at a friend's house, another business or dial-up from a different ISP and try to send mail through your ISP's mail server. Your ISP's SMTP mail server sees the IP address as 'alien' and rejects your message with an error such as:

In this case you have a few choices for how to send your mail...


Send mail via the ISP through which you're connected
Often the simplest fix for the problem is to find out the address of the SMTP server for the connection you are currently using. For example, let's say you connect at home via an ISP called MegaPath over DSL and your email program is configured to use their mail server (mail.megapathdsl.net) for sending your outbound messages. Now you travel to a friend's house who has an AT&T Broadband cable modem. Your machine now has an IP address from AT&T's pool of addresses instead of MegaPath's. MegaPath's SMTP server will see this AT&T TCP/IP address when you try to send mail and say "Sorry, you're not one of our customers - you look like a spammer to us." You won't be sending any mail unless you make some changes in your email program.

In this case it's a relatively easy task to find out the address for AT&T's SMTP server and configure your email client to send mail through them instead of MegaPath. In most email programs the place to edit your SMTP server settings are under Tools: Accounts: Settings; or some such. If you poke around a bit you should be able to find a screen where you can edit the outbound SMTP server through which your machine sends it's mail. In Outlook Express and Entourage on the Mac this field looks something like:

Do whatever you need to obtain the address of the SMTP server for the ISP through which you're connected. Suggestions include looking at the settings of another machine on the network, asking the local network/system administrator or even calling the ISP. The address you need may even be in the list below.

Some businesses have their own SMTP server - ask the network admin for the address or check the settings of another machine on the network that can send mail. Good guesses are smtp.company_name.com or mail.company_name.com where company_name is the domain name of the company where you're connected. For example if you're visiting your friends at LANSharks Consulting, you might guess that the address of their mail server might be: mail.lansharks.net or smtp.lansharks.net.

Here's a list of some of the SMTP servers for popular ISP's:

ISP Name: SMTP Server:
MegaPath Networks mail.megapathdsl.net
Comcast Cable smtp.comcast.net
SBC smtp.sbcglobal.yahoo.com
EarthLink mail.earthlink.net
PacBell mail.pacbell.net

Once you've determined the address for the local SMTP server, enter it in your email program as shown above. I suggest writing down the current address before you change anything so you'll know how to restore your settings when you go back home.

Special Note about Port 25 SMTP Blocking: (top)
Note that some ISP's, especially dial-up providers will only allow you to send mail through their SMTP server. For example, when connected to SBC via DSL or EarthLink via dial-up you can ONLY send mail if you configure your email program to send via their respective SMTP servers. If you're connected to an ISP who does this type of 'SMTP blocking', you won't be able to send mail unless you configure your mailer to use their SMTP server.

SBC has started blocking all outbound port 25 SMTP traffic on their DSL connections.You can call and ask them to unblock port 25 on your line.

There is another way around this... sometimes. But first a little background. When you send email, your email client program speaks to the mail server on port 25. In a nutshell, port numbers are used in all connections to tell the server what particular kind of traffic your computer is sending or requesting. For example all web traffic uses port 80, incoming POP email uses port 110 and outbound SMTP email uses port 25.

Some internet providers also configure their servers to accept incoming messages on port 587 as well as port 25. This is sometimes called 'Alt Port SMTP'. Since only port 25 is blocked, you can often send mail to another SMTP mail server on port 587, circumventing the port 25 roadblock. The only way to know for sure is to try sending mail on port 587 or ask your mail server admin.

In Entourage on a Mac, you can configure the SMTP port under Tools>Accounts (double-click on your account)>"Click here for advanced sending options..."


Entourage SMTP Port Settings

 

In Apple's Mail program the SMTP port is configured under Mail>Preferences>Accounts>Server Settings


Apple's Mail SMTP Port Settings



STMP Authentication by Username & Password:
(top)
Another alternative for sending mail while away from your home or office internet connection is to use SMTP Authentication (SMTP Auth). As long as the ISP through which you are currently connected does not do SMTP Blocking (see above), you should be able to send mail through your ISP's SMTP server, even when you aren't directly connected through that ISP and your TCP/IP address isn't part of your ISP's pool of addresses. The SMTP auth mechanism sends your username and password to your ISP's SMTP server when you attempt to send a message, thereby authenticating you to send mail.

Following the example from above, let's say you've left your MegaPath home/office DSL connection and are visiting a friend with an AT&T Broadband cable modem connection. While using your friend's connection, the IP address your computer is assigned belongs to AT&T's pool so you'll need to configure your email program for SMTP auth. While the particulars are different for every email client program, here's how to configure things in Outlook Express/Entourage on the Mac. Other email clients should have similar settings.

Choose 'Accounts' from the Tools menu. Double-click on your default email account to open the settings for that account. At the bottom of the settings window you will see the SMTP server field where you enter the address of the server through which you want to send your messages. To configure SMTP authentication to send your username and password to the server when you try to send mail, click the"Click here for advanced sending options" box (in italics) below the SMTP server field.

You will see the following screen:

Depending on your ISP and how your account is configured, you can tell the email program that your ISP's mail server "requires authentication". Start by checking the "SMTP server requires authentication" check box. You may need to check with your ISP to determine the proper settings for sending mail with SMTP Auth turned on. If you experience difficulty sending mail using SMTP auth, consider sending messages through the SMTP server of the ISP where you are currently connected.


SMTP Auth using POP Before Send:
(top)
Some ISP's allow users to send mail through their SMTP server for some small window of time after you've checked your POP account. They log your TCP/IP address when you check for new messages and allow you to send mail from that TCP/IP address for some amount of time. Most ISP's won't or can't tell you how long that window of time is, so if you've been writing a message for a while, you may need to check your mail again before you can send.

Please feel free to contact me for more information about any of the information above.

LANsharks Consulting - 510-601-5475

About the Author:

Kirk van Druten is the owner and founder of LANsharks Consulting, a Macintosh network and consulting firm, serving Northern California clients since 1994.

© Copyright 2005.
Please don't duplicate or re-publish this without asking first. Thanks.

(top)