From Debian package 0.0.20080702-7 Labelled /var/cache/sqwebmail and allowed courier_sqwebmail_t to access it. Also allowed courier_sqwebmail_t to access /dev/urandom. Index: policy/modules/services/courier.fc =================================================================== --- policy/modules/services/courier.fc.orig +++ policy/modules/services/courier.fc @@ -15,7 +15,8 @@ /usr/lib(64)?/courier/imapd -- gen_context(system_u:object_r:courier_pop_exec_t,s0) /usr/lib(64)?/courier/pop3d -- gen_context(system_u:object_r:courier_pop_exec_t,s0) /usr/lib(64)?/courier/rootcerts(/.*)? gen_context(system_u:object_r:courier_etc_t,s0) -/usr/lib(64)?/courier/sqwebmail/cleancache\.pl -- gen_context(system_u:object_r:sqwebmail_cron_exec_t,s0) +/usr/lib(64)?/courier/sqwebmail/cleancache\.pl -- gen_context(system_u:object_r:courier_sqwebmail_exec_t,s0) +/var/cache/sqwebmail(/.*)? gen_context(system_u:object_r:courier_sqwebmail_cache_t,s0) ifdef(`distro_gentoo',` /usr/lib(64)?/courier-imap/couriertcpd -- gen_context(system_u:object_r:courier_tcpd_exec_t,s0) Index: policy/modules/services/courier.te =================================================================== --- policy/modules/services/courier.te.orig +++ policy/modules/services/courier.te @@ -28,9 +28,16 @@ type courier_exec_t; mta_agent_executable(courier_exec_t) +type courier_sqwebmail_cache_t; +files_type(courier_sqwebmail_cache_t) + courier_domain_template(sqwebmail) typealias courier_sqwebmail_exec_t alias sqwebmail_cron_exec_t; +manage_files_pattern(courier_sqwebmail_t, courier_sqwebmail_cache_t, courier_sqwebmail_cache_t) + +dev_read_urand(courier_sqwebmail_t) + ######################################## # # Authdaemon local policy