check process dovecot with pidfile /var/run/dovecot/master.pid
	group mail
	group dovecot
	start program = "/sbin/service dovecot start"
	stop  program = "/sbin/service dovecot stop"
	if failed port 143 with proto imap
		then restart
	if failed port 993 type TCPSSL proto imap
		then restart
	if failed port 110 with proto pop
		then restart
	if failed port 995 type TCPSSL proto pop
		then restart
	if failed unixsocket /var/run/dovecot/auth-master
		then restart
	if 5 restarts with 5 cycles
		then timeout
	depend on dovecot_bin

check file dovecot_bin with path /usr/sbin/dovecot
	group dovecot
	include /etc/monitrc.d/templates/rootbin

check file dovecot_rc with path /etc/dovecot/dovecot.conf
	group dovecot
	include /etc/monitrc.d/templates/rootstrict
