SUMMARY - Sparc 20 mail client x Sparc 2 mail host

From: Paulo Henrique Schindler (pauloh@inf.puc-rio.br)
Date: Wed Jul 26 1995 - 08:28:34 CDT


Hi Sun-Managers,

My original question:

> I'm having some problems in configuring a Sparc 20 (Solaris 2.4) to work as
> a mail client of a Sparc 2 (SunOS 4.1.1B). The problem is that the Sparc 20
> tries to deliver local mail instead of forwarding the mail to the Sparc 2 for
> delivery. Non-local mails work fine: SP20 finds out that the SP2 is the
> mailhost and forwards the mail to it for delivery.
>
> Summary of the configuration:
>
> - Sparc 2: mailhost (NIS), SunOS 4.1.1B, local directory /var/spool/mail
> - Sparc 20: Solaris 2.4, sees the correct machine as mailhost from NIS,
> /var/mail is a link to /netmail/mail
> (automounter), using standard subsidiary.cf as
> sendmail.cf with the following differences:
>
> Line in subsidiary.cf Line in sendmail.cf
>
> Lmmaildomain # Lmmaildomain
> Dj$w.$m Dj$w
> OR ORmailhost
>
> Does anyone have a suggestion ?

Thanks all those who answered, namely:

        pamela@jupiter.Legato.COM (Pamela S. Pledger)
        roy@read-well.no (Roy Ramberg)
        bern@TI.Uni-Trier.DE (Jochen Bern)
        paul.crutchley@csc-eng.demon.co.uk (Paul Crutchley)

I've implemented Jochen Bern's solution: the easiest. Since
it worked, and worked well, I have to be honest: I didn't tried the
other solutions.

################# Jochen Bern's solution #####################

Drop SUN endmail Setups. Here's what I use:

###
### SENDMAIL CONFIGURATION FILE
###
### This is the sendmail.cf for a client who can make a TCP connection
### to a mail server. No local mail happens here, everything is sent to
### the server. Should work for just about any version of sendmail,
### i.e. doesn't use any e.g. Sun-specific features. Of coure, all
### userids on the client must also be known on the server, either as
### real userids or as aliases. Only the first section below should
### need any changes for a particular installation.
###
### Note that as opposed to the broken OR option in the sendmail.cf
### that Sun delivers, this configuration WILL queue mail on the client
### if it can't connect to the server. This means that the queue must
### be checked periodically, either by running sendmail in the normal
### daemon mode (e.g. /usr/lib/sendmail -bd -q1h) or by running
### /usr/lib/sendmail -q from crontab at appropriate intervals. Running
### sendmail in daemon mode is probably preferrable, since doing so
### will also handle mail that is mis-addressed to user@client.
###
### Originally From: rsalz@bbn.com (Rich Salz)
### Modified by: per@erix.ericsson.se (Per Hedeland)
###

## LOCAL CONFIGURATION INFORMATION

## Local domain name.
## This should only be changed if the full name of your hosts is something
## other than host.frobozz.com.
DmUni-Trier.DE

## The official name of this host.
## This may need changing if your 'hostname' command gives the full name,
## or you have specified the full name in your hosts database, or sendmail
## uses the name server directly (in a "default" Sun installation, none of
## these apply). To test this, give the command (after this file is
## installed) /usr/lib/sendmail -bs, and look at he hostname displayed.
## If the domain name is duplicated, remove the '.$m' from the definition.
Dj$w

## The server host where everything gets forwarded to.
## This is the one thing that you MUST change. Do NOT use a generic name
## like 'mailhost' here, but rather the name of the server host that
## should be visible in external mail.
DRTI

## Optionally do client-specific "aliasing" of certain local names.
## If you don't want mail sent to e.g. user 'root' on the client to be
## delivered to the same user on the server, uncomment the CL and DL
## lines below after editing them appropriately.
## (May be useful if groups of clients are administered by different
## individuals, since such mail often concerns host-specific issues.)
# Local mail to these userids...
#CLroot Postmaster MAILER-DAEMON
# ...will be delivered to this userid on the server
#DLsome-lsa

## GENERAL CONFIGURATION INFORMATION
## Stuff here is required and reflects some policy decisions.

## SMTP login message.
De$j Sendmail $v/$V ready at $b
## Format of the UNIX from line -- essentially a constant.
DlFrom $g $d
## Name to use for returned mail -- essentially a constant.
DnMailer-Daemon
## Token delimeters -- word separators in the rewrite rules below.
Do.:%@![]
## Format of a sender's address; use full name.
Dq$x <$g>
## Version of this .cf file.
DVclient-1.3

## Location of the alias file.
OA/etc/aliases
## Default delivery mode (one of background, foreground, queue).
Odbackground
## Permissions for any temporary files we create.
OF0600
## Default group id for mailers to run under.
Og1
## Location of the SMTP help file.
OH/usr/lib/sendmail.hf
## Logging level.
OL9
## Allow headers to be in old style (i.e., spaces delimit names)?
Oo
## Where to send important error messages.
OPPostmaster
## Location of the queue directory.
OQ/usr/spool/mqueue
## Give up on connections after this long a time period.
Or30m
## Status file.
OS/etc/sendmail.st
## Queue up everything before starting transmission?
Os
## How long message can sit in queue before it's bounced back?
OT3d
## Default user id for mailers to run under.
Ou1
## Password to enter wizard/debug mode.
OW*

## Message precedences.
Pfirst-class=0
Pspecial-delivery=100
Pbulk=-50
Pjunk=-100

## Trusted users -- these people can fake headers.
Troot

## Format of headers.
HReceived: $?sfrom $s $.by $j ($v/$V)
        id $i; $b
H?D?Resent-Date: $a
H?D?Date: $a
H?F?Resent-From: $q
H?F?From: $q
H?x?Full-Name: $x
HSubject:
H?M?Resent-Message-Id: <$t.$i@$j>
H?M?Message-Id: <$t.$i@$j>

## REWRITING RULES

##
## RULESET 0 -- Pick a mailer.
S0
R$*<$*>$* $1$2$3 defocus
R$+ $:$>3$1 make canonical
R$*<$*.>$* $1<$2>$3 drop trailing dot
R<@>:$* $@$>0$1 retry after route strip
R$*<@> $@$>0$1 strip null trash & retry
## Machine dependent part of ruleset 0.
## Here is where we actually find a mailer to invoke.
R$=L $:$L change really local names
R$* $#relay$@$R$:$1 forward everything

##
## RULESET 1 -- From and From: fields.
S1

##
## RULESET 2 -- To: field.
S2

##
## RULESET 3 -- Basic name canonicalization.
S3
# Handle the SMTP "from:<>" as a special case.
R<> $@@ turn into magic token
# Basic textual canonicalization.
R$*<$+>$* $2 basic RFC821/822 parsing
R$*<$*>$* $1$2$3 in case recursive
# Make sure <@a,@b,@c:u@d> syntax is easy to parse -- undone later.
R@$+,$+ @$1:$2 change all "," to ":"
# Localize and dispose of domain-based addresses.
R@$+:$+ $@<@$1>:$2 handle <route-addr>
R$+:$*;@$+ $@$1:$2;@$3 list syntax
R$+@$+ $:$1<@$2> focus on domain
R$+<$+@$+> $1$2<@$3> move gaze right
R$+<@$+> $@$1<@$2> already canonical
# Convert old-style addresses to a domain-based address.
R$+%$+ $@$1<@$2> u%h
R$-!$+ $@$2<@$1.UUCP> resolve uucp names
R$-.$+!$+ $@$3<@$1.$2> host.domain!user

##
## RULESET 4 -- Final output rewriting.
S4
R@ $@ handle <> error addr
# Externalize local domain info.
R$*<$*LOCAL>$* $1<$2$m>$3 change local info
R$*<@$=w>$* $1<@$R>$3 remove our name
R$*<@$=w.$m>$* $1<@$R>$3 remove our name
R$*<$+>$* $1$2$3 defocus
R@$+:$+:$+ @$1,$2:$3 <route-addr> canonical

##
## RULESET 14 -- All fields for all mailers
S14

## MAILER SPECIFICATIONS
##

## local; an error as we do no mail delivery here
Mlocal, P=/usr/lib/sendmail, F=DFIMmsuX, S=14, R=14, A=sendmail $n

## prog; an error as we do no mail delivery here
Mprog, P=/usr/lib/sendmail, F=DFIMmsuX, S=14, R=14, A=sendmail $n

## relay; connect to Sendmail on server host.
Mrelay, P=[IPC], F=DFMmsuX, S=14, R=14, A=IPC $h, E=\r\n

################# End of Jochen Bern's solution #####################

Regards,

Paulo Henrique Schindler.

/////////////////////////////////////////////////////////////////////////
System Administrator

E-mail: pauloh@inf.puc-rio.br
Office: Pontificia Universidade Catolica do Rio de Janeiro
        Departamento de Informatica
        Rua Marques de Sao Vicente, 225
        CEP.: 22453-900 Rio de Janeiro, RJ, Brazil
        Phone.: +55 (021) 529-9459

/////////////////////////////////////////////////////////////////////////



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:30 CDT