[Main]
Type = classic
Version = 0.1.0
Description = "exim4 daemon"
User = ( root )
Depends = ( mount-rw )
Options = ( log )

[Start]
Execute = (
	# exim4 in foreground (-bdf), matching debian/sv/exim4.
	# EXIMSERVICE from /etc/default/exim4 or s6-rc config (default -bdf -q30m).
	# Legacy QUEUERUNNER*/QFLAGS composition is not reimplemented; set
	# EXIMSERVICE explicitly if you still use those variables.
	
	envfile -I /etc/default/exim4
	importas -sCuD "-bdf -q30m" EXIMSERVICE EXIMSERVICE
	importas -sCuD "" UPEX4OPTS UPEX4OPTS
	
	foreground { install -d -o Debian-exim -g Debian-exim -m 0750 /run/exim4 }
	export LANG C
	foreground { /usr/sbin/update-exim4.conf ${UPEX4OPTS} }
	
	exec /usr/sbin/exim4 ${EXIMSERVICE}
)

[Logger]
RunAs = s6log
Backup = 3
MaxSize = 2000000
Timestamp = tai
Destination = /var/log/exim4-s6
