Path: samba.oit.unc.edu!concert!gatech!howland.reston.ans.net!wupost!uunet!ogicse!netnews.nwnet.net!bach.seattleu.edu!quick!victrola!root From: vince@victrola.sea.wa.us (Vince Skahan) Newsgroups: comp.os.linux.announce Subject: UUCP-NEWS-MAIL-FAQ: Linux UUCP/News/Mail Frequently Asked Questions Message-ID: Date: 28 Jun 93 07:03:11 GMT Article-I.D.: victrola.Linux-usenet-faq_741250983 Expires: Mon, 26 Jul 1993 07:03:03 GMT Sender: root@victrola.sea.wa.us (Vince Skahan) Reply-To: vince@victrola.sea.wa.us (Vince Skahan) Organization: Vince and Suzie's Underpowered PC Lines: 739 Approved: linux-announce@tc.cornell.edu (Matt Welsh) Supersedes: Last modified: Jun 22, 1993 Most recent changes: - minor stuff How can I read this (long) FAQ productively ? ---------------------------------------------- [...from Edwin Kremer - Edwin.Kremer@cs.ruu.nl ...] While in nn reading mode, try hitting G% Introduction ------------ It seems that the same questions regarding the design philosophy and the care-and-feeding of uucp, mail, and news software keep coming up as people join the list of Linux users who want to get their systems attached to Internet or USENET. The intent of this document is to answer some of the questions and comments that appear to meet the definition of 'frequently asked questions' regarding uucp, mail, and news software and Linux in general (and the versions in the SLS distribution in particular). Note - I've done some very minor editing of the portions of this document that have been generously provided by others. If I've forgotten to note the contributions of others, my apologies... Comments, corrections, and suggestions (via e-mail only) are welcomed... ~From: vince@victrola.sea.wa.us (Vince Skahan) ~Subject: UUCP-NEWS-MAIL-FAQ: Caveats ------------------------------------ Please do not even bother to try to become a *nix USENET site unless you're willing to try to learn a lot. It's not trivial if you're not willing to make the effort. If you spend that time at the beginning, you can run a full-fledged site with almost no sustaining labor required. For what it's worth, I recommend that all USENET admins: 1. read the news.admin hierarchy and news.answers. 2. learn what's in the 'how to find sources' FAQ and how to get sources, files, and FAQs via e-mail, uucp, and ftp 3. lean on your more experienced uucp neighbors to help you 4. participate in the news.* hierarchy and the comp.mail.* hierarchy on USENET. Just reading them will eliminate most of the frequently-asked-questions you'll come up with. 5. buy 'Zen and the Art of Internet' or the 'Whole Internet Guide' from a local technical bookstore so you learn what you're connecting to. Previous versions of 'Zen' are available via anon-uucp on the Internet (use archie for locations). 6. buy 'Managing UUCP and USENET', which is, in my opinion, the best book out there for figuring out the programs and protocols involved in being a USENET site. 7. buy 'Unix Communications' for a nice description of all the pieces (and more) and how they fit together. 8. read 'How to Become a USENET Site' in news.answers before you go to the trouble of becoming one. 9. realize that you'll be lost at the beginning and don't let it bother you. Please don't expect the care and feeding of USENET uucp, news, and mail to be spoon-fed to you. It won't happen. You'll need to spend time learning. You should probably spend money buying some of the fine books out there for the reading. Please don't think that this is Prodigy or something where somebody gives you preset software and a phone number and you're online. ~From: vince@victrola.sea.wa.us (Vince Skahan) ~Subject: UUCP-NEWS-MAIL-FAQ: Software currently known to work with Linux ------------------------------------------------------------------------- SLS v1.02 currently contains the following: UUCP - Taylor UUCP 1.04 News transport - Cnews 12/22/91 patchdate (no 'optional' speedups) News readers - tin-1.1r8, trn-2.5, nn-6.4.18 Mail transport - smail3.1.28 with uucp and smtp support built-in Mail program - elm2.4.21 with domainized headers built-in The following software is ready for Peter to integrate into a future version of SLS (so stay tuned): Mail transport - elm2.4.22 News readers - tin1.1p0 Other software known to work under Linux, but not currently available in the SLS distribution (and not planned to be at this time: nntp - nntp 1.5.11 'reference' release, slurp v1.05 nntp readers - rrn at least, trn/waffle/nn also newsreaders - trn3.0, tass INN - INN v1.4 with some minor patching Cnews - 2/93 'performance' release (with minor patching) mail transport - sendmail5.65c+IDA, smail2.5 mail agents - pine others - dynafeed ~From: vince@victrola.sea.wa.us (Vince Skahan) ~Subject: UUCP-NEWS-MAIL-FAQ: Paths used in SLS Distribution ----------------------------------------------------------- 0. Where did those lame paths come from ? The paths in the SLS distribution are the 'SLS standards', which means that some people like them, some people don't. For what it's worth, I'm not totally thrilled with the paths in SLS either, but I'm providing the software to him with the paths he requested (as a result of one of the c.o.l. flame-wars-from-hell regarding everybody's religious views on "the one true directory structure"). Consider living with the paths used in SLS until you get to the point where you want to build everything from sources. It's a small price to pay in order to get a 'plug-and-play' system. 1. I don't like the paths you used. What can I do about it ? It's your system. You can do anything you want with it if you're willing to spend the time to learn how to do so... Get the sources and set them to whatever you'd like. Using a binary editor to set the pathnames is *NOT* recommended since there are paths in many binaries, config files, and shell scripts. It's unlikely that you'll find them all. The config files used for all of the news/mail/uucp programs in SLS are available on sunsite.unc.edu as newspak14.taz 2. But now that I changed the paths in part-A, something else doesn't work... As the saying goes..."you broke it, you bought it". If you change the paths, change all the pieces to match (or add symbolic links). ~From: vince@victrola.sea.wa.us (Vince Skahan) ~Subject: UUCP-FAQ: Care and Feeding of UUCP ----------------------------------------------------- 0. How does uucp work ? Please run...do not walk...to your local technical bookstore and pick up a copy of any or all of the books mentioned at the top of this article. HDB and V2 UUCP are incredibly well documented in about every book you can find on *nix communications and you'll find that in general you can follow the instructions in your favorite *nix vendor's manuals. Taylor uucp is documented in the /usr/local/emacs/info/uucp* files (that's where they are here at least) in 'info' format. [...there's a nice *small* info program in source form available as a kit named 'infosrc' on the SLS t-disks to help reading the Taylor info files...] If you have questions regarding the care-and-feeding of uucp, please take them to the comp.mail.uucp group that's designed for such questions. There's also a Taylor UUCP mailing list. To quote the Taylor 1.04 README file: " There is a mailing list for discussion of the package. To join (or get off) the list, send mail to taylor-uucp-request@gnu.ai.mit.edu. Mail to this address is answered by a person, not a program. When joining the list, make sure you include the address at which you want to receive mail in the body of your message. To send a message to the list, send it to taylor-uucp@gnu.ai.mit.edu. " 1. Why is SLS uucp configured in HoneyDanBer mode rather than 'Taylor' mode? Because IMHO it's the de-facto standard UUCP implementation at this time. There are thousands of sites with experienced admins and there are many places you can get incredibly good information concerning the HDB setup that include: - many, many vendors' networking and uucp docs - the normal *nix magazines and periodicals - the fine (!) O'Reilly and Associates handbooks 2. But I want Taylor mode, dammit! The uucp-1.04 that's in SLS has all three modes of config files built in. While I can't test it, I did 'rtfm' and Ian Taylor tells me that what I did should work. Please let me know... The search order for config files is Taylor...then V2 (L.sys)... then HDB. Use the uuconv utility in /usr/lib/uucp to convert config files from one mode to another. If you can't wait, grab the sources for uucp and specify HAVE_BNU_CONFIG, HAVE_V2_CONFIG *and* HAVE_TAYLOR_CONFIG in the policy.h file and type 'make'. 3. Why do I get 'timeout' on connections when I upgraded to uucp-1.04 ? [... from Ed Carp - erc@apple.com ...] If you use a 'Direct' device in the Devices file, there's now a 10 second timeout compiled in. Make the name of the Device anything other than 'Direct'. If you tweak the example /usr/lib/uucp files provided with SLS, you won't have problems with this one. 4. Sample config files Working HDB mode config files for kernels of 0.99-4 and before are in the SLS distribution. For kernels above 0.99-4, it is suggested that you use the cuaNNN devices in the /usr/lib/uucp/Devices file. No other changes are necessary. 5. Why doesn't anonymous uucp seem to work ? The SLS anonymous uucp only works in Taylor mode because it's compiled with HAVE_TAYLOR_CONFIG. If you want to do anon uucp in HDB mode, you'll have to recompile the sources with just HDB defined. Ian Taylor is considering which way to deal with this 'feature'... ~From: vince@victrola.sea.wa.us (Vince Skahan) ~Subject: NEWS-FAQ: Newsreaders ---------------------------------------- 0. What newsreader is best ? No way I'll open that can of worms other than to say that you definitely want something with "kill files" and probably want something with 'threads'. All the newsreaders in SLS have both in one form or another. For what little it's worth, I use 'nn'. In general, please take your newsreader questions to one of the following groups: news.software.readers - covers all newsreaders news.software.nn - for the 'nn' reader specifically Multiple newsreaders are provided in SLS because people have different tastes. You only need one newsreader installed if that's all you use... 1. trn - why do I get the message 'dbinit failed' ? Because you didn't run mthreads from cron to keep the threads database up-to-date. This may be less of an issue when trn3.0 comes out. 2. nn - why is my database getting continuously corrupted ? If you built it from sources and you asked for the 'words' method of building the database, it will definitely get corrupted if your filesystem doesn't handle long filenames (ie...comp.os.linux.announce is more than 14-characters). Build it with the 'by-number' way of creating the database and you'll be fine. 3. I can't post to moderated groups, why ? Probably because the newsreader is trying to call /bin/mail to send the mail and it doesn't like it. Replace the /bin/mail in SLS with the port of mailx-5.3a.tar.z from the pub/Linux/system/Mail dir on sunsite.unc.edu and make it mode 2755 and group mail (like 'elm') and you'll be all set. Another possibility is that you have a moderated newsgroup set up on your local system as not-moderated and somebody upstream is quietly deleting the article (some system's software, not a person). Make sure you run a 'checkgroups' every now and then when the checkgroups article rolls by in news.admin every few weeks. ~From: vince@victrola.sea.wa.us (Vince Skahan) ~Subject: NEWS-FAQ: News Transport ------------------------------------------- 0. How do I run C-news software ? Once again, drop a dime for the book(s) above. Questions regarding C-news should go to the news.admin hierarchy of groups or to news.software.b and not to comp.os.linux. 1. Why do I have problems that appear to be permission-related ? Because until very recently, SLS didn't have a 'news' username or group in the default passwd/group files. All the stuff in /usr/local/lib/news should be news.news except /usr/local/lib/news/setnewsids which should be setuid root. You can use whatever UID and GID you want for 'news'. 2. Why can I post articles locally, but they don't get fed downstream ? Probably because you didn't call newsrun from cron. Maybe because you edited your sys file and messed it up. There are examples of each in the SLS /usr/local/lib/news directory. Maybe because you don't have a /usr/spool/news/out.going tree or something. Do not create newsgroups or feeds by editing the active or sys files. Use the utilities in /usr/local/lib/news/bin/maint to do it. 3. Why doesn't SLS have the 'Performance Release' of C-news? Because it's optional. Because it has problems under Linux in some places. Because the one in SLS is more stable and plenty fast enough on any type of reasonable system (IMHO). If you need any more convincing, here's a few excerpts from the C-news README.new file: "This is the 20 Feb 1993 Performance Release of C News, a minor update to the 2 May 1992 P.R. that just fixes some installation problems and a couple of annoying bugs"... "This release is more or less a halfway step to what we've been calling the "cleanup release"... "People who are happy with the older C News might want to wait for the cleanup release, which is still coming although behind schedule"... 4. Why doesn't SLS have nntp ? Because it's supposed to be plug-n-play under Linux and because I didn't want to make SLS's news stuff doubly big by having to maintain both nntp and non-nntp versions of the newsreaders and news transport programs. Also because it compiles in localized information that is not overridable at runtime via a config file. 5. Why doesn't SLS have INN ? Because it's too new and hasn't settled down totally yet (IMHO). It works with some patches required from what I hear. Also because C-news seems to be the current 'standard'. INN1.4 and some linux-specific patches to get around some tcp-ip growing pains are available on the various linux archive sites. 6. Why does doexpire (or relaynews or...) say "severe space shortage" when there's lots of room ? Because it can't read /etc/mtab. Make it mode 644. This happens when you unmount a mounted filesystem by root with a umask that doesn't permit world-read of files owned by root. 7. Why does everything look normal, but posting doesn't happen ? Older versions of Linux had a 'broken' sed that C-news was prone to blow up. In particular, if you've installed over an old SLS, be sure to check /bin and /usr/bin to be certain you have only one copy of sed and that it's a modern one. ~From: mdw@tc.cornell.edu (Matt Welsh) ~Subject: NEWS-FAQ: how to setup nntp newsreading ------------------------------------------------ 0. Why can't we have a binary distribution of NNTP ? Because significant local-only information is compiled-in and cannot be determined auto-magically at runtime. 1. How do I set up NNTP to allow read/post across the network while *not* storing any news articles or databases locally. 1) Grab the 'reference implementation' of nntp and a copy or rn from your local archive site. If you connect to ftp.uu.net you'd grab: nntp.1.5.11.tar.Z from ftp.uu.net:/news/nntp rn-4.4.pl3.tar.Z from ftp.uu.net:/news/rn 2) compile nntp as follows: copy common/conf.h.dist to common/conf.h. Edit common/conf.h to set certain options: The only ones I set were: DOMAIN: undefine it (i.e. change the line to #undef DOMAIN). REALDOMAIN: Define this. It looks up the domain using the libraries. SERVER_FILE: Set this to the name of the file which will contain the hostname of the news server (i.e. the machine you'll read and post news through). I use "/usr/local/lib/news/server". PASSFILE: If your news server requires authorization (i.e. some kind of username/password) to post, set this to the name of the file which contains the username and password (described below). I use "/usr/local/lib/news/nntppass". I decided to keep all of the other news stuff in /usr/local/lib/news. So I set all of the rest of the pathnames in the file (i.e. ACTIVE_FILE, NEWSGROUPS_FILE, etc.) to use /usr/local/lib/news. Many of these files are only used by the NNTP server, not the client, but to be safe I changed them all to point to the right directory. You can of course use the default pathnames; just make sure you create the directory accordingly. 3) Create the user "usenet" if you haven't already. The inews program runs as this user. All you need is a userid; you don't need a home directory or shell or anything for the user. Just plop the following line into your /etc/passwd: usenet:*:13:1::/: Make sure you set the userid ("13", above) to something unique. The group can be anything; I use "daemon" (gid 1). 4) Create the SERVER_FILE, above. For example, my news server is "wonton.tc.cornell.edu", so I created the file /usr/local/lib/news/server which contained one line: wonton.tc.cornell.edu 5) Create the PASSFILE. This file contains lines of the form Let's say that your news server (the one in SERVER_FILE, above) is "shoop.vpizza.com", and to post on that machine you need to be authorized as the user "news" with a password of "floof". Thus, in the PASSFILE (I use /usr/local/lib/news/nntppass), you need the line shoop.vpizza.com news floof 6) Make this file secure! The inews program runs as the user "usenet", so make this news directory owned by that user and the nntppass file as well. chown usenet /usr/local/lib/news chmod 755 /usr/local/lib/news chown usenet /usr/local/lib/news/nntppass chmod 600 /usr/local/lib/news/nntppass So nobody else can read this file. No, the passwords in it are not encrypted. 7) Go back to the nntp.1.5.11 source directory; issue "make client". At this point you'll build the NNTP version of inews, which is the only software used by the NNTP client. When I built inews, there was a bug in the library which caused the function uname() in uname.c to call itself eternally. This should be gone now; however, if inews seems to hang and your system starts slowing down *a lot* you should rename the function "uname()" in uname.c to something like "my_uname()", and change the calls to it (in inews.c) to call my_uname() instead. Mail me if you run into this problem. [...VDS note - this means mail to Matt...not me :-) ...] 8) Issue "make install_client". This will install the inews stuff. Also make the link /usr/local/lib/news/inews -> /usr/local/bin/inews Now you should be able to happily post (by hand). Try something like the following: $ inews -h << EOF Newsgroups: misc.test From: me@foo.bar.com Subject: Testing Reply-To: my-real-address@wherever.edu This is a test. EOF If this works, inews should post the article. You'll know because test-responders on misc.test will reply to the address on the Reply-To line, above. Please don't do test postings on real groups, like c.o.l. :) 2. How do I build 'rrn' as a nntp-based newsreader/poster ? 1. cd to the rn source directory and do "./Configure". For almost all the questions, take the defaults (it's very smart). Make sure you have a link to "cpp" (usually in /usr/lib/gcc-lib/i386-linux/2.3.3) in /lib, so rn can find it. - Don't panic if it says you're on a NeXT or a USG system. Just go with the flow... - Answer "y" to "Do you expect to run these scripts and binaries on multiple machines?" - For your domain name: if your system is, say, "foo.bar.com", answer with just "bar.com" (the domain, not the entire hostname). - Answer "usenet" for the name of the user which is the news admin. - For "Where is your news library?" use the directory where the above NNTP files are kept: I use /usr/local/lib/news. - Man page source is in /usr/man/man1. - Answer "y" to "Does your /etc/passwd file keep full names in Berkeley/V7 format?" - Answer "gcc" to the name of the compiler which forces resolution. - Answer "y" to "Do you want to build the NNTP version of rn (rrn)?" - For the name of the news server file: use the same name you used when building inews, above (for me, /usr/local/lib/news/server). Don't run makedepend yet! Go to the next step: 2) Edit config.h. Change the "#define ROOTID ..." line to #define ROOTID 0 if it isn't already. 3) In rrn-4.4.pl3, there is a small bug with SIGEMT: it doesn't exist on Linux. rn used SIGEMT to check if a process is still running; however, under POSIX.1 we can instead just send the process a signal 0. Edit init.c. On line 243, note the following: if (kill(processnum, SIGEMT)) { Change this to if (kill(processnum, 0)) { You may wish to #ifdef it out instead; it's up to you. Don't just define SIGEMT to be zero; this will break the sigignore() call in final.c. 4) Issue "makedepend > makedepend.out". 5) Issue "make". Rn should compile happily. 6) Issue "make install". You're all set. Keep in mind that rn does in fact eat a lot of memory (as does any newsreader), handling the newsgroups file. So when you first run rn, it might be a little slow building your .newsrc and checking for new groups. If you're impatient, copy a .newsrc from somewhere else and use that. ~From: vince@victrola.sea.wa.us (Vince Skahan) ~Subject: MAIL-FAQ: Mail and Mail Transport ----------------------------------------------------- 0. How do I get my system a mail feed ? Sigh...please see the "how to become a USENET site" periodic posting in news.answers Questions regarding 'elm' should go to comp.mail.elm with smail questions going to either comp.mail.uucp (I guess) or the smail mailing list (mail to smail3-users-request@cs.athabascau.ca). 1. Why is my hostname.domainname not in my headers and something funky's there ? Because you didn't edit one or more of the following files like the README.linux files in the lib directories told you to: /usr/local/lib/smail/paths /usr/local/lib/smail/config /usr/local/lib/elm/elm.rc 2. How can I run smail as a smtp daemon ? [...from Martin White - martin@pandora.demon.co.uk...] On my system, I've included the following line in the file '/etc/inet/inetd.conf' so that when a remote host trys to deliver mail to me, inetd starts up smtpd, which delivers the mail and shuts itself down afterwards. smtp stream tcp nowait root /usr/bin/smtpd smtpd Outgoing mail gets sent automatically, when using elm. If my internet link is down when I send mail (it's a dialup link), then the mail sits in '/usr/spool/smail/input'. When the link next comes up, 'runq' is run which causes the mail to be sent. 3. Why don't some of my aliases seem to work in certain cases ? Because the /bin/mail in SLS isn't from smail and it uses a different aliases file. There is a port of mailx on sunsite.unc.edu in the pub/Linux/system/Mail directory that is a wonderful drop-in replacement for the /bin/mail in SLS. I highly recommend it. SLS's smail uses /usr/lib/aliases for the aliases file. Remember that elm aliases (/usr/local/lib/elm/aliases.text) are only good for 'elm' and that smail (or sendmail) aliases are *always* in effect. 5. Why don't the smail 'utilities' work ? Because you have the old 'broke' smail from SLS that got in there before the following answer appeared. The current SLS smail should be ok. [... from Ralf Sauther - ralf@ppcnet.ppc.sub.org ...] If you're building smail from sources, you need to have CASE_NO_NEWLINES=true in your os/linux file. 6. Why can't elm write to my mailbox ? You need elm and filter to be mode 2755 and group mail and also have /usr/spool/mail mode 775 and group mail. 7. What should my config files look like? That's a big subject :-) For a uucp-only system that has a MX-record and that wants a domainized header (who goes through a smart-host for everything), these are the entire config files you'll need: replace 'subdomain.domain' with your domain name replace 'myhostname' with you un-domainized hostname replace 'my_uucp_neighbor' with the uucp name of your upstream site #-------- /usr/local/lib/smail/config ----------------- # # domains we belong to visible_domain=subdomain.domain:uucp # # who we're known as (fully-qualified-site-name) visible_name=myhostname.subdomain.domain # # who we go through smart_path=my_uucp_neighbor # #---------- /usr/local/lib/smail/paths -------------- # # we're a domainized site, make sure we accept mail to both names myhostname %s myhostname.subdomain.domain %s # #---------- /usr/local/lib/elm/elm.rc ------------------ # # this is the unqualified hostname hostname = myhostname # # this is the local domain hostdomain = .subdomain.domain # # this is the fully qualified hostname hostfullname = myhostname.subdomain.domain # #-------------------------------------------------------- 8. Why did my incoming mail and news appear to fall into a black hole ? [... from Roy M. Silvernail - roy@sendai.cybrspc.mn.org ...] When you add /bin/rnews (or whatever) to Permissions, separate the commands with colons, not commas. uucheck will give a perfectly sensible response for the allowed programs list with a comma, but uuxqt thinks the only allowable command is "/bin/rmail,/bin/rnews". When configured right, the list presented by uucheck has spaces between allowed commands. 9. Is sendmail+IDA available for Linux instead of smail ? Yes !!! I've switched from smail to sendmail+IDA from the binary distribution on sunsite.unc.edu and it works great...and I'm a uucp-only site. Look in pub/Linux/system/Mail for it... To install it... - you'll probably want to remove (or rename) all the files from smail (see the /install/installed directory if you are SLS) to be safe. - cd to / then 'gunzip -c sendmail5.65c+IDA.tpz | tar xvf -' - cd to /usr/local/src/sendmail5.65c+IDA/ida/cf and copy the example local.m4 file to 'yourhostname.m4'. Edit out the distributed hostname, aliases, and smarthost and put in the correct one for your site. The default file is for a uucp-only site who has domainized headers. Then 'make yourhostname.cf' and move the resulting file to /etc/sendmail.cf - if you are uucp-only, you do *NOT* need to create any of the tables mentioned in the README.linux file. Just edit the .m4 file, make sendmail.cf, and start testing it. - if you're uucp-only and you talk to sites in addition to your 'smart-host', you'll need to add uucpxtable entries for each (or mail to them will also go through the smart host) and run dbm against the revised uucpxtable. Another nice thing is that if you have mail.debug set and you run syslogd, your incoming and outgoing mail messages will get logged. See the /etc/syslog.conf file for details. ~From: vince@victrola.sea.wa.us (Vince Skahan) ~Subject: UUCP-NEWS-MAIL-FAQ: So where are the sources ? ------------------------------------------------------- 0. Why don't you provide ALL the sources ? Because it's a waste of time and money for all involved to duplicate sources on the linux archive sites that can be found elsewhere. Since stuff compiles so cleanly, in general you just need to get the config files and apply them to the vanilla sources. Look in the newspak directory on sunsite.unc.edu for the README.linux guides and the config files you'll need. There are very (!) few patches needed these days to get uucp/news/mail up and running. The current filename is sunsite.unc.edu:/pub/Linux/system/Mail/newspak-1.4.tar Once you get the binaries working, it's well worth your time to actually build them from the sources. There is considerable documentation in the sources that doesn't get "installed" that helps fill in the blanks between what you need to know, and what you can figure out. Also, being able to build them from the sources allows you to be able to do things like upgrade to more recent patchlevels and/or change the paths used to fit your schedule and needs if (and only if) it's worth it to you. 1. How long are you going to keep providing the binary distributions for SLS and the config files for the sources ? Not too much longer. Linux, gcc, and the gcc-libs are stable and robust enough that you can basically run Configure and type make and be all set (with very few exceptions)...