Monthly Columns
 

You Have New Mail

Copyright © 1999 Chris Coleman


It's a beautiful day out, the room is filled with the hum and glow of 17" monitors. You sit quietly at your terminal reading your E-mail. For the last two months you have been using one of the free e-mail sites on the Internet to receive your personal E-mail.

The phone rings. "Hello", you answer. It's your boss.

"I just got a call from the CEO", he says. "We have to come up with a solution to give everyone in the company on-site E-mail."

You ask if there is a budget for new hardware or software. He replies in the negative and says, "Don't you have that old Pentium 100 down there?" Your heart sinks as you realize that he is talking about your desktop computer. "Uh, yes," you answer and grumble as you hang up the phone.

You turn back to your computer and amid ravings about how your boss volunteered your computer to be the corporate mail server, you concoct ways to keep your desktop computer.

Scrounging around yours and neighboring offices and cubicles, you beg, borrow, or commandeer:

  • 486/66 CPU
  • 20 Meg of Ram
  • 1.6 G harddrive
  • mouse and keyboard
  • 14" SVGA color Monitor
  • An NE2000 Network Card
  • An odd looking CD set.
You take all your loot back to your office and set it up. When you turn the assembled computer on, you notice that it is running DOS and Windows 3.1. While gathering computer parts, you failed to find a spare copy of Windows NT and Microsoft Exchange Server, not that you were sure you could run it on the hardware you had found. However, a co-worker had given you a CD set that he said would do the job.

You pull the CD set out and unwrap it. It is a copy of BSD, complete with installation instructions. You look at the back of case and read that "E-mail and POP3" are supported.

The company has about 200 employees. A wave of uncertainty flushes over you. Was BSD going to be robust enough to do the job running on a 486? You decide to give it a shot, the alternative is losing your desktop computer, as outdated as it is.

Following the instructions, you have just installed a new BSD system that will act as the mail server for about 200 users. Now, how do you turn on E-mail? Where are the point and click buttons you are used to?

You login to your new system and the words "You have new mail." appear just above the command prompt. "What?" you think to yourself. "Is E-mail standard with this installation? Wouldn't that be nice."

You fire up Netscape Communicator and open up the messenger. You plug in the user information and try sending a test message. "Message sent successfully."

"Wow," you think. "This is so easy." You log into your free E-mail account and there is the test message you sent. Next, you select "reply to sender" and send a message back to your new E-mail server. Back at Netscape Messenger, you click on the "Get Msg" button. Netscape spins its wheels as it tries to connect to your new E-mail server. Your heart sinks as an error message comes up:

"What could have gone wrong?" you think to yourself. "What does this message mean, I am the server's administrator?"

All of a sudden you feel the world around you freeze and you hear the Narrator's voice: "All right class, let's analyze the situations and find out what's going on."

"Oh no!" you think to yourself. You've been caught in an educational video! You fade into the darkness and we join the instruction at hand.

When BSD was installed, the default options allowed sendmail to run automatically. Sendmail, quoting from the man page, is "an electronic mail transport agent." Sendmail can handle all server internal E-mail and can route internetwork E-mail when necessary to get the messages to the right places. Sendmail uses Simple Mail Transfer Protocol (SMTP) to transport messages between servers and networks. Because sendmail was operating by default, we were able to send mail using netscape, but not receive mail via netscape. Netscape uses SMTP to send outgoing mail, but it uses Post Office Protocol 3 (POP3) to receive incoming mail. SMTP is standard on BSD from sendmail, however POP3 requires some setup. The test E-mail reply was received by the server, but is not accessible from Netscape because POP3 has not been enabled. SMTP clients, such as mutt, pine, etc would have accessed the E-mail without any problems.

The diagram below illustrates the how an E-mail travels, using SMTP and POP3.

POP3 support is an easy to add on feature. For most cases it is as easy as adding a package or compiling a port. Qualcomm offers a free POP3 daemon that is in the ports collection. Usually it is located in /usr/ports/mail/popper. To install from the ports collection:

# cd /usr/ports/mail/popper
# make install

Once POP3 support is installed, it needs to be activated. The easiest place to activate it is from inetd. Inetd is your Internet Daemon. It handles the on-demand style internet services. These services don't have to be running all the time, they can be activated on-demand via inetd. The addition of POP3 services to inetd is trivial. Most of the inetd configurations are pre-configured, with the line merely commented out. Just remove the comment and HUP the init process and you are up and running.

The config file for inetd is usually /etc/inetd.conf, we'll use vi to modify it.

# cd /etc
# vi inetd.conf

(un-comment or add the line:

pop3 stream tcp nowait root /usr/local/libexec/popper popper,

close and save the file)

# kill -HUP `cat /var/run/inetd.pid`

Now, you should be able to send and receive E-mail using Netscape. You can test your POP3 services by telneting to your machine on port 110.

# telnet localhost 110

If that shows up, everything is working.

Security Notice: Versions of QPOP earlier than 2.53 are vulnerable to system security breaches. Please upgrade.

Chris Coleman, chrisc@vmunix.com