A. The client.cf File
In Part I of this book a configuration file that always forwards to the hub was partly developed. This appendix presents it in annotated and cross-referenced form, but please use this file only to learn about sendmail . If you really need a client file that always forwards to a hub, use the nullclient feature described in Chapter 16, The null.mc File and m4 .
V7 Chapter 5, The sendmail.cf File # Defined macros Chapter 7, Macros Note that in the next two lines you should replace mailhost with the real internal name of your mail hub and mail.us.edu with the real canonical name of your mail hub. D{REMOTE}mailhost # The name of the mail hub Chapter 7 D{HUB}mail.us.edu # Hub as known to the outside world Chapter 11, Rule Sets 1 and S= Cw localhost # My other names Chapter 12, Class Fw -o /etc/sendmail.cw # A file of other names Chapter 12 Ct root daemon Chapter 14, Headers, Precedence, and Trust # Options Chapter 13, Setting Options Note that you must change the next line to the path for your queue directory before putting this configuration file into use. O QueueDirectory=/tmp # Use /var/spool/mqueue upon release Chapter 13 O Timeout.queuewarn=4h Chapter 13 O Timeout.queuereturn=5d Chapter 13 O DeliveryMode=background Chapter 13 O TempFileMode=0600 Chapter 13 O DefaultUser=1:1 Chapter 13 O LogLevel=9 Chapter 13 O OldStyleHeaders=True Chapter 13 O BlankSub=. # Replace unquoted spaces Chapter 13 # Headers Chapter 14 HFrom: <$g> # Added only if missing Chapter 14 Note that this is a minimal Received: header. See Section 35.10.25, Received: for a more complete version of this header. HReceived: by $j; $b # Always added Chapter 14 H?x?Full-Name: $?x$x$. # Add full name if available Chapter 14 H?D?Date: $a # Add if F=D Chapter 14 H?M?Message-Id: <$t.$i@$j> # Add if F=M Chapter 14 # Precedence Chapter 14 Pspecial-delivery=100 Chapter 14 Pfirst-class=0 Chapter 14 Plist=-30 Chapter 14 Pbulk=-60 Chapter 14 Pjunk=-100 Chapter 14 # Delivery agent definition to forward mail to hub Chapter 6, The Mail Hub and Delivery Agents Mhub, P=[IPC], S=Hubset, R=0, F=xmDFMuXa, T=DNS/RFC822/SMTP, A=IPC $h Chapter 6 , Chapter 11 , Chapter 14 # Sendmail requires this, but we won't use it. Chapter 6 Mlocal, P=/bin/mail, F=lsDFMAw5:/|@rmn, S=0, R=0, A=mail -d $u Chapter 6 S0 # select delivery agent Chapter 9, Rule Set 0 R@ $+ $#error $: Missing user name Chapter 9 R$+ $#hub $@${REMOTE} $:$1 forward to hub Chapter 9 S3 # preprocessing for all rule sets Chapter 10, Rule Set 3 R$* <> $* $n handle <> error address Chapter 10 R$* < $* <$*> $* > $* $2<$3>$4 de-nest brackets Chapter 10 R$* < $* > $* $2 basic RFC822 parsing Chapter 10 SHubset # Rewrite the sender for the hub R$- $@ $1@${HUB} user -> user@hub Chapter 11 R$- @ $=w $@ $1@${HUB} user@local -> user@hub Chapter 11 , Chapter 12 R$- @ $=w . $m $@ $1@${HUB} user@local.domain -> user@hub Chapter 12 |
|