|
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 |
f7eaee |
## <param name="domain" unused="true">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
f7eaee |
## Domain allowed access.
|
|
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 |
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 |
0bfccd |
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 |
9c4067 |
kernel_read_system_state($1_mail_t)
|
|
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 |
668b30 |
corenet_tcp_sendrecv_generic_if($1_mail_t)
|
|
Chris PeBenito |
c12621 |
corenet_tcp_sendrecv_generic_node($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 |
09e216 |
auth_use_nsswitch($1_mail_t)
|
|
Chris PeBenito |
09e216 |
|
|
Chris PeBenito |
9c4067 |
init_dontaudit_rw_utmp($1_mail_t)
|
|
Chris PeBenito |
9c4067 |
|
|
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 |
optional_policy(`
|
|
Chris PeBenito |
363e8f |
exim_read_log($1_mail_t)
|
|
Chris PeBenito |
363e8f |
exim_append_log($1_mail_t)
|
|
Chris PeBenito |
363e8f |
exim_manage_spool_files($1_mail_t)
|
|
Chris PeBenito |
363e8f |
')
|
|
Chris PeBenito |
363e8f |
|
|
Chris PeBenito |
363e8f |
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 |
0bfccd |
manage_dirs_pattern($1_mail_t, $1_mail_tmp_t, $1_mail_tmp_t)
|
|
Chris PeBenito |
0bfccd |
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 |
82d277 |
allow $1_mail_t etc_mail_t:dir search_dir_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Write to /var/spool/mail and /var/spool/mqueue.
|
|
Chris PeBenito |
0bfccd |
manage_files_pattern($1_mail_t, mail_spool_t, mail_spool_t)
|
|
Chris PeBenito |
0bfccd |
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 |
363e8f |
optional_policy(`
|
|
Chris PeBenito |
363e8f |
uucp_manage_spool($1_mail_t)
|
|
Chris PeBenito |
363e8f |
')
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Role access for mta
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="role">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## Role allowed access
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
296273 |
## User domain for the role
|
|
Chris PeBenito |
17de1b |
## </summary>
|
|
Chris PeBenito |
17de1b |
## </param>
|
|
Chris PeBenito |
17de1b |
#
|
|
Chris PeBenito |
296273 |
interface(`mta_role',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
6b19be |
attribute mta_user_agent;
|
|
Chris PeBenito |
296273 |
type user_mail_t, sendmail_exec_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
role $1 types { user_mail_t mta_user_agent };
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
# Transition from the user domain to the derived domain.
|
|
Chris PeBenito |
296273 |
domtrans_pattern($2, sendmail_exec_t, user_mail_t)
|
|
Dominick Grift |
f66acf |
allow $2 sendmail_exec_t:lnk_file read_lnk_file_perms;
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
296273 |
allow mta_user_agent $2:fd use;
|
|
Chris PeBenito |
296273 |
allow mta_user_agent $2:process sigchld;
|
|
Chris PeBenito |
296273 |
allow mta_user_agent $2:fifo_file { read write };
|
|
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 |
8f3a0a |
## <param name="entry_point">
|
|
Chris PeBenito |
8f3a0a |
## <summary>
|
|
Chris PeBenito |
8f3a0a |
## Type of the program to be used as an entry point to this domain.
|
|
Chris PeBenito |
8f3a0a |
## </summary>
|
|
Chris PeBenito |
8f3a0a |
## </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 |
9c4067 |
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 |
36095d |
## Make the specified type a MTA executable file.
|
|
Chris PeBenito |
36095d |
## </summary>
|
|
Chris PeBenito |
36095d |
## <param name="type">
|
|
Chris PeBenito |
36095d |
## <summary>
|
|
Chris PeBenito |
36095d |
## Type to be used as a mail client.
|
|
Chris PeBenito |
36095d |
## </summary>
|
|
Chris PeBenito |
36095d |
## </param>
|
|
Chris PeBenito |
36095d |
#
|
|
Chris PeBenito |
36095d |
interface(`mta_agent_executable',`
|
|
Chris PeBenito |
36095d |
gen_require(`
|
|
Chris PeBenito |
36095d |
attribute mta_exec_type;
|
|
Chris PeBenito |
36095d |
')
|
|
Chris PeBenito |
36095d |
|
|
Chris PeBenito |
36095d |
typeattribute $1 mta_exec_type;
|
|
Chris PeBenito |
36095d |
|
|
Chris PeBenito |
36095d |
application_executable_file($1)
|
|
Chris PeBenito |
36095d |
')
|
|
Chris PeBenito |
36095d |
|
|
Dan Walsh |
3eaa99 |
######################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Dontaudit read and write an leaked file descriptors
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dominick Grift |
1976dd |
## <summary>
|
|
Dominick Grift |
1976dd |
## Domain allowed access.
|
|
Dominick Grift |
1976dd |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`mta_dontaudit_leaks_system_mail',`
|
|
Dominick Grift |
1976dd |
gen_require(`
|
|
Dominick Grift |
1976dd |
type system_mail_t;
|
|
Dominick Grift |
1976dd |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dominick Grift |
1976dd |
dontaudit $1 system_mail_t:fifo_file write;
|
|
Dominick Grift |
1976dd |
dontaudit $1 system_mail_t:tcp_socket { read write };
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Chris PeBenito |
36095d |
########################################
|
|
Chris PeBenito |
36095d |
## <summary>
|
|
Chris PeBenito |
36095d |
## Make the specified type by a system MTA.
|
|
Chris PeBenito |
36095d |
## </summary>
|
|
Chris PeBenito |
36095d |
## <param name="type">
|
|
Chris PeBenito |
36095d |
## <summary>
|
|
Chris PeBenito |
36095d |
## Type to be used as a mail client.
|
|
Chris PeBenito |
36095d |
## </summary>
|
|
Chris PeBenito |
36095d |
## </param>
|
|
Chris PeBenito |
36095d |
#
|
|
Chris PeBenito |
36095d |
interface(`mta_system_content',`
|
|
Chris PeBenito |
36095d |
gen_require(`
|
|
Chris PeBenito |
36095d |
attribute mailcontent_type;
|
|
Chris PeBenito |
36095d |
')
|
|
Chris PeBenito |
36095d |
|
|
Chris PeBenito |
36095d |
typeattribute $1 mailcontent_type;
|
|
Chris PeBenito |
36095d |
')
|
|
Chris PeBenito |
36095d |
|
|
Chris PeBenito |
36095d |
########################################
|
|
Chris PeBenito |
36095d |
## <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 |
b34db7 |
#
|
|
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 |
3f67f7 |
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 |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
typeattribute $1 mailserver_delivery;
|
|
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 |
|
|
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>
|
|
Dominick Grift |
288845 |
## Domain allowed to transition.
|
|
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 |
36095d |
type system_mail_t;
|
|
Chris PeBenito |
36095d |
attribute mta_exec_type;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
36095d |
allow $1 mta_exec_type:lnk_file read_lnk_file_perms;
|
|
Chris PeBenito |
e19b8d |
corecmd_read_bin_symlinks($1)
|
|
Chris PeBenito |
36095d |
domtrans_pattern($1, mta_exec_type, system_mail_t)
|
|
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 |
9c4067 |
allow mta_user_agent $1:fifo_file rw_fifo_file_perms;
|
|
Dan Walsh |
3eaa99 |
|
|
Dominick Grift |
1976dd |
ifdef(`hide_broken_symptoms',`
|
|
Dan Walsh |
3eaa99 |
dontaudit system_mail_t $1:socket_class_set { read write };
|
|
Dan Walsh |
3eaa99 |
')
|
|
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 |
ff8f0a |
##
|
|
Chris PeBenito |
17de1b |
## Execute send mail in a specified domain.
|
|
Chris PeBenito |
ff8f0a |
##
|
|
Chris PeBenito |
ff8f0a |
##
|
|
Chris PeBenito |
ff8f0a |
## No interprocess communication (signals, pipes,
|
|
Chris PeBenito |
ff8f0a |
## etc.) is provided by this interface since
|
|
Chris PeBenito |
ff8f0a |
## the domains are not owned by this module.
|
|
Chris PeBenito |
ff8f0a |
##
|
|
Chris PeBenito |
17de1b |
## </desc>
|
|
Chris PeBenito |
17de1b |
## <param name="source_domain">
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Dominick Grift |
288845 |
## Domain allowed to transition.
|
|
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(`
|
|
Dan Walsh |
3eaa99 |
attribute mta_exec_type;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
files_search_usr($1)
|
|
Dan Walsh |
3eaa99 |
allow $1 mta_exec_type:lnk_file read_lnk_file_perms;
|
|
Chris PeBenito |
8021cb |
corecmd_read_bin_symlinks($1)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
allow $2 mta_exec_type:file entrypoint;
|
|
Dan Walsh |
3eaa99 |
domtrans_pattern($1, mta_exec_type, $2)
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
########################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
e19b8d |
## Send system mail client a signal
|
|
Chris PeBenito |
e19b8d |
## </summary>
|
|
Chris PeBenito |
e19b8d |
## <param name="domain">
|
|
Chris PeBenito |
e19b8d |
## <summary>
|
|
Chris PeBenito |
e19b8d |
## Domain allowed access.
|
|
Chris PeBenito |
e19b8d |
## </summary>
|
|
Chris PeBenito |
e19b8d |
## </param>
|
|
Chris PeBenito |
e19b8d |
#
|
|
Chris PeBenito |
e19b8d |
#
|
|
Chris PeBenito |
e19b8d |
interface(`mta_signal_system_mail',`
|
|
Chris PeBenito |
e19b8d |
gen_require(`
|
|
Chris PeBenito |
e19b8d |
type system_mail_t;
|
|
Chris PeBenito |
e19b8d |
')
|
|
Chris PeBenito |
e19b8d |
|
|
Chris PeBenito |
e19b8d |
allow $1 system_mail_t:process signal;
|
|
Chris PeBenito |
e19b8d |
')
|
|
Chris PeBenito |
e19b8d |
|
|
Chris PeBenito |
e19b8d |
########################################
|
|
Chris PeBenito |
e19b8d |
## <summary>
|
|
Dan Walsh |
ef98a3 |
## Send system mail client a kill signal
|
|
Dan Walsh |
ef98a3 |
## </summary>
|
|
Dan Walsh |
ef98a3 |
## <param name="domain">
|
|
Dan Walsh |
ef98a3 |
## <summary>
|
|
Dan Walsh |
ef98a3 |
## Domain allowed access.
|
|
Dan Walsh |
ef98a3 |
## </summary>
|
|
Dan Walsh |
ef98a3 |
## </param>
|
|
Dan Walsh |
ef98a3 |
#
|
|
Dan Walsh |
ef98a3 |
#
|
|
Dan Walsh |
ef98a3 |
interface(`mta_kill_system_mail',`
|
|
Dan Walsh |
ef98a3 |
gen_require(`
|
|
Dan Walsh |
ef98a3 |
type system_mail_t;
|
|
Dan Walsh |
ef98a3 |
')
|
|
Dan Walsh |
ef98a3 |
|
|
Dan Walsh |
ef98a3 |
allow $1 system_mail_t:process sigkill;
|
|
Dan Walsh |
ef98a3 |
')
|
|
Dan Walsh |
ef98a3 |
|
|
Dan Walsh |
ef98a3 |
########################################
|
|
Dan Walsh |
ef98a3 |
## <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 |
0bfccd |
read_files_pattern($1, etc_mail_t, etc_mail_t)
|
|
Chris PeBenito |
0bfccd |
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 |
363e8f |
## write mail server configuration.
|
|
Chris PeBenito |
363e8f |
## </summary>
|
|
Chris PeBenito |
363e8f |
## <param name="domain">
|
|
Chris PeBenito |
363e8f |
## <summary>
|
|
Chris PeBenito |
363e8f |
## Domain allowed access.
|
|
Chris PeBenito |
363e8f |
## </summary>
|
|
Chris PeBenito |
363e8f |
## </param>
|
|
Chris PeBenito |
363e8f |
## <rolecap/>
|
|
Chris PeBenito |
363e8f |
#
|
|
Chris PeBenito |
363e8f |
interface(`mta_write_config',`
|
|
Chris PeBenito |
363e8f |
gen_require(`
|
|
Chris PeBenito |
363e8f |
type etc_mail_t;
|
|
Chris PeBenito |
363e8f |
')
|
|
Chris PeBenito |
363e8f |
|
|
Dan Walsh |
3eaa99 |
manage_files_pattern($1, etc_mail_t, etc_mail_t)
|
|
Dominick Grift |
f66acf |
allow $1 etc_mail_t:file setattr_file_perms;
|
|
Chris PeBenito |
363e8f |
')
|
|
Chris PeBenito |
363e8f |
|
|
Chris PeBenito |
363e8f |
########################################
|
|
Chris PeBenito |
363e8f |
## <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 |
aa7c46 |
## Create, read, write, and delete mail address aliases.
|
|
Chris PeBenito |
aa7c46 |
## </summary>
|
|
Chris PeBenito |
aa7c46 |
## <param name="domain">
|
|
Chris PeBenito |
aa7c46 |
## <summary>
|
|
Chris PeBenito |
aa7c46 |
## Domain allowed access.
|
|
Chris PeBenito |
aa7c46 |
## </summary>
|
|
Chris PeBenito |
aa7c46 |
## </param>
|
|
Chris PeBenito |
aa7c46 |
#
|
|
Chris PeBenito |
aa7c46 |
interface(`mta_manage_aliases',`
|
|
Chris PeBenito |
aa7c46 |
gen_require(`
|
|
Chris PeBenito |
aa7c46 |
type etc_aliases_t;
|
|
Chris PeBenito |
aa7c46 |
')
|
|
Chris PeBenito |
aa7c46 |
|
|
Chris PeBenito |
aa7c46 |
files_search_etc($1)
|
|
Chris PeBenito |
aa7c46 |
manage_files_pattern($1, etc_aliases_t, etc_aliases_t)
|
|
Chris PeBenito |
aa7c46 |
manage_lnk_files_pattern($1, etc_aliases_t, etc_aliases_t)
|
|
Chris PeBenito |
aa7c46 |
')
|
|
Chris PeBenito |
aa7c46 |
|
|
Chris PeBenito |
aa7c46 |
########################################
|
|
Chris PeBenito |
aa7c46 |
## <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 |
0bfccd |
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)
|
|
Dominick Grift |
f66acf |
allow $1 etc_aliases_t:file { rw_file_perms setattr_file_perms };
|
|
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>
|
|
Dominick Grift |
288845 |
## Domain to not audit.
|
|
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>
|
|
Dominick Grift |
288845 |
## Domain allowed access.
|
|
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>
|
|
Dominick Grift |
288845 |
## Domain to not audit.
|
|
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 |
363e8f |
getattr_files_pattern($1, mail_spool_t, mail_spool_t)
|
|
Chris PeBenito |
363e8f |
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 |
## 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 |
363e8f |
dontaudit $1 mail_spool_t:dir search_dir_perms;
|
|
Dominick Grift |
f66acf |
dontaudit $1 mail_spool_t:lnk_file read_lnk_file_perms;
|
|
Dominick Grift |
f66acf |
dontaudit $1 mail_spool_t:file getattr_file_perms;
|
|
Chris PeBenito |
17de1b |
')
|
|
Chris PeBenito |
17de1b |
|
|
Chris PeBenito |
17de1b |
#######################################
|
|
Chris PeBenito |
17de1b |
## <summary>
|
|
Chris PeBenito |
9c4067 |
## 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 |
0bfccd |
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;
|
|
Dominick Grift |
f66acf |
allow $1 mail_spool_t:file setattr_file_perms;
|
|
Dan Walsh |
3eaa99 |
manage_files_pattern($1, mail_spool_t, mail_spool_t)
|
|
Chris PeBenito |
0bfccd |
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 |
0bfccd |
create_files_pattern($1, mail_spool_t, mail_spool_t)
|
|
Chris PeBenito |
0bfccd |
write_files_pattern($1, mail_spool_t, mail_spool_t)
|
|
Chris PeBenito |
0bfccd |
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 |
0bfccd |
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 |
0bfccd |
manage_dirs_pattern($1, mail_spool_t, mail_spool_t)
|
|
Chris PeBenito |
0bfccd |
manage_files_pattern($1, mail_spool_t, mail_spool_t)
|
|
Chris PeBenito |
0bfccd |
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 |
e19b8d |
## List the mail queue.
|
|
Chris PeBenito |
e19b8d |
## </summary>
|
|
Chris PeBenito |
e19b8d |
## <param name="domain">
|
|
Chris PeBenito |
e19b8d |
## <summary>
|
|
Chris PeBenito |
e19b8d |
## Domain allowed access.
|
|
Chris PeBenito |
e19b8d |
## </summary>
|
|
Chris PeBenito |
e19b8d |
## </param>
|
|
Chris PeBenito |
e19b8d |
#
|
|
Chris PeBenito |
e19b8d |
interface(`mta_list_queue',`
|
|
Chris PeBenito |
e19b8d |
gen_require(`
|
|
Chris PeBenito |
e19b8d |
type mqueue_spool_t;
|
|
Chris PeBenito |
e19b8d |
')
|
|
Chris PeBenito |
e19b8d |
|
|
Chris PeBenito |
e19b8d |
allow $1 mqueue_spool_t:dir list_dir_perms;
|
|
Chris PeBenito |
e19b8d |
files_search_spool($1)
|
|
Chris PeBenito |
e19b8d |
')
|
|
Chris PeBenito |
e19b8d |
|
|
Chris PeBenito |
e19b8d |
#######################################
|
|
Chris PeBenito |
e19b8d |
## <summary>
|
|
Chris PeBenito |
9ff89c |
## Read the mail queue.
|
|
Chris PeBenito |
9ff89c |
## </summary>
|
|
Chris PeBenito |
9ff89c |
## <param name="domain">
|
|
Chris PeBenito |
9ff89c |
## <summary>
|
|
Chris PeBenito |
9ff89c |
## Domain allowed access.
|
|
Chris PeBenito |
9ff89c |
## </summary>
|
|
Chris PeBenito |
9ff89c |
## </param>
|
|
Chris PeBenito |
9ff89c |
#
|
|
Chris PeBenito |
9ff89c |
interface(`mta_read_queue',`
|
|
Chris PeBenito |
9ff89c |
gen_require(`
|
|
Chris PeBenito |
9ff89c |
type mqueue_spool_t;
|
|
Chris PeBenito |
9ff89c |
')
|
|
Chris PeBenito |
9ff89c |
|
|
Chris PeBenito |
9ff89c |
read_files_pattern($1, mqueue_spool_t, mqueue_spool_t)
|
|
Chris PeBenito |
9ff89c |
files_search_spool($1)
|
|
Chris PeBenito |
9ff89c |
')
|
|
Chris PeBenito |
9ff89c |
|
|
Chris PeBenito |
9ff89c |
#######################################
|
|
Chris PeBenito |
9ff89c |
## <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;
|
|
Dominick Grift |
f66acf |
dontaudit $1 mqueue_spool_t:file rw_file_perms;
|
|
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 |
363e8f |
manage_dirs_pattern($1, mqueue_spool_t, mqueue_spool_t)
|
|
Chris PeBenito |
0bfccd |
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 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Type transition files created in calling dir
|
|
Dan Walsh |
3eaa99 |
## to the mail address aliases type.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Directory to transition on.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`mta_filetrans_aliases',`
|
|
Dominick Grift |
d01706 |
gen_require(`
|
|
Dominick Grift |
d01706 |
type etc_aliases_t;
|
|
Dominick Grift |
d01706 |
')
|
|
Dominick Grift |
d01706 |
|
|
Dan Walsh |
3eaa99 |
filetrans_pattern($1, $2, etc_aliases_t, file)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
######################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dominick Grift |
1976dd |
## ALlow domain to read mail content in the homedir
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dominick Grift |
1976dd |
## <summary>
|
|
Dominick Grift |
1976dd |
## Domain allowed access.
|
|
Dominick Grift |
1976dd |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`mta_read_home',`
|
|
Dominick Grift |
1976dd |
gen_require(`
|
|
Dominick Grift |
1976dd |
type mail_home_t;
|
|
Dominick Grift |
1976dd |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dominick Grift |
1976dd |
userdom_search_user_home_dirs($1)
|
|
Dominick Grift |
1976dd |
read_files_pattern($1, mail_home_t, mail_home_t)
|
|
Dominick Grift |
dc47bf |
|
|
Dominick Grift |
dc47bf |
ifdef(`distro_redhat',`
|
|
Dominick Grift |
dc47bf |
userdom_search_admin_dir($1)
|
|
Dominick Grift |
dc47bf |
')
|
|
Dan Walsh |
3eaa99 |
')
|