2 policy_module(mta,1.9.1)
4 ########################################
9 attribute mta_user_agent;
10 attribute mailserver_delivery;
11 attribute mailserver_domain;
12 attribute mailserver_sender;
14 attribute user_mail_domain;
17 files_type(etc_aliases_t)
20 files_config_file(etc_mail_t)
23 files_type(mqueue_spool_t)
26 files_type(mail_spool_t)
29 application_executable_file(sendmail_exec_t)
31 mta_base_mail_template(system)
32 role system_r types system_mail_t;
34 ########################################
36 # System mail local policy
39 # newalias required this, not sure if it is needed in 'if' file
40 allow system_mail_t self:capability { dac_override };
42 read_files_pattern(system_mail_t,etc_mail_t,etc_mail_t)
44 kernel_read_system_state(system_mail_t)
45 kernel_read_network_state(system_mail_t)
47 dev_read_rand(system_mail_t)
48 dev_read_urand(system_mail_t)
50 init_use_script_ptys(system_mail_t)
52 sysadm_use_terms(system_mail_t)
53 sysadm_dontaudit_search_home_dirs(system_mail_t)
56 apache_read_squirrelmail_data(system_mail_t)
57 apache_append_squirrelmail_data(system_mail_t)
59 # apache should set close-on-exec
60 apache_dontaudit_append_log(system_mail_t)
61 apache_dontaudit_rw_stream_sockets(system_mail_t)
62 apache_dontaudit_rw_tcp_sockets(system_mail_t)
63 apache_dontaudit_rw_sys_script_stream_sockets(system_mail_t)
67 arpwatch_manage_tmp_files(system_mail_t)
69 ifdef(`hide_broken_symptoms', `
70 arpwatch_dontaudit_rw_packet_sockets(system_mail_t)
75 cron_read_system_job_tmp_files(system_mail_t)
76 cron_dontaudit_write_pipes(system_mail_t)
80 cvs_read_data(system_mail_t)
84 logrotate_read_tmp_files(system_mail_t)
88 logwatch_read_tmp_files(system_mail_t)
92 nagios_read_tmp_files(system_mail_t)
96 manage_dirs_pattern(system_mail_t,etc_aliases_t,etc_aliases_t)
97 manage_files_pattern(system_mail_t,etc_aliases_t,etc_aliases_t)
98 manage_lnk_files_pattern(system_mail_t,etc_aliases_t,etc_aliases_t)
99 manage_fifo_files_pattern(system_mail_t,etc_aliases_t,etc_aliases_t)
100 manage_sock_files_pattern(system_mail_t,etc_aliases_t,etc_aliases_t)
101 files_etc_filetrans(system_mail_t,etc_aliases_t,{ file lnk_file sock_file fifo_file })
103 domain_use_interactive_fds(system_mail_t)
105 # postfix needs this for newaliases
106 files_getattr_tmp_dirs(system_mail_t)
108 postfix_exec_master(system_mail_t)
109 postfix_read_config(system_mail_t)
110 postfix_search_spool(system_mail_t)
112 ifdef(`distro_redhat',`
113 # compatability for old default main.cf
114 postfix_config_filetrans(system_mail_t,etc_aliases_t,{ dir file lnk_file sock_file fifo_file })
118 cron_rw_tcp_sockets(system_mail_t)
123 qmail_domtrans_inject(system_mail_t)
127 sxid_read_log(system_mail_t)
131 userdom_dontaudit_use_unpriv_users_ptys(system_mail_t)
134 cron_dontaudit_append_system_job_tmp_files(system_mail_t)
139 smartmon_read_tmp_files(system_mail_t)
142 # should break this up among sections:
145 # why is mail delivered to a directory of type arpwatch_data_t?
146 arpwatch_search_data(mailserver_delivery)
147 arpwatch_manage_tmp_files(mta_user_agent)
149 ifdef(`hide_broken_symptoms', `
150 arpwatch_dontaudit_rw_packet_sockets(mta_user_agent)
154 cron_read_system_job_tmp_files(mta_user_agent)