hpux10 rather than
hpux.
disable:
   hpux::
      /usr/lib/sendmail.fc
      
links:
  hpux::
     /etc/logingroup -> /etc/group
#!/usr/local/bin/cfengine -f
####################################################
#
# File:		sendmail.conf
#
# Description: 	CFEngine script to setup the sendmail.cf.
#
####################################################
control:
	access = ( root )
#	Postmaster
	sysadm = ( myPostmaster )
#	NIS domain and group server
	site = ( myserver )
#	DNS domain
	domain = ( myDNSdomain )
#	our gateway host
	gtwyhost = ( mygateway )
#	sendmail.cf can be big
	editfilesize = ( 1000000 )
	actionsequence =
		(
		copy
		files
		editfiles
		shellcommands
		)
#	disable unwanted classes with "--undefine" option
	addclasses = ( maildom mailhst )
################
#	bindir - location of sendmail
#	libdir - location of current mail files
#	cfgdir - location of initial mail files
#	etcdir - location of hosts.smtp
#	own    - who should own result files
#	grp    - what group should result files be in
################
    hpux::
	bindir = ( /usr/lib )
	libdir = ( /usr/lib )
	cfgdir = ( /etc/newconfig )
	etcdir = ( /etc )
	own = ( root )
	grp = ( sys )
    hpux10::
	bindir = ( /usr/sbin )
	libdir = ( /etc/mail )
	cfgdir = ( /usr/newconfig/etc/mail )
	etcdir = ( /etc )
	own = ( root )
	grp = ( sys )
#	disable with "--no-copy" option
copy:
	$(cfgdir)/sendmail.cf dest=$(libdir)/sendmail.cf type=checksum
		mode=0644 owner=$(own) group=$(grp) force=true
#	checks for other important files
files:
	$(libdir)/aliases mode=444 owner=$(own) group=$(grp) action=touch
	$(libdir)/rev-aliases mode=444 owner=$(own) group=$(grp) action=touch
	$(etcdir)/hosts.smtp mode=444 owner=$(own) group=$(grp) action=touch
#	disable with "--no-edit" option
editfiles:
    any::
#	setup general part of sendmail.cf
	{ $(libdir)/sendmail.cf
	SetCommentStart '#'
	SetCommentEnd ''
	ResetSearch "1"
	UnCommentLinesMatching "#OP.*"	# activate Postmaster
	ResetSearch "1"
	UnCommentLinesMatching "#DY.*"
	ResetSearch "1"
	LocateLineMatching "DY.*"
	ReplaceLineWith "DY$(site).$(domain)"	# set site hiding
	ResetSearch "1"
	UnCommentLinesMatching "#DS.*"
	ResetSearch "1"
	LocateLineMatching "DS.*"
	ReplaceLineWith "DS$(gtwyhost)"	# all-knowing SMTP host
	# Ruleset 0 setups
	ResetSearch "1"
	UnCommentLinesMatching "#R.*user@domain to SMTP relay.*"
	ResetSearch "1"
	LocateLineMatching "# try to connect to any host for user@domain"
	IncrementPointer "1"
	CommentNLines "1"
	}
#	add Postmaster alias
	{ $(libdir)/aliases
	SetLine "Postmaster: $(sysadm)"
	AppendIfNoLineMatching "Postmaster.*"
	}
#	setup processing of local domain hosts
    maildom::
	{ $(libdir)/sendmail.cf
	SetCommentStart '#'
	SetCommentEnd ''
	ResetSearch "1"
	LocateLineMatching "DL.*"
	ReplaceLineWith "DL$(domain)"
	# Ruleset 0 setups
	ResetSearch "1"
	LocateLineMatching "# connect to hosts in local domain"
	IncrementPointer "1"
	UnCommentNLines "1"
	}
#	setup processing via class S
    mailhst::
	{ $(libdir)/sendmail.cf
	SetCommentStart '#'
	SetCommentEnd ''
	ResetSearch "1"
	UnCommentLinesMatching "#FS.*"
	# Ruleset 0 setups
	ResetSearch "1"
	LocateLineMatching "# connect to hosts in class S"
	IncrementPointer "1"
	UnCommentNLines "1"
	}
#	setup of list of hosts for class S
	{ $(etcdir)/hosts.smtp
	EmptyEntireFilePlease
	Append "localhost1"
	Append "localhost2"
	}
#	disable with "--no-commands" option
shellcommands:
	"$(bindir)/sendmail -bk"
	"$(bindir)/sendmail -bi"
	"$(bindir)/sendmail -bz"
	"$(bindir)/sendmail -bd"
################
# End of File
################
Go to the first, previous, next, last section, table of contents.