|
Chris PeBenito |
04926d |
## <summary>Postfix email server</summary>
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
########################################
|
|
Chris PeBenito |
04926d |
## <summary>
|
|
Chris PeBenito |
04926d |
## Postfix stub interface. No access allowed.
|
|
Chris PeBenito |
04926d |
## </summary>
|
|
Chris PeBenito |
04926d |
## <param name="domain" optional="true">
|
|
Chris PeBenito |
04926d |
## N/A
|
|
Chris PeBenito |
04926d |
## </param>
|
|
Chris PeBenito |
04926d |
#
|
|
Chris PeBenito |
04926d |
interface(`postfix_stub',`
|
|
Chris PeBenito |
04926d |
gen_require(`
|
|
Chris PeBenito |
04926d |
type postfix_master_t;
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
template(`postfix_domain_template',`
|
|
Chris PeBenito |
04926d |
type postfix_$1_t;
|
|
Chris PeBenito |
04926d |
type postfix_$1_exec_t;
|
|
Chris PeBenito |
04926d |
domain_type(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
domain_entry_file(postfix_$1_t,postfix_$1_exec_t)
|
|
Chris PeBenito |
04926d |
role system_r types postfix_$1_t;
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
dontaudit postfix_$1_t self:capability sys_tty_config;
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t self:process { signal_perms setpgid };
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t self:unix_dgram_socket create_socket_perms;
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t self:unix_stream_socket create_stream_socket_perms;
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t self:unix_stream_socket connectto;
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow postfix_master_t postfix_$1_t:process signal;
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t postfix_etc_t:dir r_dir_perms;
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t postfix_etc_t:file r_file_perms;
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
can_exec(postfix_$1_t, postfix_$1_exec_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t postfix_exec_t:file rx_file_perms;
|
|
Chris PeBenito |
04926d |
# cjp: ???
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t postfix_exec_t:dir r_dir_perms;
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t postfix_master_t:process sigchld;
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t postfix_spool_t:dir r_dir_perms;
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t postfix_var_run_t:file manage_file_perms;
|
|
Chris PeBenito |
04926d |
files_create_pid(postfix_$1_t,postfix_var_run_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
kernel_read_system_state(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
kernel_read_network_state(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
kernel_read_all_sysctl(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
dev_read_sysfs(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
dev_read_rand(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
dev_read_urand(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
fs_search_auto_mountpoints(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
fs_getattr_xattr_fs(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
term_dontaudit_use_console(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
corecmd_list_bin(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corecmd_list_sbin(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corecmd_read_bin_symlink(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corecmd_read_sbin_symlink(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corecmd_exec_shell(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
files_read_etc_files(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
files_read_etc_runtime_files(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
files_search_spool(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
files_getattr_tmp_dir(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
init_use_fd(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
init_sigchld(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
libs_use_ld_so(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
libs_use_shared_libs(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
logging_send_syslog_msg(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
miscfiles_read_localization(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
miscfiles_read_certs(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
userdom_dontaudit_use_unpriv_user_fd(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
ifdef(`targeted_policy', `
|
|
Chris PeBenito |
04926d |
term_dontaudit_use_unallocated_tty(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
term_dontaudit_use_generic_pty(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
files_dontaudit_read_root_file(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
optional_policy(`udev.te',`
|
|
Chris PeBenito |
04926d |
udev_read_db(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
template(`postfix_server_domain_template',`
|
|
Chris PeBenito |
04926d |
postfix_domain_template($1)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t self:capability { setuid setgid dac_override };
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t postfix_master_t:unix_stream_socket { connectto rw_stream_socket_perms };
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t self:tcp_socket create_socket_perms;
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t self:udp_socket create_socket_perms;
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
domain_auto_trans(postfix_master_t, postfix_$1_exec_t, postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
corenet_tcp_sendrecv_all_if(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corenet_udp_sendrecv_all_if(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corenet_raw_sendrecv_all_if(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corenet_tcp_sendrecv_all_nodes(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corenet_udp_sendrecv_all_nodes(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corenet_raw_sendrecv_all_nodes(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corenet_tcp_sendrecv_all_ports(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corenet_udp_sendrecv_all_ports(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corenet_tcp_bind_all_nodes(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corenet_udp_bind_all_nodes(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
corenet_tcp_connect_all_ports(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
sysnet_read_config(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
optional_policy(`nis.te',`
|
|
Chris PeBenito |
04926d |
nis_use_ypbind(postfix_$1_t)
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
template(`postfix_user_domain_template',`
|
|
Chris PeBenito |
04926d |
postfix_domain_template($1)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t self:capability dac_override;
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
domain_auto_trans(user_mail_domain, postfix_$1_exec_t, postfix_$1_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
# this is replaced by run interfaces
|
|
Chris PeBenito |
04926d |
role sysadm_r types postfix_$1_t;
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t userdomain:process sigchld;
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t userdomain:fifo_file { write getattr };
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t { userdomain privfd }:fd use;
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
template(`postfix_public_domain_template',`
|
|
Chris PeBenito |
04926d |
postfix_server_domain_template($1)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow postfix_$1_t postfix_public_t:dir search;
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
########################################
|
|
Chris PeBenito |
04926d |
## <summary>
|
|
Chris PeBenito |
04926d |
## Read postfix configuration files.
|
|
Chris PeBenito |
04926d |
## </summary>
|
|
Chris PeBenito |
04926d |
## <param name="domain">
|
|
Chris PeBenito |
04926d |
## Domain allowed access.
|
|
Chris PeBenito |
04926d |
## </param>
|
|
Chris PeBenito |
04926d |
#
|
|
Chris PeBenito |
04926d |
interface(`postfix_read_config',`
|
|
Chris PeBenito |
04926d |
gen_require(`
|
|
Chris PeBenito |
04926d |
type postfix_etc_t;
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow $1 postfix_etc_t:dir { getattr read search };
|
|
Chris PeBenito |
04926d |
allow $1 postfix_etc_t:file { read getattr };
|
|
Chris PeBenito |
04926d |
allow $1 postfix_etc_t:lnk_file { getattr read };
|
|
Chris PeBenito |
04926d |
files_search_etc($1)
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
########################################
|
|
Chris PeBenito |
04926d |
## <summary>
|
|
Chris PeBenito |
04926d |
## Execute the master postfix program in the
|
|
Chris PeBenito |
04926d |
## postfix_master domain.
|
|
Chris PeBenito |
04926d |
## </summary>
|
|
Chris PeBenito |
04926d |
## <param name="domain">
|
|
Chris PeBenito |
04926d |
## Domain allowed access.
|
|
Chris PeBenito |
04926d |
## </param>
|
|
Chris PeBenito |
04926d |
#
|
|
Chris PeBenito |
04926d |
interface(`postfix_domtrans_master',`
|
|
Chris PeBenito |
04926d |
gen_require(`
|
|
Chris PeBenito |
04926d |
type postfix_master_t, postfix_master_exec_t;
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
domain_auto_trans($1,postfix_master_exec_t,postfix_master_t)
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow $1 postfix_master_t:fd use;
|
|
Chris PeBenito |
04926d |
allow postfix_master_t $1:fd use;
|
|
Chris PeBenito |
04926d |
allow postfix_master_t $1:fifo_file rw_file_perms;
|
|
Chris PeBenito |
04926d |
allow postfix_master_t $1:process sigchld;
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
########################################
|
|
Chris PeBenito |
04926d |
## <summary>
|
|
Chris PeBenito |
04926d |
## Search postfix mail spool directories.
|
|
Chris PeBenito |
04926d |
## </summary>
|
|
Chris PeBenito |
04926d |
## <param name="domain">
|
|
Chris PeBenito |
04926d |
## Domain allowed access.
|
|
Chris PeBenito |
04926d |
## </param>
|
|
Chris PeBenito |
04926d |
#
|
|
Chris PeBenito |
04926d |
interface(`postfix_search_spool',`
|
|
Chris PeBenito |
04926d |
gen_require(`
|
|
Chris PeBenito |
04926d |
type postfix_spool_t;
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow $1 postfix_spool_t:dir search_dir_perms;
|
|
Chris PeBenito |
04926d |
files_search_spool($1)
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
########################################
|
|
Chris PeBenito |
04926d |
## <summary>
|
|
Chris PeBenito |
04926d |
## List postfix mail spool directories.
|
|
Chris PeBenito |
04926d |
## </summary>
|
|
Chris PeBenito |
04926d |
## <param name="domain">
|
|
Chris PeBenito |
04926d |
## Domain allowed access.
|
|
Chris PeBenito |
04926d |
## </param>
|
|
Chris PeBenito |
04926d |
#
|
|
Chris PeBenito |
04926d |
interface(`postfix_list_spool',`
|
|
Chris PeBenito |
04926d |
gen_require(`
|
|
Chris PeBenito |
04926d |
type postfix_spool_t;
|
|
Chris PeBenito |
04926d |
')
|
|
Chris PeBenito |
04926d |
|
|
Chris PeBenito |
04926d |
allow $1 postfix_spool_t:dir list_dir_perms;
|
|
Chris PeBenito |
04926d |
files_search_spool($1)
|
|
Chris PeBenito |
04926d |
')
|