Policy for milter-greylist
Patch attached. I'm using this myself and policy is already added in Fedora.
Paul.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: milter-greylist.patch
Type: text/x-patch
Size: 2556 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20090603/2547a367/attachment.bin
Quoted 2 lines · Paul Howarth
Patch attached. I'm using this myself and policy is already added in Fedora.
Merged.
Quoted 71 lines
Index: policy/modules/services/milter.te
===================================================================modules/services/milter.te (working copy) renamed from modules/services/milter.te (revision 2991) +1
-1@@ -10,7 +10,8 @@ attribute milter_domains; attribute milter_data_type; -# currently-supported milters are milter-regex and spamass-milter +# currently-supported milters are milter-greylist, milter-regex andspamass-milter
modules/services/milter.te (working copy) renamed from modules/services/milter.te (revision 2991) +14
-0+milter_template(greylist) milter_template(regex) milter_template(spamass)@@ -22,6 +23,35 @@ ######################################## # +# milter-greylist local policy +# ensure smtp clients retry mail like real MTAs and not spamware +# http://hcpnet.free.fr/milter-greylist/ +# + +# Look up username for dropping privs +auth_use_nsswitch(greylist_milter_t) + +# It creates a pid file /var/run/milter-greylist.pid +files_pid_filetrans(greylist_milter_t, greylist_milter_data_t, file) + +# It removes any existing socket (not owned by root) whilst running as root, +# fixes permissions, renices itself and then calls setgid() and
setuid()tomodules/services/milter.te (working copy) renamed from modules/services/milter.te (revision 2991) +3
-0+# drop privileges +kernel_read_kernel_sysctls(greylist_milter_t) +allow greylist_milter_t self:capability { chown dac_override setgidsetuid
sys_nice};modules/services/milter.te (working copy) renamed from modules/services/milter.te (revision 2991) +6
-0+allow greylist_milter_t self:process { setsched getsched }; + +# Allow the milter to read a GeoIP database in /usr/share +files_read_usr_files(greylist_milter_t) + +# The milter runs from /var/lib/milter-greylist and maintains filesthere
modules/services/milter.te (working copy) renamed from modules/services/milter.te (revision 2991) +7
-0+files_search_var_lib(greylist_milter_t); + +# Config is in /etc/mail/greylist.conf +mta_read_config(greylist_milter_t) + +######################################## +# # milter-regex local policy # filter emails using regular expressions # http://www.benzedrine.cx/milter-regex.htmlIndex: policy/modules/services/milter.fc
===================================================================modules/services/milter.fc (working copy) renamed from modules/services/milter.fc (revision 2991) +6
-0@@ -1,3 +1,9 @@ +/usr/sbin/milter-greylist -- gen_context(system_u:object_r:greylist_milter_exec_t,s0) + +/var/lib/milter-greylist(/.*)? gen_context(system_u:object_r:greylist_milter_data_t,s0) +/var/run/milter-greylist(/.*)? gen_context(system_u:object_r:greylist_milter_data_t,s0) +/var/run/milter-greylist \.pid -- gen_context(system_u:object_r:greylist_milter_data_t,s0) + /usr/sbin/milter-regex -- gen_context(system_u:object_r:regex_milter_exec_t,s0) /var/spool/milter-regex(/.*)? gen_context(system_u:object_r:regex_milter_data_t,s0)
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC (410) 290-1411 x150