|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Pyzor - Pyzor is a collaborative, networked system to detect and
|
|
Chris PeBenito |
31b7c0 |
# block spam using identifying digests of messages.
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Author: David Hampton <hampton@employees.org>
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# NOTE: This policy is based upon the FC3 pyzor rpm from ATrpms.
|
|
Chris PeBenito |
31b7c0 |
# Pyzor normally dumps everything into $HOME/.pyzor. By putting the
|
|
Chris PeBenito |
31b7c0 |
# following line to the spamassassin config file:
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# pyzor_options --homedir /etc/pyzor
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# the various files will be put into appropriate directories.
|
|
Chris PeBenito |
31b7c0 |
# (I.E. The log file into /var/log, etc.) This policy will work
|
|
Chris PeBenito |
31b7c0 |
# either way.
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
##########
|
|
Chris PeBenito |
31b7c0 |
# pyzor daemon
|
|
Chris PeBenito |
31b7c0 |
##########
|
|
Chris PeBenito |
31b7c0 |
daemon_domain(pyzord, `, privlog, nscd_client_domain')
|
|
Chris PeBenito |
31b7c0 |
pyzor_base_domain(pyzord)
|
|
Chris PeBenito |
31b7c0 |
allow pyzord_t pyzor_port_t:udp_socket name_bind;
|
|
Chris PeBenito |
31b7c0 |
home_domain_access(pyzord_t, sysadm, pyzor)
|
|
Chris PeBenito |
31b7c0 |
log_domain(pyzord)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# Read shared daemon/client config file
|
|
Chris PeBenito |
31b7c0 |
r_dir_file(pyzord_t, pyzor_etc_t)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# Write shared daemon/client data dir
|
|
Chris PeBenito |
31b7c0 |
allow pyzord_t var_lib_t:dir search;
|
|
Chris PeBenito |
31b7c0 |
create_dir_file(pyzord_t, pyzor_var_lib_t)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
##########
|
|
Chris PeBenito |
31b7c0 |
# Pyzor query application - from system_r applictions
|
|
Chris PeBenito |
31b7c0 |
##########
|
|
Chris PeBenito |
31b7c0 |
type pyzor_t, domain, privlog, daemon;
|
|
Chris PeBenito |
31b7c0 |
type pyzor_exec_t, file_type, sysadmfile, exec_type;
|
|
Chris PeBenito |
31b7c0 |
role system_r types pyzor_t;
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
pyzor_base_domain(pyzor)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
# System config/data files
|
|
Chris PeBenito |
31b7c0 |
etcdir_domain(pyzor)
|
|
Chris PeBenito |
31b7c0 |
var_lib_domain(pyzor)
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
##########
|
|
Chris PeBenito |
31b7c0 |
##########
|
|
Chris PeBenito |
31b7c0 |
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
# Some spam filters executes the pyzor code directly. Allow them access here.
|
|
Chris PeBenito |
31b7c0 |
#
|
|
Chris PeBenito |
31b7c0 |
ifdef(`spamd.te',`
|
|
Chris PeBenito |
31b7c0 |
domain_auto_trans(spamd_t, pyzor_exec_t, pyzor_t);
|
|
Chris PeBenito |
31b7c0 |
# pyzor needs access to the email spamassassin is checking
|
|
Chris PeBenito |
31b7c0 |
allow pyzor_t spamd_tmp_t:file r_file_perms;
|
|
Chris PeBenito |
31b7c0 |
')
|