Tips on PPP, E-mail, and Home Networking

Welcome to my monthly installment of tech support questions and answers. This time I focus on basic system tools, including PPP dialup support, downloading e-mail, and some networking issues.

Welcome to my monthly installment of tech support questions and answers. This time I focus on basic system tools, including PPP dialup support, downloading e-mail, and some networking issues.


I just finished installing Linux. How do I configure my modem? What files do I need to edit to get things working?

This is one of the most commonly asked questions in Linux newsgroups! I remember the days when I had to create, edit, or find workable scripts that would switch PPP on or off and, once that was set up, also edit a chat script. Happily, for most users, those days are over.

Tech Support Screen
Figure One: Configuring the KPP dialer.

PPP is the Point-to-Point Protocol used by most ISPs to connect with their dialup users. In Linux, there are a number of great dialing programs you can use to simplify PPP dialing. In particular, the graphical ones have come a long way. If you use KDE, then you probably also have the KPPP dialer (Figure One). This dialer asks for your phone number, user login, password, and domain name server, and then fully automates the process by writing a simple expect and send script. You may also have to edit your /etc/resolv.conf and /etc/hosts files to indicate correct nameserver information. The value of this particular program is that most people experience a successful PPP connection within about 10 minutes of fiddling with it.

If KPPP doesn’t work for you, you may be able to get the appropriate Linux configuration files from your ISP’s Web site. YAST in SuSE and Control Panel in Red Hat can also be used. If you use Red Hat, you can start netcfg from a root xterm. Just type netcfg, add a PPP interface, and then define the login ID, password, and phone number, along with any other dialer settings, and away you go! These will all get you online, assuming you have a regular modem and not one of those unfriendly Winmodems.

There are also a variety of X-based dialers that work equally well. One of my all-time favorites is x-isp, which is, by the way, very well maintained. Another dialer is wvdial, which can be launched from either the console or an xterm. My preference is the little GNOME-PPP applet, which works quite well.


Under Windows, my e-mail program would poll my mail server and download regularly. How do I use the mutt e-mail client for the same feature and set up a filter to save incoming e-mail to various folders?

Yet another frequently asked question in mailing lists and on comp.os.linux. setup! The first things you’ll need are Sendmail and an Internet connection. mutt can be configured to poll a mail server, but most incarnations of mutt in Linux distributions do not have this compile option set. Instead, people rely on a small program called fetchmail, now included in all distributions. fetchmail downloads e-mail from your server and feeds it to your machine as if it were arriving there on its own. To become familiar with fetchmail, try the command man fetchmail. Be sure you have your networking set up correctly. If you do not have a domain name server properly set up, or you have other dialup issues, fetchmail will fail with errors. You could even lose some of your mail. So it’s a good idea to run fetchmail manually a few times until things work.

You can use it at its most basic state with no further configurations by typing fetchmail -u
yourusername nameofpopserver. com
. But instead of typing this command each time, write a small resource control file that will do this for you. The resource control file (.fetchmailrc) can be automatically generated by filling out values in something like fetchmailconf, or you can hand edit the file. Because it’s not terribly difficult, I generally hand edit the file. Simply use a text editor like jstar that does not wrap right margins and enter a string like this:

poll mye-mailserver protocol
POP3 user myusername
password mypassword

Save this file as .fetchmailrc in your home directory. By default fetchmail won’t work unless read-write permissions for this file are set for the user only. Just enter the command chmod go-r.fetchmailrc, which will change the file to have the correct permissions. Now type the command fetchmail. In daemon mode, fetchmail will check the POP e-mail server every few seconds. Simply edit the .fetchmailrc file and put in set daemon 450 at the end. Another nice feature of fetchmail is its ability to retrieve mail from multiple servers and use internal commands within the .fetchmailrc to send them to different accounts on your Linux system.

An alternate method of getting e-mail to your local inbox is to use Netscape Messenger, which can be set to download e-mail at specified times. A host of other programs, both X- and console-based, also do this. See the rather comprehensive lists at http://www.linuxberg.com or http://www.xnet.com/~blatura/linapps.shtml.

The second half of the question was about filtering e-mail. The most elegant way to implement mail filtering is to use procmail. This utility relies on a .procmailrc file and a directory called .procmail where you keep “recipes.” Recipes are written in a special command syntax. For Red Hat 6, procmail is the local mail handler, so additional files are not needed. For SuSE you will probably need a .forward file. The .procmailrc file is usually generated by finding a Web site dedicated to procmail setups, such as InfiniteInk’s procmail filtering FAQ at http://www.ii.com/internet/robots/. You can also run the command man procmailex for common examples of procmail at work. procmail is great if you want to sort e-mail into folders, do auto responses, or get rid of spam e-mail.

Here’s an example of how I use procmail. I subscribe to several mailing lists covering a wide variety of topics. mutt has some great list-handling abilities, but what I really want is for e-mail to go to specific folders that can be accessed within mutt or searched using grep. I wrote a number of simple recipes to search for strings within a To or Subject line and save this e-mail to a specified folder. Reading e-mail becomes easier since it’s all organized before I see it. I enable a log file just to make sure my specific recipes work the way I want.


I have a small home network and I want to extend my use of both Linux and Windows systems for true networking. What are my options?

I have a small home network that includes a Linux box, a DSL router, and a Windows 98 system. One definite starting point is the network administrators HOWTO by Olaf Kirsch, available online at http://www.linuxdoc.org/LDP/nag/nag.html or as a Debian package.

Additionally, there are various other HOWTOs on networking using TCP/ IP. You will want to use an internal network topology that allows you to access both systems. I suggest looking at TCP/IP using the private networking numbers that are reserved for this use, such as the 192.168.* range. You can usually set up an Ethernet interface on your Linux box without too much difficulty (using Red Hat’s netcfg tool for example). When you have FTP services set up correctly on your Linux box, you’ll be able to FTP files from the Windows to the Linux box easily.

You can see if things are up and running by using the ping command, which will tell you (among other things) whether or not you’re connecting to the machine in question. If you get a connection refused error, make sure you have an FTP daemon running (wuftpd, for example) and that your /etc/inetd.conf file includes a statement to load the correct FTP daemon. If you change this file, you’ll need to restart your inet superserver. In case you are not aware, the inet superserver is a superset of services that allow a variety of features such as FTP and telnet into your box. To restart it, log in as root and enter ps ax |grep inetd. This will yield a process control number for inetd. Once you have this, type kill -HUP theprocesscontrolnumber. This will kill the inetd superserver and restart it immediately.

A much more elegant solution is to use Samba file and print services, which fool your Windows system into thinking that the Linux machine it’s talking to is an NT server. You can set up home directories, share printers, set up a public Samba share, and mount and unmount Zip or Jaz drives. Take a look at the Samba Web site for details at http://www.samba.org. A great new Web-based configuration tool called SWAT ships with newer releases of Samba. It takes much of the mystery out of configuring Samba services. You can use Samba services to link a Linux system with a VMware virtual machine running NT or Windows 98. This can give you file and print sharing between two operating systems on the same machine.

Michael Perry came to Linux circuitously via OS/2 and NT. He documents tech support issues while staring vacantly at Linux newsgroup postings and can be reached at stumpmike@linuxcare.com.

Comments are closed.