2005-05-31 19:52:57 +00:00
|
|
|
## <summary>Policy common to all email tranfer agents.</summary>
|
2005-05-02 19:24:29 +00:00
|
|
|
|
2005-10-18 18:25:33 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## MTA stub interface. No access allowed.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain" optional="true">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-18 18:25:33 +00:00
|
|
|
## N/A
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-18 18:25:33 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`mta_stub',`
|
|
|
|
gen_require(`
|
|
|
|
type sendmail_exec_t;
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
2005-05-02 19:24:29 +00:00
|
|
|
#######################################
|
2005-08-30 15:48:57 +00:00
|
|
|
## <summary>
|
2005-11-28 20:25:36 +00:00
|
|
|
## Basic mail transfer agent domain template.
|
2005-08-30 15:48:57 +00:00
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## This template creates a derived domain which is
|
|
|
|
## a email transfer agent, which sends mail on
|
|
|
|
## behalf of the user.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
2005-11-28 20:25:36 +00:00
|
|
|
## This is the basic types and rules, common
|
2005-11-28 22:19:08 +00:00
|
|
|
## to the system agent and user agents.
|
2005-08-30 15:48:57 +00:00
|
|
|
## </p>
|
|
|
|
## </desc>
|
2005-11-28 20:25:36 +00:00
|
|
|
## <param name="domain_prefix">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-28 20:25:36 +00:00
|
|
|
## The prefix of the domain (e.g., user
|
2005-08-30 15:48:57 +00:00
|
|
|
## is the prefix for user_t).
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-30 15:48:57 +00:00
|
|
|
## </param>
|
2005-05-02 19:24:29 +00:00
|
|
|
#
|
2005-11-28 20:25:36 +00:00
|
|
|
template(`mta_base_mail_template',`
|
|
|
|
|
2007-02-16 23:01:42 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute user_mail_domain;
|
|
|
|
type sendmail_exec_t;
|
|
|
|
')
|
|
|
|
|
2005-11-28 20:25:36 +00:00
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# $1_mail_t declarations
|
|
|
|
#
|
2005-10-19 14:36:04 +00:00
|
|
|
|
2005-10-23 20:18:36 +00:00
|
|
|
type $1_mail_t, user_mail_domain;
|
2007-07-19 18:57:48 +00:00
|
|
|
application_domain($1_mail_t,sendmail_exec_t)
|
2005-05-02 19:24:29 +00:00
|
|
|
|
2005-11-29 21:27:15 +00:00
|
|
|
type $1_mail_tmp_t;
|
|
|
|
files_tmp_file($1_mail_tmp_t)
|
2005-05-02 19:24:29 +00:00
|
|
|
|
2005-06-03 12:25:14 +00:00
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# $1_mail_t local policy
|
|
|
|
#
|
2005-05-12 20:50:09 +00:00
|
|
|
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1_mail_t self:capability { setuid setgid chown };
|
2005-06-09 15:32:23 +00:00
|
|
|
allow $1_mail_t self:process { signal_perms setrlimit };
|
|
|
|
allow $1_mail_t self:tcp_socket create_socket_perms;
|
2005-05-12 20:50:09 +00:00
|
|
|
|
2005-06-03 12:25:14 +00:00
|
|
|
# re-exec itself
|
2005-06-09 15:32:23 +00:00
|
|
|
can_exec($1_mail_t, sendmail_exec_t)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1_mail_t sendmail_exec_t:lnk_file read_lnk_file_perms;
|
2005-05-12 20:50:09 +00:00
|
|
|
|
2006-01-31 16:49:43 +00:00
|
|
|
kernel_read_kernel_sysctls($1_mail_t)
|
2005-05-12 20:50:09 +00:00
|
|
|
|
2007-06-27 15:23:21 +00:00
|
|
|
corenet_all_recvfrom_unlabeled($1_mail_t)
|
|
|
|
corenet_all_recvfrom_netlabel($1_mail_t)
|
2005-06-10 01:01:13 +00:00
|
|
|
corenet_tcp_sendrecv_all_if($1_mail_t)
|
|
|
|
corenet_tcp_sendrecv_all_nodes($1_mail_t)
|
|
|
|
corenet_tcp_sendrecv_all_ports($1_mail_t)
|
2005-09-16 19:36:10 +00:00
|
|
|
corenet_tcp_connect_all_ports($1_mail_t)
|
2005-11-28 20:25:36 +00:00
|
|
|
corenet_tcp_connect_smtp_port($1_mail_t)
|
2006-05-26 20:29:51 +00:00
|
|
|
corenet_sendrecv_smtp_client_packets($1_mail_t)
|
2005-05-12 20:50:09 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
corecmd_exec_bin($1_mail_t)
|
2005-05-12 20:50:09 +00:00
|
|
|
|
2005-06-29 14:26:41 +00:00
|
|
|
files_read_etc_files($1_mail_t)
|
2005-07-12 20:34:24 +00:00
|
|
|
files_search_spool($1_mail_t)
|
2005-08-30 20:47:41 +00:00
|
|
|
# It wants to check for nscd
|
|
|
|
files_dontaudit_search_pids($1_mail_t)
|
2005-05-02 19:24:29 +00:00
|
|
|
|
2007-12-06 16:04:14 +00:00
|
|
|
auth_use_nsswitch($1_mail_t)
|
|
|
|
|
2005-11-28 20:25:36 +00:00
|
|
|
libs_use_ld_so($1_mail_t)
|
|
|
|
libs_use_shared_libs($1_mail_t)
|
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
logging_send_syslog_msg($1_mail_t)
|
2005-05-12 20:50:09 +00:00
|
|
|
|
2005-06-03 12:25:14 +00:00
|
|
|
miscfiles_read_localization($1_mail_t)
|
2005-05-12 20:50:09 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-12-05 20:18:20 +00:00
|
|
|
postfix_domtrans_user_mail_handler($1_mail_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-28 20:25:36 +00:00
|
|
|
procmail_exec($1_mail_t)
|
|
|
|
')
|
|
|
|
|
2006-04-05 15:32:38 +00:00
|
|
|
optional_policy(`
|
|
|
|
qmail_domtrans_inject($1_mail_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-29 21:27:15 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_mail_t, mail_spool_t, mqueue_spool_t;
|
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_dirs_pattern($1_mail_t,$1_mail_tmp_t,$1_mail_tmp_t)
|
|
|
|
manage_files_pattern($1_mail_t,$1_mail_tmp_t,$1_mail_tmp_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_tmp_filetrans($1_mail_t, $1_mail_tmp_t, { file dir })
|
2005-11-28 20:25:36 +00:00
|
|
|
|
|
|
|
allow $1_mail_t etc_mail_t:dir { getattr search };
|
|
|
|
|
|
|
|
# Write to /var/spool/mail and /var/spool/mqueue.
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_files_pattern($1_mail_t,mail_spool_t,mail_spool_t)
|
|
|
|
manage_files_pattern($1_mail_t,mqueue_spool_t,mqueue_spool_t)
|
2005-11-28 20:25:36 +00:00
|
|
|
|
|
|
|
# Check available space.
|
|
|
|
fs_getattr_xattr_fs($1_mail_t)
|
|
|
|
|
|
|
|
files_read_etc_runtime_files($1_mail_t)
|
|
|
|
|
|
|
|
# Write to /var/log/sendmail.st
|
|
|
|
sendmail_manage_log($1_mail_t)
|
|
|
|
sendmail_create_log($1_mail_t)
|
|
|
|
')
|
|
|
|
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
2006-09-06 22:07:25 +00:00
|
|
|
## The per role template for the mta module.
|
2005-11-28 20:25:36 +00:00
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## This template creates a derived domain which is
|
|
|
|
## a email transfer agent, which sends mail on
|
|
|
|
## behalf of the user.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## This template is invoked automatically for each user, and
|
|
|
|
## generally does not need to be invoked directly
|
|
|
|
## by policy writers.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="userdomain_prefix">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-28 20:25:36 +00:00
|
|
|
## The prefix of the user domain (e.g., user
|
|
|
|
## is the prefix for user_t).
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-28 20:25:36 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="user_domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-28 20:25:36 +00:00
|
|
|
## The type of the user domain.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-28 20:25:36 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="user_role">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-28 20:25:36 +00:00
|
|
|
## The role associated with the user domain.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-28 20:25:36 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-09-06 22:07:25 +00:00
|
|
|
template(`mta_per_role_template',`
|
2007-02-16 23:01:42 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute mta_user_agent;
|
|
|
|
attribute mailserver_delivery;
|
2008-05-22 15:24:52 +00:00
|
|
|
type sendmail_exec_t;
|
2007-02-16 23:01:42 +00:00
|
|
|
')
|
2006-02-03 16:13:15 +00:00
|
|
|
|
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# Declarations
|
|
|
|
#
|
2005-11-28 20:25:36 +00:00
|
|
|
|
|
|
|
mta_base_mail_template($1)
|
|
|
|
role $3 types $1_mail_t;
|
|
|
|
|
|
|
|
##############################
|
|
|
|
#
|
|
|
|
# $1_mail_t local policy
|
|
|
|
#
|
|
|
|
|
|
|
|
# Transition from the user domain to the derived domain.
|
2006-12-12 20:08:08 +00:00
|
|
|
domtrans_pattern($2, sendmail_exec_t, $1_mail_t)
|
2005-11-28 20:25:36 +00:00
|
|
|
allow $2 sendmail_exec_t:lnk_file { getattr read };
|
|
|
|
|
2006-02-20 21:33:25 +00:00
|
|
|
domain_use_interactive_fds($1_mail_t)
|
2005-11-28 20:25:36 +00:00
|
|
|
|
2005-08-30 15:48:57 +00:00
|
|
|
userdom_use_user_terminals($1,$1_mail_t)
|
2005-08-30 20:47:41 +00:00
|
|
|
# Write to the user domain tty. cjp: why?
|
|
|
|
userdom_use_user_terminals($1,mta_user_agent)
|
2005-10-25 00:00:50 +00:00
|
|
|
# Create dead.letter in user home directories.
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_manage_user_home_content_files($1,$1_mail_t)
|
|
|
|
userdom_user_home_dir_filetrans_user_home_content($1,$1_mail_t,file)
|
2005-10-25 00:00:50 +00:00
|
|
|
# for reading .forward - maybe we need a new type for it?
|
|
|
|
# also for delivering mail to maildir
|
2006-02-21 18:40:44 +00:00
|
|
|
userdom_manage_user_home_content_dirs($1,mailserver_delivery)
|
|
|
|
userdom_manage_user_home_content_files($1,mailserver_delivery)
|
|
|
|
userdom_manage_user_home_content_symlinks($1,mailserver_delivery)
|
|
|
|
userdom_manage_user_home_content_pipes($1,mailserver_delivery)
|
|
|
|
userdom_manage_user_home_content_sockets($1,mailserver_delivery)
|
|
|
|
userdom_user_home_dir_filetrans_user_home_content($1,mailserver_delivery,{ dir file lnk_file fifo_file sock_file })
|
2006-02-14 20:39:45 +00:00
|
|
|
# Read user temporary files.
|
|
|
|
userdom_read_user_tmp_files($1,$1_mail_t)
|
|
|
|
userdom_dontaudit_append_user_tmp_files($1,$1_mail_t)
|
|
|
|
# cjp: this should probably be read all user tmp
|
|
|
|
# files in an appropriate place for mta_user_agent
|
|
|
|
userdom_read_user_tmp_files($1,mta_user_agent)
|
2005-08-30 15:48:57 +00:00
|
|
|
|
2005-07-12 20:34:24 +00:00
|
|
|
tunable_policy(`use_samba_home_dirs',`
|
|
|
|
fs_manage_cifs_files($1_mail_t)
|
|
|
|
fs_manage_cifs_symlinks($1_mail_t)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-23 20:18:36 +00:00
|
|
|
allow $1_mail_t self:capability dac_override;
|
|
|
|
|
2006-02-14 20:39:45 +00:00
|
|
|
# Read user temporary files.
|
2005-06-03 12:25:14 +00:00
|
|
|
# postfix seems to need write access if the file handle is opened read/write
|
2006-02-14 20:39:45 +00:00
|
|
|
userdom_rw_user_tmp_files($1,$1_mail_t)
|
|
|
|
|
|
|
|
postfix_read_config($1_mail_t)
|
|
|
|
postfix_list_spool($1_mail_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
')
|
2005-05-02 19:24:29 +00:00
|
|
|
')
|
|
|
|
|
2005-11-28 22:19:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Provide extra permissions for admin users
|
|
|
|
## mail domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="userdomain_prefix">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-28 22:19:08 +00:00
|
|
|
## The prefix of the user domain (e.g., user
|
|
|
|
## is the prefix for user_t).
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-28 22:19:08 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="user_domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-28 22:19:08 +00:00
|
|
|
## The type of the user domain.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-28 22:19:08 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-11-28 22:19:08 +00:00
|
|
|
#
|
|
|
|
template(`mta_admin_template',`
|
2006-01-26 18:04:57 +00:00
|
|
|
gen_require(`
|
|
|
|
type $1_mail_t;
|
|
|
|
')
|
|
|
|
|
2007-10-02 16:04:50 +00:00
|
|
|
# allow the sysadmin to do "mail someone < /home/user/whatever"
|
|
|
|
userdom_read_unpriv_users_home_content_files($1_mail_t)
|
2005-11-28 22:19:08 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-11-28 22:19:08 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute mta_user_agent;
|
|
|
|
type etc_aliases_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow mta_user_agent $2:fifo_file { read write };
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_dirs_pattern($1_mail_t,etc_aliases_t,etc_aliases_t)
|
|
|
|
manage_files_pattern($1_mail_t,etc_aliases_t,etc_aliases_t)
|
|
|
|
manage_lnk_files_pattern($1_mail_t,etc_aliases_t,etc_aliases_t)
|
|
|
|
manage_fifo_files_pattern($1_mail_t,etc_aliases_t,etc_aliases_t)
|
|
|
|
manage_sock_files_pattern($1_mail_t,etc_aliases_t,etc_aliases_t)
|
2006-02-21 18:40:44 +00:00
|
|
|
files_etc_filetrans($1_mail_t,etc_aliases_t,{ file lnk_file sock_file fifo_file })
|
2005-11-28 22:19:08 +00:00
|
|
|
|
|
|
|
# postfix needs this for newaliases
|
2006-01-31 19:21:01 +00:00
|
|
|
files_getattr_tmp_dirs($1_mail_t)
|
2005-11-28 22:19:08 +00:00
|
|
|
|
|
|
|
postfix_exec_master($1_mail_t)
|
|
|
|
|
|
|
|
ifdef(`distro_redhat',`
|
|
|
|
# compatability for old default main.cf
|
2006-02-21 18:40:44 +00:00
|
|
|
postfix_config_filetrans($1_mail_t,etc_aliases_t,{ dir file lnk_file sock_file fifo_file })
|
2005-11-28 22:19:08 +00:00
|
|
|
')
|
|
|
|
')
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Make the specified domain usable for a mail server.
|
|
|
|
## </summary>
|
|
|
|
## <param name="type">
|
|
|
|
## <summary>
|
|
|
|
## Type to be used as a mail server domain.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2008-05-15 13:10:34 +00:00
|
|
|
## <param name="entry_point">
|
|
|
|
## <summary>
|
|
|
|
## Type of the program to be used as an entry point to this domain.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`mta_mailserver',`
|
2005-06-17 18:41:07 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute mailserver_domain;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
init_daemon_domain($1,$2)
|
2005-06-03 12:25:14 +00:00
|
|
|
typeattribute $1 mailserver_domain;
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-07-07 15:25:28 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Modified mailserver interface for
|
|
|
|
## sendmail daemon use.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## A modified MTA mail server interface for
|
|
|
|
## the sendmail program. It's design does
|
|
|
|
## not fit well with policy, and using the
|
|
|
|
## regular interface causes a type_transition
|
|
|
|
## conflict if direct running of init scripts
|
|
|
|
## is enabled.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## This interface should most likely only be used
|
|
|
|
## by the sendmail policy.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-07 15:25:28 +00:00
|
|
|
## The type to be used for the mail server.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-07 15:25:28 +00:00
|
|
|
## </param>
|
2008-05-22 15:24:52 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`mta_sendmail_mailserver',`
|
2005-06-17 18:41:07 +00:00
|
|
|
gen_require(`
|
2005-07-07 15:25:28 +00:00
|
|
|
attribute mailserver_domain;
|
2005-06-17 18:41:07 +00:00
|
|
|
type sendmail_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-07-07 15:25:28 +00:00
|
|
|
init_system_domain($1,sendmail_exec_t)
|
|
|
|
typeattribute $1 mailserver_domain;
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-08-30 20:47:41 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Make a type a mailserver type used
|
|
|
|
## for sending mail.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-30 20:47:41 +00:00
|
|
|
## Mail server domain type used for sending mail.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-30 20:47:41 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`mta_mailserver_sender',`
|
|
|
|
gen_require(`
|
|
|
|
attribute mailserver_sender;
|
|
|
|
')
|
|
|
|
|
|
|
|
typeattribute $1 mailserver_sender;
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Make a type a mailserver type used
|
|
|
|
## for delivering mail to local users.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-30 20:47:41 +00:00
|
|
|
## Mail server domain type used for delivering mail.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-30 20:47:41 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`mta_mailserver_delivery',`
|
|
|
|
gen_require(`
|
|
|
|
attribute mailserver_delivery;
|
2005-10-25 00:00:50 +00:00
|
|
|
type mail_spool_t;
|
2005-08-30 20:47:41 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
typeattribute $1 mailserver_delivery;
|
2005-10-11 15:36:53 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 mail_spool_t:dir list_dir_perms;
|
|
|
|
create_files_pattern($1,mail_spool_t,mail_spool_t)
|
|
|
|
read_files_pattern($1,mail_spool_t,mail_spool_t)
|
|
|
|
create_lnk_files_pattern($1,mail_spool_t,mail_spool_t)
|
|
|
|
read_lnk_files_pattern($1,mail_spool_t,mail_spool_t)
|
2005-10-25 00:00:50 +00:00
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-21 15:38:22 +00:00
|
|
|
dovecot_manage_spool($1)
|
|
|
|
')
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-11 15:36:53 +00:00
|
|
|
# so MTA can access /var/lib/mailman/mail/wrapper
|
|
|
|
files_search_var_lib($1)
|
|
|
|
|
|
|
|
mailman_domtrans($1)
|
|
|
|
mailman_read_data_symlinks($1)
|
|
|
|
')
|
2005-08-30 20:47:41 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Make a type a mailserver type used
|
|
|
|
## for sending mail on behalf of local
|
|
|
|
## users to the local mail spool.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-30 20:47:41 +00:00
|
|
|
## Mail server domain type used for sending local mail.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-30 20:47:41 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`mta_mailserver_user_agent',`
|
|
|
|
gen_require(`
|
2005-10-17 17:55:38 +00:00
|
|
|
attribute mta_user_agent;
|
2005-08-30 20:47:41 +00:00
|
|
|
')
|
|
|
|
|
2005-10-17 17:55:38 +00:00
|
|
|
typeattribute $1 mta_user_agent;
|
|
|
|
|
2006-03-24 16:13:54 +00:00
|
|
|
optional_policy(`
|
2005-10-17 17:55:38 +00:00
|
|
|
# apache should set close-on-exec
|
2006-02-02 21:08:12 +00:00
|
|
|
apache_dontaudit_rw_stream_sockets($1)
|
|
|
|
apache_dontaudit_rw_sys_script_stream_sockets($1)
|
2005-10-17 17:55:38 +00:00
|
|
|
')
|
2005-08-30 20:47:41 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Send mail from the system.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`mta_send_mail',`
|
2005-06-17 18:41:07 +00:00
|
|
|
gen_require(`
|
2005-10-25 00:00:50 +00:00
|
|
|
attribute mta_user_agent;
|
2005-06-17 18:41:07 +00:00
|
|
|
type system_mail_t, sendmail_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 sendmail_exec_t:lnk_file read_lnk_file_perms;
|
2005-06-09 15:32:23 +00:00
|
|
|
domain_auto_trans($1, sendmail_exec_t, system_mail_t)
|
2005-06-03 12:25:14 +00:00
|
|
|
|
|
|
|
allow $1 system_mail_t:fd use;
|
|
|
|
allow system_mail_t $1:fd use;
|
|
|
|
allow system_mail_t $1:fifo_file rw_file_perms;
|
|
|
|
allow system_mail_t $1:process sigchld;
|
2005-07-21 20:34:57 +00:00
|
|
|
|
|
|
|
allow mta_user_agent $1:fd use;
|
|
|
|
allow mta_user_agent $1:process sigchld;
|
|
|
|
allow mta_user_agent $1:fifo_file { read write };
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:42:22 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute send mail in a specified domain.
|
|
|
|
## </summary>
|
|
|
|
## <desc>
|
|
|
|
## <p>
|
|
|
|
## Execute send mail in a specified domain.
|
|
|
|
## </p>
|
|
|
|
## <p>
|
|
|
|
## No interprocess communication (signals, pipes,
|
|
|
|
## etc.) is provided by this interface since
|
|
|
|
## the domains are not owned by this module.
|
|
|
|
## </p>
|
|
|
|
## </desc>
|
|
|
|
## <param name="source_domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to transition from.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
## <param name="target_domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to transition to.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`mta_sendmail_domtrans',`
|
|
|
|
gen_require(`
|
|
|
|
type sendmail_exec_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_usr($1)
|
2007-03-23 23:24:59 +00:00
|
|
|
corecmd_read_bin_symlinks($1)
|
2006-05-10 18:42:22 +00:00
|
|
|
domain_auto_trans($1,sendmail_exec_t,$2)
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Execute sendmail in the caller domain.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-12 20:50:09 +00:00
|
|
|
#
|
2006-05-10 18:42:22 +00:00
|
|
|
interface(`mta_sendmail_exec',`
|
2005-06-17 18:41:07 +00:00
|
|
|
gen_require(`
|
|
|
|
type sendmail_exec_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-09 15:32:23 +00:00
|
|
|
can_exec($1, sendmail_exec_t)
|
2005-05-12 20:50:09 +00:00
|
|
|
')
|
|
|
|
|
2005-10-22 23:50:23 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read mail server configuration.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-16 22:03:38 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-22 23:50:23 +00:00
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-10-22 23:50:23 +00:00
|
|
|
#
|
|
|
|
interface(`mta_read_config',`
|
|
|
|
gen_require(`
|
|
|
|
type etc_mail_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_etc($1)
|
2005-10-24 19:50:21 +00:00
|
|
|
allow $1 etc_mail_t:dir list_dir_perms;
|
2006-12-12 20:08:08 +00:00
|
|
|
read_files_pattern($1,etc_mail_t,etc_mail_t)
|
|
|
|
read_lnk_files_pattern($1,etc_mail_t,etc_mail_t)
|
2005-10-22 23:50:23 +00:00
|
|
|
')
|
|
|
|
|
2005-05-19 21:06:06 +00:00
|
|
|
########################################
|
2005-08-11 17:46:39 +00:00
|
|
|
## <summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## Read mail address aliases.
|
2005-08-11 17:46:39 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-16 22:03:38 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-06-23 21:30:57 +00:00
|
|
|
## </param>
|
2005-05-19 21:06:06 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`mta_read_aliases',`
|
2005-06-17 18:41:07 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_aliases_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 18:41:07 +00:00
|
|
|
files_search_etc($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 etc_aliases_t:file read_file_perms;
|
2005-05-19 21:06:06 +00:00
|
|
|
')
|
|
|
|
|
2006-01-16 22:03:38 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Type transition files created in /etc
|
|
|
|
## to the mail address aliases type.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-01-16 22:03:38 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2006-01-16 22:03:38 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-21 18:40:44 +00:00
|
|
|
interface(`mta_etc_filetrans_aliases',`
|
2006-01-16 22:03:38 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_aliases_t;
|
|
|
|
')
|
|
|
|
|
2006-02-21 18:40:44 +00:00
|
|
|
files_etc_filetrans($1,etc_aliases_t, file)
|
2006-01-16 22:03:38 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write mail aliases.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2006-09-06 22:07:25 +00:00
|
|
|
## <rolecap/>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`mta_rw_aliases',`
|
2005-06-17 18:41:07 +00:00
|
|
|
gen_require(`
|
|
|
|
type etc_aliases_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-17 18:41:07 +00:00
|
|
|
files_search_etc($1)
|
2005-10-23 20:18:36 +00:00
|
|
|
allow $1 etc_aliases_t:file { rw_file_perms setattr };
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2005-10-11 15:36:53 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read and write TCP
|
|
|
|
## sockets of mail delivery domains.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-11 15:36:53 +00:00
|
|
|
## Mail server domain.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-11 15:36:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`mta_dontaudit_rw_delivery_tcp_sockets',`
|
2005-10-11 15:36:53 +00:00
|
|
|
gen_require(`
|
2005-10-13 20:59:36 +00:00
|
|
|
attribute mailserver_delivery;
|
2005-10-11 15:36:53 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 mailserver_delivery:tcp_socket { read write };
|
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
2006-08-15 20:00:58 +00:00
|
|
|
## Connect to all mail servers over TCP. (Deprecated)
|
2005-10-11 15:36:53 +00:00
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-11 15:36:53 +00:00
|
|
|
## Mail server domain.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-11 15:36:53 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`mta_tcp_connect_all_mailservers',`
|
2006-08-15 20:00:58 +00:00
|
|
|
refpolicywarn(`$0($*) has been deprecated.')
|
2005-10-11 15:36:53 +00:00
|
|
|
')
|
|
|
|
|
2005-07-08 20:44:57 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read a symlink
|
|
|
|
## in the mail spool.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-07-08 20:44:57 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`mta_dontaudit_read_spool_symlinks',`
|
2005-07-08 20:44:57 +00:00
|
|
|
gen_require(`
|
|
|
|
type mail_spool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
dontaudit $1 mail_spool_t:lnk_file read;
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Get the attributes of mail spool files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-31 19:52:57 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`mta_getattr_spool',`
|
2005-06-17 18:41:07 +00:00
|
|
|
gen_require(`
|
|
|
|
type mail_spool_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
files_search_spool($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 mail_spool_t:dir list_dir_perms;
|
2005-06-03 12:25:14 +00:00
|
|
|
allow $1 mail_spool_t:lnk_file read;
|
|
|
|
allow $1 mail_spool_t:file getattr;
|
2005-05-31 19:52:57 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to get the attributes
|
|
|
|
## of mail spool files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain to not audit.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`mta_dontaudit_getattr_spool_files',`
|
2006-01-30 22:51:35 +00:00
|
|
|
gen_require(`
|
|
|
|
type mail_spool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_dontaudit_search_spool($1)
|
|
|
|
dontaudit $1 mail_spool_t:dir search;
|
|
|
|
dontaudit $1 mail_spool_t:lnk_file read;
|
|
|
|
dontaudit $1 mail_spool_t:file getattr;
|
|
|
|
')
|
|
|
|
|
2005-12-08 15:58:12 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Create private objects in the
|
|
|
|
## mail spool directory.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-12-08 15:58:12 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-12-08 15:58:12 +00:00
|
|
|
## </param>
|
|
|
|
## <param name="private type">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-12-08 15:58:12 +00:00
|
|
|
## The type of the object to be created.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-12-08 15:58:12 +00:00
|
|
|
## </param>
|
2006-03-02 23:41:11 +00:00
|
|
|
## <param name="object">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2006-03-02 23:41:11 +00:00
|
|
|
## The object class of the object being created.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-12-08 15:58:12 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-21 18:40:44 +00:00
|
|
|
interface(`mta_spool_filetrans',`
|
2005-12-08 15:58:12 +00:00
|
|
|
gen_require(`
|
|
|
|
type mail_spool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_spool($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
filetrans_pattern($1,mail_spool_t,$2,$3)
|
2005-12-08 15:58:12 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write the mail spool.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-16 21:10:33 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`mta_rw_spool',`
|
2005-06-17 18:41:07 +00:00
|
|
|
gen_require(`
|
|
|
|
type mail_spool_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
files_search_spool($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 mail_spool_t:dir list_dir_perms;
|
|
|
|
allow $1 mail_spool_t:file setattr;
|
|
|
|
rw_files_pattern($1,mail_spool_t,mail_spool_t)
|
|
|
|
read_lnk_files_pattern($1,mail_spool_t,mail_spool_t)
|
2005-05-16 21:10:33 +00:00
|
|
|
')
|
|
|
|
|
2005-08-30 20:47:41 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, and write the mail spool.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-08-30 20:47:41 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-08-30 20:47:41 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`mta_append_spool',`
|
|
|
|
gen_require(`
|
|
|
|
type mail_spool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_spool($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 mail_spool_t:dir list_dir_perms;
|
|
|
|
create_files_pattern($1,mail_spool_t,mail_spool_t)
|
|
|
|
write_files_pattern($1,mail_spool_t,mail_spool_t)
|
|
|
|
read_lnk_files_pattern($1,mail_spool_t,mail_spool_t)
|
2005-08-30 20:47:41 +00:00
|
|
|
')
|
|
|
|
|
2005-10-23 20:18:36 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Delete from the mail spool.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-23 20:18:36 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-23 20:18:36 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`mta_delete_spool',`
|
|
|
|
gen_require(`
|
|
|
|
type mail_spool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_spool($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
delete_files_pattern($1,mail_spool_t,mail_spool_t)
|
2005-10-23 20:18:36 +00:00
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete mail spool files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`mta_manage_spool',`
|
2005-06-17 18:41:07 +00:00
|
|
|
gen_require(`
|
|
|
|
type mail_spool_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-06-13 17:35:46 +00:00
|
|
|
files_search_spool($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_dirs_pattern($1,mail_spool_t,mail_spool_t)
|
|
|
|
manage_files_pattern($1,mail_spool_t,mail_spool_t)
|
|
|
|
manage_lnk_files_pattern($1,mail_spool_t,mail_spool_t)
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
|
|
|
|
2007-05-15 18:06:31 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Search mail queue dirs.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`mta_search_queue',`
|
|
|
|
gen_require(`
|
|
|
|
type mqueue_spool_t;
|
|
|
|
')
|
|
|
|
|
|
|
|
files_search_spool($1)
|
|
|
|
allow $1 mqueue_spool_t:dir search_dir_perms;
|
|
|
|
')
|
|
|
|
|
2005-11-15 20:17:18 +00:00
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Do not audit attempts to read and
|
|
|
|
## write the mail queue.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-11-15 20:17:18 +00:00
|
|
|
## Domain to not audit.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-11-15 20:17:18 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
interface(`mta_dontaudit_rw_queue',`
|
|
|
|
gen_require(`
|
|
|
|
type mqueue_spool_t;
|
|
|
|
')
|
|
|
|
|
2006-12-04 20:10:56 +00:00
|
|
|
dontaudit $1 mqueue_spool_t:dir search_dir_perms;
|
2005-11-15 20:17:18 +00:00
|
|
|
dontaudit $1 mqueue_spool_t:file { getattr read write };
|
|
|
|
')
|
|
|
|
|
2006-05-10 18:09:08 +00:00
|
|
|
########################################
|
|
|
|
## <summary>
|
|
|
|
## Create, read, write, and delete
|
|
|
|
## mail queue files.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
|
|
|
## <summary>
|
|
|
|
## Domain allowed access.
|
|
|
|
## </summary>
|
|
|
|
## </param>
|
2005-05-13 14:37:13 +00:00
|
|
|
#
|
2005-06-22 19:21:31 +00:00
|
|
|
interface(`mta_manage_queue',`
|
2005-06-17 18:41:07 +00:00
|
|
|
gen_require(`
|
|
|
|
type mqueue_spool_t;
|
|
|
|
')
|
2005-06-03 12:25:14 +00:00
|
|
|
|
2005-07-12 20:34:24 +00:00
|
|
|
files_search_spool($1)
|
2006-12-12 20:08:08 +00:00
|
|
|
manage_files_pattern($1,mqueue_spool_t,mqueue_spool_t)
|
2005-05-13 14:37:13 +00:00
|
|
|
')
|
2005-10-23 20:18:36 +00:00
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Read sendmail binary.
|
2005-10-23 22:10:59 +00:00
|
|
|
## </summary>
|
2005-10-23 20:18:36 +00:00
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-23 20:18:36 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-23 20:18:36 +00:00
|
|
|
## </param>
|
|
|
|
#
|
|
|
|
# cjp: added for postfix
|
|
|
|
interface(`mta_read_sendmail_bin',`
|
|
|
|
gen_require(`
|
2005-10-25 02:51:07 +00:00
|
|
|
type sendmail_exec_t;
|
2005-10-23 20:18:36 +00:00
|
|
|
')
|
|
|
|
|
2006-12-12 20:08:08 +00:00
|
|
|
allow $1 sendmail_exec_t:file read_file_perms;
|
2005-10-23 20:18:36 +00:00
|
|
|
')
|
|
|
|
|
|
|
|
#######################################
|
|
|
|
## <summary>
|
|
|
|
## Read and write unix domain stream sockets
|
|
|
|
## of user mail domains.
|
|
|
|
## </summary>
|
|
|
|
## <param name="domain">
|
2006-02-10 18:41:53 +00:00
|
|
|
## <summary>
|
2005-10-23 20:18:36 +00:00
|
|
|
## Domain allowed access.
|
2006-02-10 18:41:53 +00:00
|
|
|
## </summary>
|
2005-10-23 20:18:36 +00:00
|
|
|
## </param>
|
|
|
|
#
|
2006-02-02 21:08:12 +00:00
|
|
|
interface(`mta_rw_user_mail_stream_sockets',`
|
2005-10-23 20:18:36 +00:00
|
|
|
gen_require(`
|
|
|
|
attribute user_mail_domain;
|
|
|
|
')
|
|
|
|
|
|
|
|
allow $1 user_mail_domain:unix_stream_socket rw_socket_perms;
|
|
|
|
')
|