Chris PeBenito 17de1b
## <summary>Mailman is for managing electronic mail discussion and e-newsletter lists</summary>
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	The template to define a mailmain domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <desc>
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
##	This template creates a domain to be used for
Chris PeBenito 17de1b
##	a new mailman daemon.
Chris PeBenito 17de1b
##	

Chris PeBenito 17de1b
## </desc>
Chris PeBenito 17de1b
## <param name="userdomain_prefix">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	The type of daemon to be used eg, cgi would give mailman_cgi_
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
template(`mailman_domain_template', `
Chris PeBenito 17de1b
	type mailman_$1_t;
Chris PeBenito 17de1b
	domain_type(mailman_$1_t)
Chris PeBenito 17de1b
	role system_r types mailman_$1_t;
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	type mailman_$1_exec_t;
Chris PeBenito 17de1b
	domain_entry_file(mailman_$1_t, mailman_$1_exec_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	type mailman_$1_tmp_t;
Chris PeBenito 17de1b
	files_tmp_file(mailman_$1_tmp_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow mailman_$1_t self:{ unix_stream_socket unix_dgram_socket } create_socket_perms;
Chris PeBenito 17de1b
	allow mailman_$1_t self:tcp_socket create_stream_socket_perms;
Chris PeBenito 17de1b
	allow mailman_$1_t self:udp_socket create_socket_perms;
Chris PeBenito 17de1b
Chris PeBenito 92f08c
	files_search_spool(mailman_$1_t)
Chris PeBenito 92f08c
Chris PeBenito 92f08c
	manage_dirs_pattern(mailman_$1_t, mailman_archive_t, mailman_archive_t)
Chris PeBenito 92f08c
	manage_files_pattern(mailman_$1_t, mailman_archive_t, mailman_archive_t)
Chris PeBenito 92f08c
	manage_lnk_files_pattern(mailman_$1_t, mailman_archive_t, mailman_archive_t)
Chris PeBenito 92f08c
Chris PeBenito 0bfccd
	manage_dirs_pattern(mailman_$1_t, mailman_data_t, mailman_data_t)
Chris PeBenito 0bfccd
	manage_files_pattern(mailman_$1_t, mailman_data_t, mailman_data_t)
Chris PeBenito 0bfccd
	manage_lnk_files_pattern(mailman_$1_t, mailman_data_t, mailman_data_t)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	manage_files_pattern(mailman_$1_t, mailman_lock_t, mailman_lock_t)
Chris PeBenito 0bfccd
	files_lock_filetrans(mailman_$1_t, mailman_lock_t, file)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	manage_files_pattern(mailman_$1_t, mailman_log_t, mailman_log_t)
Chris PeBenito 0bfccd
	logging_log_filetrans(mailman_$1_t, mailman_log_t, file)
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	manage_dirs_pattern(mailman_$1_t, mailman_$1_tmp_t, mailman_$1_tmp_t)
Chris PeBenito 0bfccd
	manage_files_pattern(mailman_$1_t, mailman_$1_tmp_t, mailman_$1_tmp_t)
Chris PeBenito 17de1b
	files_tmp_filetrans(mailman_$1_t, mailman_$1_tmp_t, { file dir })
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	kernel_read_kernel_sysctls(mailman_$1_t)
Chris PeBenito 17de1b
	kernel_read_system_state(mailman_$1_t)
Chris PeBenito 17de1b
Chris PeBenito 190066
	corenet_all_recvfrom_unlabeled(mailman_$1_t)
Chris PeBenito 190066
	corenet_all_recvfrom_netlabel(mailman_$1_t)
Chris PeBenito 668b30
	corenet_tcp_sendrecv_generic_if(mailman_$1_t)
Chris PeBenito 668b30
	corenet_udp_sendrecv_generic_if(mailman_$1_t)
Chris PeBenito 668b30
	corenet_raw_sendrecv_generic_if(mailman_$1_t)
Chris PeBenito c12621
	corenet_tcp_sendrecv_generic_node(mailman_$1_t)
Chris PeBenito c12621
	corenet_udp_sendrecv_generic_node(mailman_$1_t)
Chris PeBenito c12621
	corenet_raw_sendrecv_generic_node(mailman_$1_t)
Chris PeBenito 17de1b
	corenet_tcp_sendrecv_all_ports(mailman_$1_t)
Chris PeBenito 17de1b
	corenet_udp_sendrecv_all_ports(mailman_$1_t)
Chris PeBenito c12621
	corenet_tcp_bind_generic_node(mailman_$1_t)
Chris PeBenito c12621
	corenet_udp_bind_generic_node(mailman_$1_t)
Chris PeBenito 17de1b
	corenet_tcp_connect_smtp_port(mailman_$1_t)
Chris PeBenito 17de1b
	corenet_sendrecv_smtp_client_packets(mailman_$1_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	fs_getattr_xattr_fs(mailman_$1_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	corecmd_exec_all_executables(mailman_$1_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	files_exec_etc_files(mailman_$1_t)
Chris PeBenito 17de1b
	files_list_usr(mailman_$1_t)
Chris PeBenito 17de1b
	files_list_var(mailman_$1_t)
Chris PeBenito 17de1b
	files_list_var_lib(mailman_$1_t)
Chris PeBenito 17de1b
	files_read_var_lib_symlinks(mailman_$1_t)
Chris PeBenito 17de1b
	files_read_etc_runtime_files(mailman_$1_t)
Chris PeBenito 17de1b
Chris PeBenito c0cf6e
	auth_use_nsswitch(mailman_$1_t)
Chris PeBenito c0cf6e
Chris PeBenito 17de1b
	libs_exec_ld_so(mailman_$1_t)
Chris PeBenito 17de1b
	libs_exec_lib_files(mailman_$1_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	logging_send_syslog_msg(mailman_$1_t)
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	miscfiles_read_localization(mailman_$1_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute mailman in the mailman 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(`mailman_domtrans',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mailman_mail_exec_t, mailman_mail_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	domtrans_pattern($1, mailman_mail_exec_t, mailman_mail_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute mailman CGI scripts in the 
Chris PeBenito 17de1b
##	mailman CGI 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(`mailman_domtrans_cgi',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mailman_cgi_exec_t, mailman_cgi_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	domtrans_pattern($1, mailman_cgi_exec_t, mailman_cgi_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute mailman in the caller domain.
Chris PeBenito 17de1b
## </summary>
Chris PeBenito 17de1b
## <param name="domain">
Chris PeBenito 17de1b
##	<summary>
Chris PeBenito 17de1b
##	Domain allowd access.
Chris PeBenito 17de1b
##	</summary>
Chris PeBenito 17de1b
## </param>
Chris PeBenito 17de1b
#
Chris PeBenito 17de1b
interface(`mailman_exec',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mailman_mail_exec_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	can_exec($1, mailman_mail_exec_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Send generic signals to the mailman cgi 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(`mailman_signal_cgi',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mailman_cgi_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 mailman_cgi_t:process signal;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow domain to search data directories.
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(`mailman_search_data',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mailman_data_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 mailman_data_t:dir search_dir_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow domain to to read mailman data 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(`mailman_read_data_files',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mailman_data_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 92f08c
	list_dirs_pattern($1, mailman_data_t, mailman_data_t)
Chris PeBenito 0bfccd
	read_files_pattern($1, mailman_data_t, mailman_data_t)
Chris PeBenito 92f08c
	read_lnk_files_pattern($1, mailman_data_t, mailman_data_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow domain to to create mailman data files
Chris PeBenito 17de1b
##	and write the 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
#
Chris PeBenito 17de1b
interface(`mailman_manage_data_files',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mailman_data_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 92f08c
	manage_dirs_pattern($1, mailman_data_t, mailman_data_t)
Chris PeBenito 0bfccd
	manage_files_pattern($1, mailman_data_t, mailman_data_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	List the contents of mailman data directories.
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(`mailman_list_data',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mailman_data_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	allow $1 mailman_data_t:dir list_dir_perms;
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow read acces to mailman data symbolic links.
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(`mailman_read_data_symlinks',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mailman_data_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	read_lnk_files_pattern($1, mailman_data_t, mailman_data_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 92f08c
##	Read mailman logs.
Chris PeBenito 92f08c
## </summary>
Chris PeBenito 92f08c
## <param name="domain">
Chris PeBenito 92f08c
##	<summary>
Chris PeBenito 92f08c
##	Domain allowed access.
Chris PeBenito 92f08c
##	</summary>
Chris PeBenito 92f08c
## </param>
Chris PeBenito 92f08c
#
Chris PeBenito 92f08c
interface(`mailman_read_log',`
Chris PeBenito 92f08c
	gen_require(`
Chris PeBenito 92f08c
		type mailman_log_t;
Chris PeBenito 92f08c
	')
Chris PeBenito 92f08c
Chris PeBenito 92f08c
	read_files_pattern($1, mailman_log_t, mailman_log_t)
Chris PeBenito 92f08c
')
Chris PeBenito 92f08c
Chris PeBenito 92f08c
#######################################
Chris PeBenito 92f08c
## <summary>
Chris PeBenito f7101c
##	Append to mailman logs.
Chris PeBenito f7101c
## </summary>
Chris PeBenito f7101c
## <param name="domain">
Chris PeBenito f7101c
##	<summary>
Chris PeBenito f7101c
##	Domain allowed access.
Chris PeBenito f7101c
##	</summary>
Chris PeBenito f7101c
## </param>
Chris PeBenito f7101c
#
Chris PeBenito f7101c
interface(`mailman_append_log',`
Chris PeBenito f7101c
	gen_require(`
Chris PeBenito f7101c
		type mailman_log_t;
Chris PeBenito f7101c
	')
Chris PeBenito f7101c
Chris PeBenito 0bfccd
	append_files_pattern($1, mailman_log_t, mailman_log_t)
Chris PeBenito f7101c
')
Chris PeBenito f7101c
Chris PeBenito f7101c
#######################################
Chris PeBenito f7101c
## <summary>
Chris PeBenito 17de1b
##	Create, read, write, and delete
Chris PeBenito 17de1b
##	mailman logs.
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(`mailman_manage_log',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mailman_log_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 0bfccd
	manage_files_pattern($1, mailman_log_t, mailman_log_t)
Chris PeBenito 0bfccd
	manage_lnk_files_pattern($1, mailman_log_t, mailman_log_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Allow domain to read mailman archive 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(`mailman_read_archive',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mailman_archive_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
	allow $1 mailman_archive_t:dir list_dir_perms;
Chris PeBenito 0bfccd
	read_files_pattern($1, mailman_archive_t, mailman_archive_t)
Chris PeBenito 0bfccd
	read_lnk_files_pattern($1, mailman_archive_t, mailman_archive_t)
Chris PeBenito 17de1b
')
Chris PeBenito 17de1b
Chris PeBenito 17de1b
#######################################
Chris PeBenito 17de1b
## <summary>
Chris PeBenito 17de1b
##	Execute mailman_queue in the mailman_queue 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(`mailman_domtrans_queue',`
Chris PeBenito 17de1b
	gen_require(`
Chris PeBenito 17de1b
		type mailman_queue_exec_t, mailman_queue_t;
Chris PeBenito 17de1b
	')
Chris PeBenito 17de1b
Chris PeBenito c0868a
	domtrans_pattern($1, mailman_queue_exec_t, mailman_queue_t)
Chris PeBenito 17de1b
')