Date: Sun, 17 May 1998 12:42:57 -0500 (CDT) From: Dave Bodenstab <imdave@mcs.net> To: freebsd-questions@FreeBSD.ORG, kline@thought.org Subject: Re: mail//sendmail question Message-ID: <199805171742.MAA06420@base486.home.org>
next in thread | raw e-mail | index | archive | help
> From: Gary Kline <kline@thought.org>
>
> Very few things left to get my private (illegal?!) network functional.
> One thing is: How can I get email working from my P90 across to my
> 8x86?
>
> If I say ``mail myfriend@10.0.0.2'' or the like, zip. Is there some
> somemail configuration to achieve this magic? Or smail3.X?
I've got two machines set up similarly. I tinkered with sendmail and never
was able to prevent it from doing DNS lookups. I finally wound up running
a local name server. As with sendmail, I tinkered with the configuration
files until I got it to work. I read ``Unix System Administration Handbook''
by Nemeth, etc. but I still don't fully understand everything. I'll include
all my configuration files for sendmail and named in the hope they're useful
to you (and maybe someone more knowledgeable can critique them.)
My two machines are a 486 (base486.home.org) that is my ``primary'' machine --
it runs named, and also dials my ISP with "ppp -alias". The machine is known
as imdave.pr.mcs.net in the real world when connected to my ISP. The other
machine I call "base586.home.org" -- a flakey-when-using-floating-point-instructions
Cyrix 6x86 CPU. I've also got a couple of old machines connected by serial
ports using uucp.
ISP (mcs.net)
|
|
205.164.3.77 (imdave.pr.mcs.net)
|
+--|--------+ +-------------+
| ppp | | |
| | | |
| ne2000 --- 10.0.0.1 -------------------- 10.0.0.2 --- ne2000 |
| | (base486.home.org) (base586.home.org) | |
| cuaa4 | | |
+--|--------+ +-------------+
|
unixpc
The contents of all the following files will be indented with two spaces.
First, /etc/hosts.
For base486.home.org:
127.0.0.1 base486.home.org localhost.home.org base486 localhost
10.0.0.2 base586.home.org base586
For base586.home.org:
127.0.0.1 localhost.home.org localhost
10.0.0.1 base486.home.org base486
10.0.0.2 base586.home.org base586
Second, the sendmail configuration files. Do I need the mailertables? Do I need
the relaytable? I don't know or remember why I thought I need them -- but it seems
to works for me mostly.
For base486.home.org:
base486.mc:
divert(-1)
#
# Process with:
# gm4 m4/cf.m4 base486.mc >sendmail.cf
#
divert(0)
VERSIONID(`@(#)base486.mc $Revision: 1.1 $')
OSTYPE(bsd4.4)dnl
MASQUERADE_AS(mcs.net)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(redirect)dnl
FEATURE(`mailertable',hash -o /etc/mailertable)dnl
define(`confCHECKPOINT_INTERVAL', 4)dnl
define(`confAUTO_REBUILD', True)dnl
define(`confMIME_FORMAT_ERRORS', False)dnl
define(`confTO_QUEUEWARN', 12h)dnl
define(`confQUEUE_LA', 4)dnl
define(`confREFUSE_LA', 6)dnl
define(`confMAX_DAEMON_CHILDREN', 4)dnl
define(`confCONNECTION_RATE_THROTTLE', 4)dnl
Cwimdave.pr.mcs.net
EXPOSED_USER(root bin uucp guest test)dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(uucp)dnl
dnl LOCAL_USER(root)dnl
dnl LOCAL_USER(bin)dnl
dnl LOCAL_USER(imdave)dnl
LOCAL_CONFIG
SITECONFIG(uucp.base486, base486, U)dnl
FR-o /etc/relaytable
LOCAL_RULESETS
Scheck_rcpt
# anything terminating locally is ok
R$* $: $>Parse0 $>3 $1
R$+ < @ $* . > $* $: $1 < @ $2 >
R$+ < @ $=w > $@ OK
R$+ < @ $=R > $@ OK
# anything originating locally is ok
R$* $: $(dequote "" $&{client_name} $)
R$=w $@ OK
R$=R $@ OK
R$@ $@ OK
# anything else is bogus
R$* $#error $: "550 Relaying Denied"
# database of known spammers
Kspammers hash /etc/spammertable
LOCAL_RULESETS
Scheck_mail
# check for valid domain name (incompatible with DeliveryMode=defer)
R$* $: <?> $>3 $1 make domain canonical
R<?> $* < @ $+ . > $: <OK> tag resolved names
R<?> $* < @ $+ > $#error $: 451 Domain must resolve
# check relay against spammers database
R$* $: $(spammers $&{client_name} $: OK $)
ROK $@ OK
R$+ $#error $: 551 $1
mailertable:
base586 smtp:[base586]
base586.mcs.net smtp:[base586]
uucp.base486:
SITE(unixpc)
relaytable:
base586.home.org
For base586.home.org:
base586.mc:
divert(-1)
#
# Process with:
# gm4 m4/cf.m4 base586.mc >sendmail.cf
#
divert(0)
VERSIONID(`@(#)base586.mc $Revision: 1.1 $')
OSTYPE(bsd4.4)dnl
MASQUERADE_AS(mcs.net)dnl
FEATURE(masquerade_envelope)dnl
FEATURE(nodns)dnl
FEATURE(`mailertable',hash -o /etc/mailertable)dnl
FEATURE(redirect)dnl
define(`confCHECKPOINT_INTERVAL', 4)dnl
define(`confAUTO_REBUILD', True)dnl
define(`confMIME_FORMAT_ERRORS', False)dnl
define(`confTO_QUEUEWARN', 12h)dnl
define(`confQUEUE_LA', 4)dnl
define(`confREFUSE_LA', 6)dnl
define(`confMAX_DAEMON_CHILDREN', 4)dnl
define(`confCONNECTION_RATE_THROTTLE', 4)dnl
define(`SMART_HOST', relay:base486.home.org)dnl
define(`UUCP_RELAY', relay:base486.home.org)dnl
EXPOSED_USER(root bin uucp guest test)
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(uucp)dnl
LOCAL_USER(root)dnl
LOCAL_USER(bin)dnl
LOCAL_USER(imdave)dnl
mailertable:
base486 smtp:[base486]
base486.mcs.net smtp:[base486]
Now for named (on base486).
/etc/namedb/named.root was originally fetched from
ftp://FTP.RS.INTERNIC.NET/domain/named.root
/etc/namedb/named.boot:
directory /etc/namedb
cache . named.root
primary home.org home.org
primary 0.0.10.IN-ADDR.ARPA home.org.rev
primary 0.0.127.IN-ADDR.ARPA localhost.rev
forwarders 192.160.127.90 192.160.127.125 128.248.2.50
/etc/namedb/home.org:
@ IN SOA base486.home.org. imdave.base486.home.org. (
19980107 ; Serial
3600 ; Refresh
300 ; Retry
3600000 ; Expire
604800 ) ; Minimum
IN NS base486.home.org.
IN A 10.0.0.1
IN HINFO "i486DX/66" "FreeBSD 2.0.5"
IN MX 0 base486.home.org.
base486 IN A 10.0.0.1
IN HINFO "i486DX/66" "FreeBSD 2.0.5"
IN MX 0 base486.home.org.
localhost IN A 127.0.0.1
base586 IN A 10.0.0.2
IN HINFO "Cyrix 6x86/155+" "FreeBSD 2.2.5"
IN MX 0 base586.home.org.
base286 IN MX 0 base486.home.org.
unixpc IN MX 0 base486.home.org.
/etc/namedb/home.org.rev:
@ IN SOA base486.home.org. imdave.base486.home.org. (
19980107 ; Serial
3600 ; Refresh
300 ; Retry
3600000 ; Expire
604800 ) ; Minimum
IN NS base486.home.org.
IN HINFO "i486DX/66" "FreeBSD 2.0.5"
1 IN PTR base486.home.org.
IN HINFO "i486DX/66" "FreeBSD 2.0.5"
2 IN PTR base586.home.org.
IN HINFO "Cyrix 6x86/155+" "FreeBSD 2.2.5"
/etc/namedb/localhost.rev:
@ IN SOA base486.home.org. imdave.base486.home.org. (
19980107 ; Serial
3600 ; Refresh
300 ; Retry
3600000 ; Expire
604800 ) ; Minimum
IN NS base486.home.org.
1 IN PTR localhost.home.org.
IN HINFO "i486DX/66" "FreeBSD 2.0.5"
Well, there they are. They mostly work for me. One thing I've not gotten
to work properly is doing a uucp mail from my old system V box to base586.home.org.
It may be because sendmail isn't configured properly somewhere along the line,
but I haven't spent any more time tinkering. I'm also very unclear with respect
to the MX stuff. Anyway, good luck.
Dave Bodenstab
imdave@mcs.net
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805171742.MAA06420>
