THE ISP CONNECTIVITY HOWTO _Michael Strates, Michael_Strates@apana.org.au v1.0, 30 August 1997 _ This document describes how to integrate your Linux computer, and take advantage of your temporary internet connection. If you follow this document correctly, you will have Mail and News working well. 1. Introduction The main goal of this document is to address some of the problems people face when connecting their Linux box up to a temporary Internet Connection. Hopefully with the advent of this document, it will prevent people's postings about this subject. This document isn't meant to supersede any other HOWTO, it should be used in conjunction with them. 1.1. New versions of this document New versions of this document will be periodically posted to comp.os.linux.announce, comp.answers, and news.answers. They will also be added to various anonymous FTP sites who archive such information, including SunSite (sunsite.unc.edu:/pub/Linux/docs/HOWTO). In addition to these sites, you'll also be able to find this HOWTO on the Web at http://sunsite.unc.edu/mdw/linux.html. 1.2. Feedback I welcome any feedback about this HOWTO, either positive or negative via electronic mail. Naturally, I'd be happy to hear from you if you have found any errors, or omissions. Flames will go quietly to /dev/null so don't even bother! :-) 1.3. Copyright Information The ISP-Connectivity-HOWTO is copyrighted (c)1997 Michael Strates. A verbatim copy may be reproduced or distributed in any medium physical or electronic without permission of the author. Translations are similarly permitted without express permission if it includes a notice on who translated it. Short quotes may be used without prior consent by the author. Derivative work and partial distributions of the ISP-Connectivity-HOWTO must be accompanied with either a verbatim copy or a pointer to the verbatim copy. Commercial redistribution is allowed and encouraged; however, the author would appreciate being notified of any such distributions (as a courtesy). In short, we wish to promote dissemination of this information through as many channels as possible. However, we do wish to retain copyright on the HOWTO documents. We further want that ALL information provided in the HOWTOS is desseminated. If you have any questions, please contact Greg Hankins, the Linux HOWTO coordinator, at gregh@sunsite.unc.edu. 1.4. Standard Disclaimer Naturally, I disavow any potentional liability resulting of the direct or indirect use of any information contained in this document. Use it at your own risk only. I present this in a hope to help people, but if something seriously goes wrong, then I'm not to blame. 1.5. Other Sources of Information * The other Linux HOWTO Documents and LDP Manuals * UseNet Groups * and some of the very informative O'Riley Books 2. Connecting up to the ISP Connecting up hasn't got much to do with this HOWTO. There are a few good HOWTOs out there to help you with this, mainly the PPP-HOWTO, and the ISP-Hookup HOWTO. With this said, it is assumed you have a working PPP or SLIP connection to the Internet. 3. Fetching Your Mail One of the most important aspects of the Internet is e-mail. Instead of telnetting to your ISP, you can download mail locally. There are a number of methods that we'll address here. 3.1 FTPing Your Mail If your ISP runs a form of UNIX, you can simply FTP onto the server using your login and password, change directory over to /var/spool/mail, get your mail, and replace the /var/spool/mail/username with a template empty one. Usually you'll type: ftp sitename Sitename FTP Server (wakkko-serv wver 1.0) username: john password: pass ftp> cd /var/spool/mail ftp> get john ftp> cp ~/empty-mail-template john ftp> exit $ cat john >>/var/spool/mail/john $ rm john and he'll be laughing, but sometimes this inconvenient. Hence the Fetchmail method comes into action and is way more reliable. 3.2 Enter Fetchmail Fetchmail is a program that fetches your e-mail using POP, deletes your mail from the server, and places the new mail into your local mail spool. It's quite easy to use, and is the perferred option for most people. To automate Fetchmail, you use an rc file in your home directory, ` .fetchmailrc '. The basic format of the .fetchmailrc file is outlined below... ### basic .fetchmailrc poll mail.yourisp.com proto pop3 user login_name password your_passwd user login_name with pass your_passwd is your_local_login here ### end Replace the tokens with real information, and place the file in your home directory. You should now be able to start fetchmail. There are two main ways to start fetchmail, one is in its normal form, and the second is daemon. Daemon works in the background as a job and polls for mail at your user defined interval. The other option is if you wish to fetch only unread messages, or the whole lot of them. We'll explain how to implement these options below... fetchmail -a -d -a is the fetch all mail option, default is off -d is the daemon option, after the -d is the seconds between polls for example, I might want to setup Fetchmail in daemon mode, to poll for mail every minute, and fetch all mail. fetchmail -a -d60 For more information on Fetchmail, read it's manual page. 4.0 Pine The rest of the file will be dedicated to Pine, an interactive mail and newsreader for UNIX. For more information, and to download Pine, go to http://cac.washington.edu/pine. 4.1 Sending Mail Open up Pine, and choose Setup - Configuration. Setup your userdomain as the domain in your e-mail address. For example, a fictional e-mail address would be `johnston@slownnet.com'. So, I setup the User Domain as slownet.com. Then we move down to smtp-server. This is the server which you use when sending mail outwards. Fetchmail will handle all inbound mail, but today we'll use Pine to handle outbound stuffs. So, I enter my POP server's name into that box, which in my case would be mail.slownet.com. You should now have working mail and news on your system. The only catch here is that your local login name must corospond to the name you use on your e-mail address. So, johnston's login will have to be johnston on his local machine as well. To many, this shouldn't pose much of a problem. 4.2 Posting/Reading News Usually, while you're online you'll want to browse and post news. If you wish to download news for later browsing, you might be better off going to read the Tiny-News mini-howto. It describes howto setup a small news spool containing only the newsgroups you need. Remember, if you follow these instructions you'll only be able to browse news whilst online. Open up Setup, Configuration in Pine. Move down to nntp-server. Change the default setting over to the name of your ISP's news server. In my case, it was news.slownet.com. News should now be working. 5. Customizing Things Now that we have everything working, it's time to customize your newsgroup layout and the likes. So, let's begin by taking up your Internet connection by whatever means you use, and ping your ISP and ensure that it's working. Now, open up Pine. Go to Folder List (L), then down to News Collection. Press enter to see the expanded list, and type A to subscribe. Control-T to see all groups, and after a few minutes (took me 5 minutes), you'll have a listing of all the newsgroups you can subscribe to. Subscribe to the ones that you need, and exit out of Pine. 6. Everything Should be Working Now, whenever you login and you're on the 'net, type in: $ fetchmail -a -d60 $ and you'll soon start receiving mail. And when your finished on the 'net, just before you bring your connection down, type in: $ fetchmail -q So there you have it folks, a perfectly working Internet Mail/News for the temporary people.