Chris PeBenito 17de1b
## <summary>Policy common to all email tranfer agents.</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	MTA stub interface.  No access allowed.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain" optional="true">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	N/A
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_stub',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type sendmail_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Basic mail transfer agent domain template.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <desc>
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	This template creates a derived domain which is
Chris PeBenito 17de1b
##	a email transfer agent, which sends mail on
Chris PeBenito 17de1b
##	behalf of the user.
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	This is the basic types and rules, common
Chris PeBenito 17de1b
##	to the system agent and user agents.
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
## </desc>
Chris PeBenito 17de1b
## <param name="domain_prefix">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The prefix of the domain (e.g., user
Chris PeBenito 17de1b
##	is the prefix for user_t).
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
template(`mta_base_mail_template',`
Chris PeBenito 17de1b
Chris PeBenito 6b19be
	gen_require(`
Chris PeBenito 6b19be
		attribute user_mail_domain;
Chris PeBenito 6b19be
		type sendmail_exec_t;
Chris PeBenito 6b19be
	')
Chris PeBenito 6b19be
Chris PeBenito 17de1b
	##############################
Chris PeBenito 17de1b
	#
Chris PeBenito 17de1b
	# $1_mail_t declarations
Chris PeBenito 17de1b
	#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	type $1_mail_t, user_mail_domain;
Chris PeBenito d46cfe
	application_domain($1_mail_t,sendmail_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	type $1_mail_tmp_t;
Chris PeBenito 17de1b
	files_tmp_file($1_mail_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	##############################
Chris PeBenito 17de1b
	#
Chris PeBenito 17de1b
	# $1_mail_t local policy
Chris PeBenito 17de1b
	#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1_mail_t self:capability { setuid setgid chown };
Chris PeBenito 17de1b
	allow $1_mail_t self:process { signal_perms setrlimit };
Chris PeBenito 17de1b
	allow $1_mail_t self:tcp_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	# re-exec itself
Chris PeBenito 17de1b
	can_exec($1_mail_t, sendmail_exec_t)
Chris PeBenito c0868a
	allow $1_mail_t sendmail_exec_t:lnk_file read_lnk_file_perms;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	kernel_read_kernel_sysctls($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
	corenet_all_recvfrom_unlabeled($1_mail_t)
Chris PeBenito 190066
	corenet_all_recvfrom_netlabel($1_mail_t)
Chris PeBenito 17de1b
	corenet_tcp_sendrecv_all_if($1_mail_t)
Chris PeBenito 17de1b
	corenet_tcp_sendrecv_all_nodes($1_mail_t)
Chris PeBenito 17de1b
	corenet_tcp_sendrecv_all_ports($1_mail_t)
Chris PeBenito 17de1b
	corenet_tcp_connect_all_ports($1_mail_t)
Chris PeBenito 17de1b
	corenet_tcp_connect_smtp_port($1_mail_t)
Chris PeBenito 17de1b
	corenet_sendrecv_smtp_client_packets($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	corecmd_exec_bin($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_read_etc_files($1_mail_t)
Chris PeBenito 17de1b
	files_search_spool($1_mail_t)
Chris PeBenito 17de1b
	# It wants to check for nscd
Chris PeBenito 17de1b
	files_dontaudit_search_pids($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	libs_use_ld_so($1_mail_t)
Chris PeBenito 17de1b
	libs_use_shared_libs($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	logging_send_syslog_msg($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	miscfiles_read_localization($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	sysnet_read_config($1_mail_t)
Chris PeBenito 17de1b
	sysnet_dns_name_resolve($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 17de1b
		nis_use_ypbind($1_mail_t)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 17de1b
		nscd_socket_use($1_mail_t)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 17de1b
		postfix_domtrans_user_mail_handler($1_mail_t)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 17de1b
		procmail_exec($1_mail_t)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 17de1b
		qmail_domtrans_inject($1_mail_t)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 17de1b
		gen_require(`
Chris PeBenito 17de1b
			type etc_mail_t, mail_spool_t, mqueue_spool_t;
Chris PeBenito 17de1b
		')
Chris PeBenito 17de1b
Chris PeBenito c0868a
		manage_dirs_pattern($1_mail_t,$1_mail_tmp_t,$1_mail_tmp_t)
Chris PeBenito c0868a
		manage_files_pattern($1_mail_t,$1_mail_tmp_t,$1_mail_tmp_t)
Chris PeBenito 17de1b
		files_tmp_filetrans($1_mail_t, $1_mail_tmp_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		allow $1_mail_t etc_mail_t:dir { getattr search };
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		# Write to /var/spool/mail and /var/spool/mqueue.
Chris PeBenito c0868a
		manage_files_pattern($1_mail_t,mail_spool_t,mail_spool_t)
Chris PeBenito c0868a
		manage_files_pattern($1_mail_t,mqueue_spool_t,mqueue_spool_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		# Check available space.
Chris PeBenito 17de1b
		fs_getattr_xattr_fs($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		files_read_etc_runtime_files($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		# Write to /var/log/sendmail.st
Chris PeBenito 17de1b
		sendmail_manage_log($1_mail_t)
Chris PeBenito 17de1b
		sendmail_create_log($1_mail_t)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito bbcd3c
##	The per role template for the mta module.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <desc>
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	This template creates a derived domain which is
Chris PeBenito 17de1b
##	a email transfer agent, which sends mail on
Chris PeBenito 17de1b
##	behalf of the user.
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	This template is invoked automatically for each user, and
Chris PeBenito 17de1b
##	generally does not need to be invoked directly
Chris PeBenito 17de1b
##	by policy writers.
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
## </desc>
Chris PeBenito 17de1b
## <param name="userdomain_prefix">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The prefix of the user domain (e.g., user
Chris PeBenito 17de1b
##	is the prefix for user_t).
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="user_domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the user domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="user_role">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The role associated with the user domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito bbcd3c
template(`mta_per_role_template',`
Chris PeBenito 6b19be
	gen_require(`
Chris PeBenito 6b19be
		attribute mta_user_agent;
Chris PeBenito 6b19be
		attribute mailserver_delivery;
Chris PeBenito 6b19be
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	##############################
Chris PeBenito 17de1b
	#
Chris PeBenito 17de1b
	# Declarations
Chris PeBenito 17de1b
	#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	mta_base_mail_template($1)
Chris PeBenito 17de1b
	role $3 types $1_mail_t;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	##############################
Chris PeBenito 17de1b
	#
Chris PeBenito 17de1b
	# $1_mail_t local policy
Chris PeBenito 17de1b
	#
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	# Transition from the user domain to the derived domain.
Chris PeBenito c0868a
	domtrans_pattern($2, sendmail_exec_t, $1_mail_t)
Chris PeBenito 17de1b
	allow $2 sendmail_exec_t:lnk_file { getattr read };
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	domain_use_interactive_fds($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	userdom_use_user_terminals($1,$1_mail_t)
Chris PeBenito 17de1b
	# Write to the user domain tty. cjp: why?
Chris PeBenito 17de1b
	userdom_use_user_terminals($1,mta_user_agent)
Chris PeBenito 17de1b
	# Create dead.letter in user home directories.
Chris PeBenito 17de1b
	userdom_manage_user_home_content_files($1,$1_mail_t)
Chris PeBenito 17de1b
	userdom_user_home_dir_filetrans_user_home_content($1,$1_mail_t,file)
Chris PeBenito 17de1b
	# for reading .forward - maybe we need a new type for it?
Chris PeBenito 17de1b
	# also for delivering mail to maildir
Chris PeBenito 17de1b
	userdom_manage_user_home_content_dirs($1,mailserver_delivery)
Chris PeBenito 17de1b
	userdom_manage_user_home_content_files($1,mailserver_delivery)
Chris PeBenito 17de1b
	userdom_manage_user_home_content_symlinks($1,mailserver_delivery)
Chris PeBenito 17de1b
	userdom_manage_user_home_content_pipes($1,mailserver_delivery)
Chris PeBenito 17de1b
	userdom_manage_user_home_content_sockets($1,mailserver_delivery)
Chris PeBenito 17de1b
	userdom_user_home_dir_filetrans_user_home_content($1,mailserver_delivery,{ dir file lnk_file fifo_file sock_file })
Chris PeBenito 17de1b
	# Read user temporary files.
Chris PeBenito 17de1b
	userdom_read_user_tmp_files($1,$1_mail_t)
Chris PeBenito 17de1b
	userdom_dontaudit_append_user_tmp_files($1,$1_mail_t)
Chris PeBenito 17de1b
	# cjp: this should probably be read all user tmp
Chris PeBenito 17de1b
	# files in an appropriate place for mta_user_agent
Chris PeBenito 17de1b
	userdom_read_user_tmp_files($1,mta_user_agent)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	tunable_policy(`use_samba_home_dirs',`
Chris PeBenito 17de1b
		fs_manage_cifs_files($1_mail_t)
Chris PeBenito 17de1b
		fs_manage_cifs_symlinks($1_mail_t)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 17de1b
		allow $1_mail_t self:capability dac_override;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		# Read user temporary files.
Chris PeBenito 17de1b
		# postfix seems to need write access if the file handle is opened read/write
Chris PeBenito 17de1b
		userdom_rw_user_tmp_files($1,$1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		postfix_read_config($1_mail_t)
Chris PeBenito 17de1b
		postfix_list_spool($1_mail_t)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Provide extra permissions for admin users
Chris PeBenito 17de1b
##	mail domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="userdomain_prefix">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The prefix of the user domain (e.g., user
Chris PeBenito 17de1b
##	is the prefix for user_t).
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="user_domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the user domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
template(`mta_admin_template',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type $1_mail_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	ifdef(`strict_policy',`
Chris PeBenito 17de1b
		# allow the sysadmin to do "mail someone < /home/user/whatever"
Chris PeBenito 17de1b
		userdom_read_unpriv_users_home_content_files($1_mail_t)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 17de1b
		gen_require(`
Chris PeBenito 17de1b
			attribute mta_user_agent;
Chris PeBenito 17de1b
			type etc_aliases_t;
Chris PeBenito 17de1b
		')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		allow mta_user_agent $2:fifo_file { read write };
Chris PeBenito 17de1b
Chris PeBenito c0868a
		manage_dirs_pattern($1_mail_t,etc_aliases_t,etc_aliases_t)
Chris PeBenito c0868a
		manage_files_pattern($1_mail_t,etc_aliases_t,etc_aliases_t)
Chris PeBenito c0868a
		manage_lnk_files_pattern($1_mail_t,etc_aliases_t,etc_aliases_t)
Chris PeBenito c0868a
		manage_fifo_files_pattern($1_mail_t,etc_aliases_t,etc_aliases_t)
Chris PeBenito c0868a
		manage_sock_files_pattern($1_mail_t,etc_aliases_t,etc_aliases_t)
Chris PeBenito 17de1b
		files_etc_filetrans($1_mail_t,etc_aliases_t,{ file lnk_file sock_file fifo_file })
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		# postfix needs this for newaliases
Chris PeBenito 17de1b
		files_getattr_tmp_dirs($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		postfix_exec_master($1_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		ifdef(`distro_redhat',`
Chris PeBenito 17de1b
			# compatability for old default main.cf
Chris PeBenito 17de1b
			postfix_config_filetrans($1_mail_t,etc_aliases_t,{ dir file lnk_file sock_file fifo_file })
Chris PeBenito 17de1b
		')
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Make the specified domain usable for a mail server.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="type">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Type to be used as a mail server domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_mailserver',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute mailserver_domain;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	init_daemon_domain($1,$2)
Chris PeBenito 17de1b
	typeattribute $1 mailserver_domain;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Modified mailserver interface for
Chris PeBenito 17de1b
##	sendmail daemon use.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <desc>
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	A modified MTA mail server interface for
Chris PeBenito 17de1b
##	the sendmail program.  It's design does
Chris PeBenito 17de1b
##	not fit well with policy, and using the
Chris PeBenito 17de1b
##	regular interface causes a type_transition
Chris PeBenito 17de1b
##	conflict if direct running of init scripts
Chris PeBenito 17de1b
##	is enabled.
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	This interface should most likely only be used
Chris PeBenito 17de1b
##	by the sendmail policy.
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
## </desc>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type to be used for the mail server.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="entry_point">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type to be used for the domain entry point program.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
interface(`mta_sendmail_mailserver',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute mailserver_domain;
Chris PeBenito 17de1b
		type sendmail_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	init_system_domain($1,sendmail_exec_t)
Chris PeBenito 17de1b
	typeattribute $1 mailserver_domain;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Make a type a mailserver type used
Chris PeBenito 17de1b
##	for sending mail.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Mail server domain type used for sending mail.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_mailserver_sender',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute mailserver_sender;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	typeattribute $1 mailserver_sender;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Make a type a mailserver type used
Chris PeBenito 17de1b
##	for delivering mail to local users.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Mail server domain type used for delivering mail.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_mailserver_delivery',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute mailserver_delivery;
Chris PeBenito 17de1b
		type mail_spool_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	typeattribute $1 mailserver_delivery;
Chris PeBenito 17de1b
Chris PeBenito c0868a
	allow $1 mail_spool_t:dir list_dir_perms;
Chris PeBenito c0868a
	create_files_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito c0868a
	read_files_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito c0868a
	create_lnk_files_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito c0868a
	read_lnk_files_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 17de1b
		dovecot_manage_spool($1)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 17de1b
		# so MTA can access /var/lib/mailman/mail/wrapper
Chris PeBenito 17de1b
		files_search_var_lib($1)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
		mailman_domtrans($1)
Chris PeBenito 17de1b
		mailman_read_data_symlinks($1)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Make a type a mailserver type used
Chris PeBenito 17de1b
##	for sending mail on behalf of local
Chris PeBenito 17de1b
##	users to the local mail spool.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Mail server domain type used for sending local mail.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_mailserver_user_agent',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute mta_user_agent;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	typeattribute $1 mta_user_agent;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	optional_policy(`
Chris PeBenito 17de1b
		# apache should set close-on-exec
Chris PeBenito 17de1b
		apache_dontaudit_rw_stream_sockets($1)
Chris PeBenito 17de1b
		apache_dontaudit_rw_sys_script_stream_sockets($1)
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send mail from the system.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_send_mail',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute mta_user_agent;
Chris PeBenito 17de1b
		type system_mail_t, sendmail_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	allow $1 sendmail_exec_t:lnk_file read_lnk_file_perms;
Chris PeBenito 17de1b
	domain_auto_trans($1, sendmail_exec_t, system_mail_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 system_mail_t:fd use;
Chris PeBenito 17de1b
	allow system_mail_t $1:fd use;
Chris PeBenito 17de1b
	allow system_mail_t $1:fifo_file rw_file_perms;
Chris PeBenito 17de1b
	allow system_mail_t $1:process sigchld;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow mta_user_agent $1:fd use;
Chris PeBenito 17de1b
	allow mta_user_agent $1:process sigchld;
Chris PeBenito 17de1b
	allow mta_user_agent $1:fifo_file { read write };
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute send mail in a specified domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <desc>
Chris PeBenito 17de1b
##      

Chris PeBenito 17de1b
##	Execute send mail in a specified domain.
Chris PeBenito 17de1b
##      

Chris PeBenito 17de1b
##      

Chris PeBenito 17de1b
##      No interprocess communication (signals, pipes,
Chris PeBenito 17de1b
##      etc.) is provided by this interface since
Chris PeBenito 17de1b
##      the domains are not owned by this module.
Chris PeBenito 17de1b
##      

Chris PeBenito 17de1b
## </desc>
Chris PeBenito 17de1b
## <param name="source_domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain to transition from.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="target_domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain to transition to.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_sendmail_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type sendmail_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_usr($1)
Chris PeBenito 8021cb
	corecmd_read_bin_symlinks($1)
Chris PeBenito 17de1b
	domain_auto_trans($1,sendmail_exec_t,$2)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute sendmail in the caller domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_sendmail_exec',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type sendmail_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	can_exec($1, sendmail_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read mail server configuration.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_read_config',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type etc_mail_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito 17de1b
	allow $1 etc_mail_t:dir list_dir_perms;
Chris PeBenito c0868a
	read_files_pattern($1,etc_mail_t,etc_mail_t)
Chris PeBenito c0868a
	read_lnk_files_pattern($1,etc_mail_t,etc_mail_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read mail address aliases.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_read_aliases',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type etc_aliases_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito c0868a
	allow $1 etc_aliases_t:file read_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Type transition files created in /etc
Chris PeBenito 17de1b
##	to the mail address aliases type.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_etc_filetrans_aliases',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type etc_aliases_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_etc_filetrans($1,etc_aliases_t, file)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read and write mail aliases.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito bbcd3c
## <rolecap/>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_rw_aliases',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type etc_aliases_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_etc($1)
Chris PeBenito 17de1b
	allow $1 etc_aliases_t:file { rw_file_perms setattr };
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to read and write TCP
Chris PeBenito 17de1b
##	sockets of mail delivery domains.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Mail server domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_dontaudit_rw_delivery_tcp_sockets',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute mailserver_delivery;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dontaudit $1 mailserver_delivery:tcp_socket { read write };
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 33c7e6
##	Connect to all mail servers over TCP.  (Deprecated)
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Mail server domain.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_tcp_connect_all_mailservers',`
Chris PeBenito 33c7e6
	refpolicywarn(`$0($*) has been deprecated.')
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to read a symlink
Chris PeBenito 17de1b
##	in the mail spool.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_dontaudit_read_spool_symlinks',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mail_spool_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	dontaudit $1 mail_spool_t:lnk_file read;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Get the attributes of mail spool files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_getattr_spool',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mail_spool_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_spool($1)
Chris PeBenito c0868a
	allow $1 mail_spool_t:dir list_dir_perms;
Chris PeBenito 17de1b
	allow $1 mail_spool_t:lnk_file read;
Chris PeBenito 17de1b
	allow $1 mail_spool_t:file getattr;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to get the attributes
Chris PeBenito 17de1b
##	of mail spool files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain to not audit.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_dontaudit_getattr_spool_files',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mail_spool_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_dontaudit_search_spool($1)
Chris PeBenito 17de1b
	dontaudit $1 mail_spool_t:dir search;
Chris PeBenito 17de1b
	dontaudit $1 mail_spool_t:lnk_file read;
Chris PeBenito 17de1b
	dontaudit $1 mail_spool_t:file getattr;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create private objects in the 
Chris PeBenito 17de1b
##	mail spool directory.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="private type">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of the object to be created.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
## <param name="object">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The object class of the object being created.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_spool_filetrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mail_spool_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_spool($1)
Chris PeBenito c0868a
	filetrans_pattern($1,mail_spool_t,$2,$3)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read and write the mail spool.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_rw_spool',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mail_spool_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_spool($1)
Chris PeBenito c0868a
	allow $1 mail_spool_t:dir list_dir_perms;
Chris PeBenito c0868a
	allow $1 mail_spool_t:file setattr;
Chris PeBenito c0868a
	rw_files_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito c0868a
	read_lnk_files_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, and write the mail spool.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_append_spool',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mail_spool_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_spool($1)
Chris PeBenito c0868a
	allow $1 mail_spool_t:dir list_dir_perms;
Chris PeBenito c0868a
	create_files_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito c0868a
	write_files_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito c0868a
	read_lnk_files_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Delete from the mail spool.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_delete_spool',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mail_spool_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_spool($1)
Chris PeBenito c0868a
	delete_files_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete mail spool files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_manage_spool',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mail_spool_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_spool($1)
Chris PeBenito c0868a
	manage_dirs_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito c0868a
	manage_files_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito c0868a
	manage_lnk_files_pattern($1,mail_spool_t,mail_spool_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito a39a93
########################################
Chris PeBenito a39a93
## <summary>
Chris PeBenito a39a93
##	Search mail queue dirs.
Chris PeBenito a39a93
## </summary>
Chris PeBenito a39a93
## <param name="domain">
Chris PeBenito a39a93
##	<summary>
Chris PeBenito a39a93
##	Domain allowed access.
Chris PeBenito a39a93
##	</summary>
Chris PeBenito a39a93
## </param>
Chris PeBenito a39a93
#
Chris PeBenito a39a93
interface(`mta_search_queue',`
Chris PeBenito a39a93
	gen_require(`
Chris PeBenito a39a93
		type mqueue_spool_t;
Chris PeBenito a39a93
	')
Chris PeBenito a39a93
Chris PeBenito a39a93
	files_search_spool($1)
Chris PeBenito a39a93
	allow $1 mqueue_spool_t:dir search_dir_perms;
Chris PeBenito a39a93
')
Chris PeBenito a39a93
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Do not audit attempts to read and
Chris PeBenito 17de1b
##	write the mail queue.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain to not audit.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_dontaudit_rw_queue',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mqueue_spool_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito d6d16b
	dontaudit $1 mqueue_spool_t:dir search_dir_perms;
Chris PeBenito 17de1b
	dontaudit $1 mqueue_spool_t:file { getattr read write };
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
########################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete
Chris PeBenito 17de1b
##	mail queue files.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_manage_queue',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mqueue_spool_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_search_spool($1)
Chris PeBenito c0868a
	manage_files_pattern($1,mqueue_spool_t,mqueue_spool_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read sendmail binary.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
# cjp: added for postfix
Chris PeBenito 17de1b
interface(`mta_read_sendmail_bin',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type sendmail_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	allow $1 sendmail_exec_t:file read_file_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Read and write unix domain stream sockets
Chris PeBenito 17de1b
##	of user mail domains.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowed access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mta_rw_user_mail_stream_sockets',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		attribute user_mail_domain;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 user_mail_domain:unix_stream_socket rw_socket_perms;
Chris PeBenito 17de1b
')