Path: utzoo!utgpu!attcan!uunet!mcvax!unido!infbs!ramz!ruediger From: ruediger@ramz.UUCP (Ruediger Helsch) Newsgroups: comp.mail.sendmail Subject: Re: A minimal cf? Message-ID: <837@ramz.UUCP> Date: 5 Jan 89 17:48:01 GMT References: <1324@fig.bbn.com> Organization: TU Braunschweig Mechanikzentrum, Germany Lines: 114 In article <1324@fig.bbn.com> rsalz@bbn.com (Rich Salz) writes: >Has anyone tried running with a a sendmail.cf that does NO rewriting at >all? We use a minimal "leaf node" sendmail.cf at our site. The only header munging is adding our domain if a domain is missing. The drawback: We can't use rmail. Our (Ultrix 1.2) rmail insists on doing its own header pre-munging. But luckily we don't need rmail if we don't use bang paths. Indeed rmails only purpose is to patch bang paths in the header. We can do without and call sendmail directly (through a shell script preventing our uucp peers to call sendmail with switches). Here comes our sendmail.cf. To save space, i deleted the options list. I did include the complete rulesets and mailer definitions. --------------------------------------------------------------------- # # Local names # # our full domain name Djramz.uucp # gateway DGinfbs # # Ruleset 0 -- Select mailer to be used # S0 # add subdomain routing here. for example # R$*@subdomain.$j $#mailtosubdomain # local mail R~$-@$j $#binmail$:$1 local mail - no aliasing R$-@$j $#local$:$1 local mail # reject everything else with our domain-extension R$*@$*$j $#error$:Subdomain Unknown <$1@$2$j> # everything else goes to external mail connection R$+ $#smuucp$@$G$:$1 external domains to smart uucp gateway S1 S2 # are empty # # Ruleset 3 -- Name Canonicalisation # S3 R$*<$*>$* $:$2 basic RFC 822 parsing ( '... ' ) # Our Ultrix 'Mail' generates 'user@host', not # 'user@host.domain' : R$+@$w $1@$j Expand our host address to our domain address R$+@$+ $@$1@$2 Return if domain address R$+!$+ $@$1!$2 Return if bang path R$+ $@$1@$j Else add our domain S4 # is empty # # The Mailers # # Local and Program Mailer specification # Mlocal, P=/bin/mail, F=rlsmnFDuh, S=11, R=11, A=mail -d $u Mbinmail, P=/bin/mail, F=rlsmnFDuh, S=11, R=11, A=mail -d $u Mprog, P=/bin/sh, F=nlsFDMR, S=11, R=11, A=sh -c $u # # The important thing here is to keep a valid reply path! S11 R@ $n errors to mailer-daemon R~$+ $1 remove '~' in To: line # # SMARTUUCP Mailer specification # For Hosts understanding domains # Msmuucp, P=/usr/bin/uux, F=FDMhnus, M=100000, A=uux - -n -gA $h!rsendmail (\'$g\') (\'$u\') --------------------------------------------------------------------------- And here's the rsendmail shell script for the smartuucp mailer: --------------------------------------------------------------------------- #!/bin/sh IFS=' \t # That's a space and a tab and a newline ' export IFS set -u PATH= export PATH sendmail=/usr/lib/sendmail case $# in 0) exec $sendmail -t -oee;; # both addresses from header 1) exec $sendmail -t -oee "-f$1";; # from-address from 1. arg 2) case "$2" in -*) exec $sendmail -t -oee "-f$1";; # don't pass switches *) exec $sendmail -oee "-f$1" "$2";; # both addresses from args esac;; esac