#
# Copyright (c) 1998 Sendmail, Inc.  All rights reserved.
# Copyright (c) 1983, 1995 Eric P. Allman.  All rights reserved.
# Copyright (c) 1988, 1993
#	The Regents of the University of California.  All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#

######################################################################
######################################################################
#####
#####		SENDMAIL CONFIGURATION FILE
#####
##### built by root@main0006 on mar jun 18 12:55:51 CEST 2002
##### in /usr/lib/sendmail-cf
##### using /usr/lib/sendmail-cf/ as configuration include directory
#####
######################################################################
######################################################################

#####  @(#)cfhead.m4	8.23 (Berkeley) 10/6/1998  #####
#####  @(#)cf.m4	8.29 (Berkeley) 5/19/1998  #####

#####  (c) acens Technologies S.A. 2002  #####

#####  (c) acens Technologies 2002  #####


#####  @(#)redirect.m4	8.10 (Berkeley) 5/19/1998  #####


#####  @(#)accept_unresolvable_domains.m4	8.7 (Berkeley) 5/19/1998  #####




#####  @(#)proto.m4	8.243 (Berkeley) 2/2/1999  #####


# level 8 config file format
#V8/Berkeley
V9/Berkeley

# override file safeties - setting this option compromises system security
# need to set this now for the sake of class files
#O DontBlameSendmail=safe

##################
#   local info   #
##################

Cwlocalhost

# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
Djorchestra.es

# class E: names that should be exposed as from this host, even if we masquerade
#CE root
CMorchestra.es

# who I masquerade as (null for no masquerading) (see also $=M)
DMorchestra.es

# my name for error messages
DnMAILER-DAEMON


CPREDIRECT

# hub host (to which all mail is sent)
DHcorreojaulaszeus.acens.net

# route-addr separators
C: : ,

# Configuration version number
DZ8.9.3


###############
#   Options   #
###############

# strip message body to 7 bits on input?
O SevenBitInput=False

# 8-bit data handling
O EightBitMode=pass8

# minimum number of free blocks on filesystem
O MinFreeBlocks=100

# maximum message size
#O MaxMessageSize=1000000

# substitution for space (blank) characters
O BlankSub=.

# avoid connecting to "expensive" mailers on initial submission?
O HoldExpensive=False

# checkpoint queue runs after every N successful deliveries
#O CheckpointInterval=10

# default delivery mode
O DeliveryMode=background

# automatically rebuild the alias database?
#O AutoRebuildAliases

# error message header/file
#O ErrorHeader=/etc/sendmail.oE

# error mode
O ErrorMode=print

# save Unix-style "From_" lines at top of header?
#O SaveFromLine

# temporary file mode
O TempFileMode=0600

# match recipients against GECOS field?
#O MatchGECOS

# maximum hop count
#O MaxHopCount=17

# location of help file
O HelpFile=/usr/lib/sendmail.hf

# ignore dots as terminators in incoming messages?
#O IgnoreDots

# name resolver options
#O ResolverOptions=+AAONLY

# deliver MIME-encapsulated error messages?
O SendMimeErrors=True

# Forward file search path
O ForwardPath=$z/.forward.$w:$z/.forward

# open connection cache size
O ConnectionCacheSize=2

# open connection cache timeout
O ConnectionCacheTimeout=5m

# persistent host status directory
#O HostStatusDirectory=.hoststat

# single thread deliveries (requires HostStatusDirectory)?
#O SingleThreadDelivery

# use Errors-To: header?
O UseErrorsTo=False

# log level
O LogLevel=9

# send to me too, even in an alias expansion?
#O MeToo

# verify RHS in newaliases?
O CheckAliases=False

# default messages to old style headers if no special punctuation?
O OldStyleHeaders=True

# SMTP daemon options
#O DaemonPortOptions=Port=esmtp

# privacy flags
O PrivacyOptions=authwarnings

# who (if anyone) should get extra copies of error messages
#O PostMasterCopy=Postmaster

# slope of queue-only function
#O QueueFactor=600000

# queue directory
O QueueDirectory=/var/spool/mqueue

# timeouts (many of these)
O Timeout.initial=2m
O Timeout.connect=5m
#O Timeout.iconnect=5m
#O Timeout.helo=5m
#O Timeout.mail=10m
#O Timeout.rcpt=1h
#O Timeout.datainit=5m
#O Timeout.datablock=1h
#O Timeout.datafinal=1h
#O Timeout.rset=5m
#O Timeout.quit=2m
#O Timeout.misc=2m
#O Timeout.command=1h
#O Timeout.ident=30s
#O Timeout.fileopen=60s
O Timeout.queuereturn=5d
#O Timeout.queuereturn.normal=5d
#O Timeout.queuereturn.urgent=2d
#O Timeout.queuereturn.non-urgent=7d
O Timeout.queuewarn=0d
#O Timeout.queuewarn.normal=4h
#O Timeout.queuewarn.urgent=1h
#O Timeout.queuewarn.non-urgent=12h
#O Timeout.hoststatus=30m

# should we not prune routes in route-addr syntax addresses?
#O DontPruneRoutes

# queue up everything before forking?
O SuperSafe=True

# status file
O StatusFile=/etc/sendmail.st

# time zone handling:
#  if undefined, use system default
#  if defined but null, use TZ envariable passed in
#  if defined and non-null, use that info
#O TimeZoneSpec=

# default UID (can be username or userid:groupid)
O DefaultUser=web

# list of locations of user database file (null means no lookup)
#O UserDatabaseSpec=/etc/userdb

# fallback MX host
#O FallbackMXhost=fall.back.host.net

# if we are the best MX host for a site, try it directly instead of config err
#O TryNullMXList

# load average at which we just queue messages
#O QueueLA=8

# load average at which we refuse connections
#O RefuseLA=12

# maximum number of children we allow at one time
#O MaxDaemonChildren=12

# maximum number of new connections per second
#O ConnectionRateThrottle=3

# work recipient factor
#O RecipientFactor=30000

# deliver each queued job in a separate process?
#O ForkEachJob

# work class factor
#O ClassFactor=1800

# work time factor
#O RetryFactor=90000

# shall we sort the queue by hostname first?
#O QueueSortOrder=priority

# minimum time in queue before retry
#O MinQueueAge=30m

# default character set
#O DefaultCharSet=iso-8859-1

# service switch file (ignored on Solaris, Ultrix, OSF/1, others)
#O ServiceSwitchFile=/etc/service.switch

# hosts file (normally /etc/hosts)
#O HostsFile=/etc/hosts

# dialup line delay on connection failure
#O DialDelay=10s

# action to take if there are no recipients in the message
O NoRecipientAction=add-to

# chrooted environment for writing to files
#O SafeFileEnvironment=/arch

# are colons OK in addresses?
#O ColonOkInAddr

# how many jobs can you process in the queue?
#O MaxQueueRunSize=10000

# shall I avoid expanding CNAMEs (violates protocols)?
#O DontExpandCnames

# SMTP initial login message (old $e macro)
O SmtpGreetingMessage=$j Sendmail $v/$Z; $b

# UNIX initial From header format (old $l macro)
O UnixFromLine=From $g  $d

# From: lines that have embedded newlines are unwrapped onto one line
#O SingleLineFromHeader=False

# Allow HELO SMTP command that does not include a host name
#O AllowBogusHELO=False

# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
#O MustQuoteChars=.

# delimiter (operator) characters (old $o macro)
O OperatorChars=.:%@!^/[]+

# shall I avoid calling initgroups(3) because of high NIS costs?
#O DontInitGroups

# are group-writable :include: and .forward files (un)trustworthy?
#O UnsafeGroupWrites

# where do errors that occur when sending errors get sent?
#O DoubleBounceAddress=postmaster

# what user id do we assume for the majority of the processing?
O RunAsUser=web

# maximum number of recipients per SMTP envelope
#O MaxRecipientsPerMessage=100

# shall we get local names from our installed interfaces?
O DontProbeInterfaces=true






###########################
#   Message precedences   #
###########################

Pfirst-class=0
Pspecial-delivery=100
Plist=-30
Pbulk=-60
Pjunk=-100

#####################
#   Trusted users   #
#####################

# this is equivalent to setting class "t"
#Ft/etc/sendmail.ct
Troot
Tdaemon
Tuucp

#########################
#   Format of headers   #
#########################

H?P?Return-Path: <$g>
HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
	$.by $j ($v/$Z)$?r with $r$. id $i$?u
	for $u; $|;
	$.$b
H?D?Resent-Date: $a
H?D?Date: $a
H?F?Resent-From: <$g>
H?F?From: <$g>
H?x?Full-Name: $x
# HPosted-Date: $a
# H?l?Received-Date: $b
H?M?Resent-Message-Id: <$t.$i@$j>
H?M?Message-Id: <$t.$i@$j>


#####  @(#)nullrelay.m4	8.19 (Berkeley) 5/19/1998  #####

#
#  This configuration applies only to relay-only hosts.  They send
#  all mail to a hub without consideration of the address syntax
#  or semantics, except for adding the hub qualification to the
#  addresses.
#
#	This is based on a prototype done by Bryan Costales of ICSI.
#

######################################################################
######################################################################
#####
#####			REWRITING RULES
#####
######################################################################
######################################################################

###########################################
###  Rulset 3 -- Name Canonicalization  ###
###########################################
S3

# handle null input
R$@			$@ <@>

# strip group: syntax (not inside angle brackets!) and trailing semicolon
R$*			$: $1 <@>			mark addresses
R$* < $* > $* <@>	$: $1 < $2 > $3			unmark <addr>
R$* :: $* <@>		$: $1 :: $2			unmark node::addr
R:include: $* <@>	$: :include: $1			unmark :include:...
R$* : $* <@>		$: $2				strip colon if marked
R$* <@>			$: $1				unmark
R$* ;			   $1				strip trailing semi
R$* < $* ; >		   $1 < $2 >			bogus bracketed semi

# null input now results from list:; syntax
R$@			$@ :; <@>

# basic textual canonicalization -- note RFC733 heuristic here
R$*			$: < $1 >		housekeeping <>
R$+ < $* >		   < $2 >		strip excess on left
R< $* > $+		   < $1 >		strip excess on right
R<>			$@ < @ >		MAIL FROM:<> case
R< $+ >			$: $1			remove housekeeping <>

# eliminate local host if present
R@ $=w $=: $+		$@ @ $M $2 $3			@thishost ...
R@ $+			$@ @ $1				@somewhere ...

R$=E @ $=w		$@ $1 @ $2			leave exposed
R$+ @ $=w		$@ $1 @ $M			...@thishost
R$+ @ $+		$@ $1 @ $2			...@somewhere

R$=w ! $=E		$@ $2 @ $1			leave exposed
R$=w ! $+		$@ $2 @ $M			thishost!...
R$+ ! $+		$@ $1 ! $2 @ $M			somewhere ! ...

R$=E % $=w		$@ $1 @ $2			leave exposed
R$+ % $=w		$@ $1 @ $M			...%thishost
R$+ % $+		$@ $1 @ $2			...%somewhere

R$=E			$@ $1 @ $j			leave exposed
R$+			$@ $1 @ $M			unadorned user


######################################
###   Ruleset 0 -- Parse Address   ###
######################################

S0

R$*:;<@>		$#error $@ USAGE $: "List:; syntax illegal for recipient addresses"

# pass everything else to a relay host
R$*			$#nullclient $@ $H $: $1


##################################################
###  Ruleset 4 -- Final Output Post-rewriting  ###
##################################################
S4

R$* <@>			$@				handle <> and list:;

# strip trailing dot off before passing to nullclient relay
R$* @ $+ .		$1 @ $2

#
######################################################################
######################################################################
#####
#####			MAILER DEFINITIONS
#####
######################################################################
######################################################################

############################################
###   Null Client Mailer specification   ###
############################################


Mnullclient,	P=[IPC], F=mDFMuXa,
		A=IPC $h

#####################################
###   SMTP Mailer specification   ###
#####################################

#####  @(#)smtp.m4	8.38 (Berkeley) 5/19/1998  #####

Msmtp,		P=[IPC], F=mDFMuX, S=11/31, R=21, E=\r\n, L=990,
		T=DNS/RFC822/SMTP,
		A=IPC $h
Mesmtp,		P=[IPC], F=mDFMuXa, S=11/31, R=21, E=\r\n, L=990,
		T=DNS/RFC822/SMTP,
		A=IPC $h
Msmtp8,		P=[IPC], F=mDFMuX8, S=11/31, R=21, E=\r\n, L=990,
		T=DNS/RFC822/SMTP,
		A=IPC $h
Mrelay,		P=[IPC], F=mDFMuXa8, S=11/31, R=61, E=\r\n, L=2040,
		T=DNS/RFC822/SMTP,
		A=IPC $h

#
#  envelope sender rewriting
#
S11
R$+			$: $>51 $1			sender/recipient common
R$* :; <@>		$@				list:; special case
R$*			$: $>61 $1			qualify unqual'ed names
R$+			$: $>94 $1			do masquerading


#
#  envelope recipient rewriting --
#  also header recipient if not masquerading recipients
#
S21
R$+			$: $>51 $1			sender/recipient common
R$+			$: $>61 $1			qualify unqual'ed names


#
#  header sender and masquerading header recipient rewriting
#
S31
R$+			$: $>51 $1			sender/recipient common
R:; <@>			$@				list:; special case

# do special header rewriting
R$* <@> $*		$@ $1 <@> $2			pass null host through
R< @ $* > $*		$@ < @ $1 > $2			pass route-addr through
R$*			$: $>61 $1			qualify unqual'ed names
R$+			$: $>93 $1			do masquerading


#
#  convert pseudo-domain addresses to real domain addresses
#
S51

# pass <route-addr>s through
R< @ $+ > $*		$@ < @ $1 > $2			resolve <route-addr>

# output fake domains as user%fake@relay

# do UUCP heuristics; note that these are shared with UUCP mailers
R$+ < @ $+ .UUCP. >	$: < $2 ! > $1			convert to UUCP form
R$+ < @ $* > $*		$@ $1 < @ $2 > $3		not UUCP form

# leave these in .UUCP form to avoid further tampering
R< $&h ! > $- ! $+	$@ $2 < @ $1 .UUCP. >
R< $&h ! > $-.$+ ! $+	$@ $3 < @ $1.$2 >
R< $&h ! > $+		$@ $1 < @ $&h .UUCP. >
R< $+ ! > $+		$: $1 ! $2 < @ $Y >		use UUCP_RELAY
R$+ < @ $+ : $+ >	$@ $1 < @ $3 >			strip mailer: part
R$+ < @ >		$: $1 < @ *LOCAL* >		if no UUCP_RELAY


#
#  common sender and masquerading recipient rewriting
#
S61

R$* < @ $* > $*		$@ $1 < @ $2 > $3		already fully qualified
R$+			$@ $1 < @ *LOCAL* >		add local qualification


#
#  relay mailer header masquerading recipient rewriting
#
S71

R$+			$: $>61 $1
R$+			$: $>93 $1


##################################################
###   Local and Program Mailer specification   ###
##################################################

#####  @(#)local.m4	8.30 (Berkeley) 6/30/1998  #####

Mlocal,		P=[FILE], M=1000000, F=9DEFMloqsu, T=DNS/RFC822/X-Unix, A=FILE /statistics/logs/dead.letter
Mprog,		P=[FILE], M=1000000, F=9DEFMloqsu, T=DNS/RFC822/X-Unix, A=FILE /statistics/logs/dead.letter

#
#  Envelope sender rewriting
#
S10
R<@>			$n			errors to mailer-daemon
R@ <@ $*>		$n			temporarily bypass Sun bogosity
R$+			$: $>50 $1		add local domain if needed
R$*			$: $>94 $1		do masquerading

#
#  Envelope recipient rewriting
#
S20
R$+ < @ $* >		$: $1			strip host part

#
#  Header sender rewriting
#
S30
R<@>			$n			errors to mailer-daemon
R@ <@ $*>		$n			temporarily bypass Sun bogosity
R$+			$: $>50 $1		add local domain if needed
R$*			$: $>93 $1		do masquerading

#
#  Header recipient rewriting
#
S40
R$+			$: $>50 $1		add local domain if needed

#
#  Common code to add local domain name (only if always-add-domain)
#
S50
