From rkblum on Tue, 15 Dec 1998
Hello Answer Guy!
Thanks for all of your excellent advice. I really enjoy your columns. In your December issue, you had an answer for RoLillack for using Sendmail on a local private network. You mentioned that your network is connected to the Internet via a UUCP hub for mail purposes. I would like to follow-up on that comment.
I do volunteer work at a local K-6 school and we were looking for a similar mail solution. Your answer got the wheels rolling and we think we have a good, inexpensive e-mail solution for the school. The only piece that we are missing is the sendmail.cf file for the UUCP hub. We have not been able to find a good example of how to configure the hub to route all outbound mail to the ISP UUCP host, as well as not do DNS lookups for our clients running Eudora. Unfortunately, we have not been able to find the SendMail book in our local bookstores. We would appreciate any help you could give us in this direction.
I don't know how you'd convince Eudora and other mail user agents not to do DNS queries for MX records. I use a trick with sendmail (specifying an IP address of the form '[192.168.1.x]' --- note the square brackets --- in my nullclient.mc file).
In my case I have an "all Linux" network. The rare occasions when I try to run some MS or Apple based OS around generally don't involve setting them up with access to the Internet and certainly don't involve my trying to read my mail on them.
You might be able to do the same, or you might have to create a DNS server that "claims" to be authoritative for the root domain (then one called ".").
I've heard of people setting up these sorts of disconnected DNS zone but I don't have an example handy. I'd suggest grabbing the DNS HOWTO and searching through the archives of the Linux-admin list for some suggestions on that.
Incidentally I hear there are some pretty good Linux Users' Groups in Indiana. Sadly I note that there is no SAGE (SysAdmin's Guild) chapter for your area. USENIX/SAGE is hoping to greatly expand the number of SAGE local chapters around the world and across the country in the near future. All it takes are a few professional system administrators to get together (SAGE is OS neutral, though the membership shows a decided preference for Unix-like systems).
As for my particular setup, here's the M4 config file from one of my clients:
divert(0)dnl VERSIONID(`@(#)clientproto.mc 8.7 (Berkeley) 3/23/96') OSTYPE(linux) FEATURE(nullclient, `[192.168.1.3]')
... that's all you need. You can then use m4 to generate a /etc/sendmail.cf file from this (as I've described in past columns. Newer versions of sendmail provide a 'makefile' to make this generation step even easier.
The effect of this .mc file is to forward all mail to my mail hub (which is the mail store for my LAN and is the gateway to the rest of the world).
On my client workstations I retrieve mail using 'fetchmail' (via POP-3). Thus if I mail 'star' (my wife) the mail gets sent to 'antares' (the hub) even though she has an account on the local host. This means that she, my father, and others with accounts on my workstation, don't need to maintain .forward files on 'canopus' or any of the other workstations around the house. All of their mail (and mine for that matter) gets sent to antares.
My mail gateway's .mc file looks like:
divert(-1) divert(0)dnl include(`../m4/cf.m4')dnl VERSIONID(`$Id: 66.html,v 1.2 2002/10/09 22:24:36 lg Exp $ by James T. Dennis, Starshine.org $Date: 2002/10/09 22:24:36 $') OSTYPE(`linux') FEATURE(`allmasquerade')dnl FEATURE(`masquerade_envelope')dnl FEATURE(`always_add_domain')dnl FEATURE(`nodns')dnl FEATURE(`nocanonify')dnl FEATURE(`local_procmail')dnl FEATURE(`uucpdomain')dnl MAILER(`smtp')dnl MAILER(`uucp')dnl MAILER(`procmail')dnl MAILER(`uucp')dnl MASQUERADE_AS(`starshine.org')dnl undefine(`BITNET_RELAY')dnl define(`confDEF_USER_ID',"8:12")dnl define(`SMART_HOST', `uucp-dom:XXXX')dnl
On this last line I have the name of my UUCP provider listed in place of those X's. By defining a mailer and host pair for my SMART_HOST I force 'sendmail' to deliver all of my non-local mail to my UUCP provider through the "uucp-dom" mailer. "uucp-dom" is a mailer that delivers mail via uucp even though it uses "domain style" (DNS) address syntax.
This last file is probably a bit more elaborate than you actually need --- and it's simplified a bit for this example.
(I actually use the "mailertable" FEATURE to trick the system into deliver mail that appears to be to one of my LAN hosts into delivering it to a virtual hosted mail server that's really maintained by my ISP).
Thanks again for all of your great answers!
Trader's Point Christian Schools
I'm glad I could help. You are right, UUCP is still a good way to get e-mail and netnews without getting a full Internet connection and without having the connection used by web browsing or other protocols which you might prefer not to run into your site. (Conversely it's also a great way to preserve your PPP bandwidth to interactive uses while your mail and/or news gets spooled quietly away for other times).
From rkblum on Wed, 16 Dec 1998
Thanks for your quick response and acurate answers! The sendmail.cf sample you sent was exactly what we needed. I think that I unneccessarilty muddied the waters with my Eudora question. It turned out that it was not a DNS problem with Eudora, it was my mistake of not having the IP addresses in the ip_allow. The Eudora clients work fine now. I have asked our local bookstore to order the SendMail book for me - I think I need it!
Thanks again for your help - keep up the good work!