2005-10-21 15:38:22 +00:00
|
|
|
## <summary>Dovecot POP and IMAP mail server</summary>
|
|
|
|
|
2009-06-30 19:27:21 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Connect to dovecot auth unix domain stream socket.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`dovecot_stream_connect_auth',`
|
|
|
|
gen_require(`
|
|
|
|
type dovecot_auth_t, dovecot_var_run_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
stream_connect_pattern($1, dovecot_var_run_t, dovecot_var_run_t, dovecot_auth_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute dovecot_deliver in the dovecot_deliver domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
2010-08-05 13:03:19 +00:00
|
|
|
## Domain allowed to transition.
|
2009-06-30 19:27:21 +00:00
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dovecot_domtrans_deliver',`
|
|
|
|
gen_require(`
|
|
|
|
type dovecot_deliver_t, dovecot_deliver_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
domtrans_pattern($1, dovecot_deliver_exec_t, dovecot_deliver_t)
|
|
|
|
')
|
|
|
|
|
2005-10-21 15:38:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete the dovecot spool files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-21 15:38:22 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-21 15:38:22 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dovecot_manage_spool',`
|
|
|
|
gen_require(`
|
|
|
|
type dovecot_spool_t;
|
|
|
|
')
|
|
|
|
|
2008-07-23 21:38:39 +00:00
|
|
|
manage_files_pattern($1, dovecot_spool_t, dovecot_spool_t)
|
|
|
|
manage_lnk_files_pattern($1, dovecot_spool_t, dovecot_spool_t)
|
2005-10-21 15:38:22 +00:00
|
|
|
')
|
2008-02-25 19:31:03 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2008-12-03 19:16:20 +00:00
|
|
|
## Do not audit attempts to delete dovecot lib files.
|
2008-02-25 19:31:03 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2008-12-03 19:16:20 +00:00
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
2008-02-25 19:31:03 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`dovecot_dontaudit_unlink_lib_files',`
|
|
|
|
gen_require(`
|
|
|
|
type dovecot_var_lib_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 dovecot_var_lib_t:file unlink;
|
|
|
|
')
|
2009-06-30 19:27:21 +00:00
|
|
|
|
|
|
|
########################################
|
|
|
|
## <summary>
|
2010-05-03 18:37:19 +00:00
|
|
|
## All of the rules required to administrate
|
2009-06-30 19:27:21 +00:00
|
|
|
## an dovecot environment
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="role">
|
|
|
|
## <summary>
|
|
|
|
## The role to be allowed to manage the dovecot domain.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <rolecap/>
|
|
|
|
#
|
|
|
|
interface(`dovecot_admin',`
|
|
|
|
gen_require(`
|
2010-08-26 13:41:21 +00:00
|
|
|
type dovecot_t, dovecot_etc_t, dovecot_auth_tmp_t;
|
2009-06-30 19:27:21 +00:00
|
|
|
type dovecot_spool_t, dovecot_var_lib_t;
|
2010-08-26 13:41:21 +00:00
|
|
|
type dovecot_var_run_t, dovecot_tmp_t;
|
|
|
|
type dovecot_var_log_t;
|
2009-06-30 19:27:21 +00:00
|
|
|
|
|
|
|
type dovecot_cert_t, dovecot_passwd_t;
|
|
|
|
type dovecot_initrc_exec_t;
|
2010-08-26 13:41:21 +00:00
|
|
|
type dovecot_keytab_t;
|
2009-06-30 19:27:21 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 dovecot_t:process { ptrace signal_perms };
|
|
|
|
ps_process_pattern($1, dovecot_t)
|
|
|
|
|
|
|
|
init_labeled_script_domtrans($1, dovecot_initrc_exec_t)
|
|
|
|
domain_system_change_exemption($1)
|
|
|
|
role_transition $2 dovecot_initrc_exec_t system_r;
|
|
|
|
allow $2 system_r;
|
|
|
|
|
|
|
|
files_list_etc($1)
|
|
|
|
admin_pattern($1, dovecot_etc_t)
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
files_list_tmp($1)
|
|
|
|
admin_pattern($1, dovecot_auth_tmp_t)
|
|
|
|
admin_pattern($1, dovecot_tmp_t)
|
|
|
|
|
|
|
|
admin_pattern($1, dovecot_keytab_t)
|
2009-06-30 19:27:21 +00:00
|
|
|
|
|
|
|
files_list_spool($1)
|
|
|
|
admin_pattern($1, dovecot_spool_t)
|
|
|
|
|
|
|
|
files_list_var_lib($1)
|
|
|
|
admin_pattern($1, dovecot_var_lib_t)
|
|
|
|
|
2010-08-26 13:41:21 +00:00
|
|
|
logging_search_logs($1)
|
|
|
|
admin_pattern($1, dovecot_var_log_t)
|
|
|
|
|
2009-06-30 19:27:21 +00:00
|
|
|
files_list_pids($1)
|
|
|
|
admin_pattern($1, dovecot_var_run_t)
|
|
|
|
|
|
|
|
admin_pattern($1, dovecot_cert_t)
|
|
|
|
|
|
|
|
admin_pattern($1, dovecot_passwd_t)
|
|
|
|
')
|