The /etc/init.d/dovecot has wrong permissions ls -lZ /etc/init.d/dovecot* -rwxr-xr-x root root system_u:object_r:initrc_exec_t /etc/init.d/dovecot what prevent dovecot from starting with selinux enabled after chcon system_u:object_r:dovecot_exec_t /etc/init.d/dovecot ls -lZ /etc/init.d/dovecot* -rwxr-xr-x root root system_u:object_r:dovecot_exec_t /etc/init.d/dovecot everything works OK
-rwxr-xr-x root root system_u:object_r:initrc_exec_t /etc/init.d/dovecot Was right, init scripts should be labeled initrc_exec_t. What avc messages were you seeing? How is the dovecot application labeled?
Sep 21 22:09:32 imap1 kernel: audit(1158890972.498:1557): avc: denied { read write } for pid=24398 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:09:32 imap1 kernel: audit(1158890972.522:1558): avc: denied { read } for pid=24398 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:09:32 imap1 kernel: audit(1158890972.542:1559): avc: denied { read write } for pid=24398 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:09:32 imap1 kernel: audit(1158890972.562:1560): avc: denied { read } for pid=24398 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:09:42 imap1 kernel: audit(1158890982.347:1561): avc: denied { read write } for pid=24404 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:09:42 imap1 kernel: audit(1158890982.367:1562): avc: denied { read } for pid=24404 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:09:42 imap1 kernel: audit(1158890982.383:1563): avc: denied { read write } for pid=24404 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:09:42 imap1 kernel: audit(1158890982.407:1564): avc: denied { read } for pid=24404 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:09:57 imap1 kernel: audit(1158890997.216:1565): avc: denied { read write } for pid=24431 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:09:57 imap1 kernel: audit(1158890997.236:1566): avc: denied { read } for pid=24431 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:09:57 imap1 kernel: audit(1158890997.256:1567): avc: denied { read write } for pid=24431 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:09:57 imap1 kernel: audit(1158890997.276:1568): avc: denied { read } for pid=24431 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:10:02 imap1 kernel: audit(1158891002.956:1569): avc: denied { read write } for pid=24433 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:10:03 imap1 kernel: audit(1158891002.980:1570): avc: denied { read } for pid=24433 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:10:03 imap1 kernel: audit(1158891002.996:1571): avc: denied { read write } for pid=24433 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:10:03 imap1 kernel: audit(1158891003.020:1572): avc: denied { read } for pid=24433 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:10:09 imap1 kernel: audit(1158891009.929:1573): avc: denied { read write } for pid=24436 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:10:09 imap1 kernel: audit(1158891009.949:1574): avc: denied { read } for pid=24436 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:10:09 imap1 kernel: audit(1158891009.969:1575): avc: denied { read write } for pid=24436 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:10:10 imap1 kernel: audit(1158891009.989:1576): avc: denied { read } for pid=24436 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:10:14 imap1 kernel: audit(1158891014.009:1577): avc: denied { read write } for pid=24440 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:10:14 imap1 kernel: audit(1158891014.025:1578): avc: denied { read } for pid=24440 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:10:14 imap1 kernel: audit(1158891014.049:1579): avc: denied { read write } for pid=24440 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 21 22:10:14 imap1 kernel: audit(1158891014.069:1580): avc: denied { read } for pid=24440 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 22 01:42:21 imap1 kernel: audit(1158903741.456:1587): avc: denied { lock } for pid=25683 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file Sep 22 01:42:23 imap1 kernel: audit(1158903743.696:1588): avc: denied { lock } for pid=25685 comm="dovecot-auth" name="utmp" dev=sda3 ino=832011 scontext=root:system_r:dovecot_auth_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file
ls -lZ /usr/sbin/dovecot -rwxr-xr-x root root system_u:object_r:dovecot_exec_t /usr/sbin/dovecot
Fixed in selinux-policy-2.3.16-3 You can fix this yourself until the update by executing audit2allow -M local.te < /var/log/messages semodule -i local.pp