LINK="#3366FF" VLINK="#A000A0">

"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
Starshine Technical Services, http://www.starshine.org/


(?) Sendmail on private net with UUCP link to Internet

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!

Rich Blum
Trader's Point Christian Schools
Indianapolis, Indiana

(!) 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).

(?) Re(2): Sendmail on private net with UUCP link to Internet

From rkblum on Wed, 16 Dec 1998

Jim -

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!

Rich Blum


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 36 January 1999


[ Answer Guy Index ] a b c 1 2 3 4 5 6 7 9 10 11 12
15 16 18 19 20 21 22 23 24 25 26 27 28
29 31 32 33 34 35 36 37 38 39 40 41 42 44
45 46 47 48 49 50 51 52 53 54 55 56 57 60 61 62 63 64 65 66
67 69 72 76 77 78 79 80 81 82 84 85 86 87 91 94 95 96 97 98


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]