1spamd_selinux(8) SELinux Policy spamd spamd_selinux(8)
2
3
4
6 spamd_selinux - Security Enhanced Linux Policy for the spamd processes
7
9 Security-Enhanced Linux secures the spamd processes via flexible manda‐
10 tory access control.
11
12 The spamd processes execute with the spamd_t SELinux type. You can
13 check if you have these processes running by executing the ps command
14 with the -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep spamd_t
19
20
21
23 The spamd_t SELinux type can be entered via the spamd_exec_t file type.
24
25 The default entrypoint paths for the spamd_t domain are the following:
26
27 /usr/bin/spamd, /usr/bin/pyzord, /usr/sbin/spamd, /usr/sbin/spampd,
28 /usr/bin/mimedefang, /usr/bin/mimedefang-multiplexor,
29 /usr/libexec/mimedefang-wrapper
30
32 SELinux defines process types (domains) for each process running on the
33 system
34
35 You can see the context of a process using the -Z option to ps
36
37 Policy governs the access confined processes have to files. SELinux
38 spamd policy is very flexible allowing users to setup their spamd pro‐
39 cesses in as secure a method as possible.
40
41 The following process types are defined for spamd:
42
43 spamd_update_t, spamd_t
44
45 Note: semanage permissive -a spamd_t can be used to make the process
46 type spamd_t permissive. SELinux does not deny access to permissive
47 process types, but the AVC (SELinux denials) messages are still gener‐
48 ated.
49
50
52 SELinux policy is customizable based on least access required. spamd
53 policy is extremely flexible and has several booleans that allow you to
54 manipulate the policy and run spamd with the tightest access possible.
55
56
57
58 If you want to allow spamd to read/write user home directories, you
59 must turn on the spamd_enable_home_dirs boolean. Enabled by default.
60
61 setsebool -P spamd_enable_home_dirs 1
62
63
64
65 If you want to dontaudit all daemons scheduling requests (setsched,
66 sys_nice), you must turn on the daemons_dontaudit_scheduling boolean.
67 Enabled by default.
68
69 setsebool -P daemons_dontaudit_scheduling 1
70
71
72
73 If you want to allow all domains to execute in fips_mode, you must turn
74 on the fips_mode boolean. Enabled by default.
75
76 setsebool -P fips_mode 1
77
78
79
80 If you want to allow system to run with NIS, you must turn on the
81 nis_enabled boolean. Disabled by default.
82
83 setsebool -P nis_enabled 1
84
85
86
88 SELinux defines port types to represent TCP and UDP ports.
89
90 You can see the types associated with a port by using the following
91 command:
92
93 semanage port -l
94
95
96 Policy governs the access confined processes have to these ports.
97 SELinux spamd policy is very flexible allowing users to setup their
98 spamd processes in as secure a method as possible.
99
100 The following port types are defined for spamd:
101
102
103 spamd_port_t
104
105
106
107 Default Defined Ports:
108 tcp 783,10026,10027
109
111 The SELinux process type spamd_t can manage files labeled with the fol‐
112 lowing file types. The paths listed are the default paths for these
113 file types. Note the processes UID still need to have DAC permissions.
114
115 antivirus_db_t
116
117 /var/amavis(/.*)?
118 /var/clamav(/.*)?
119 /var/lib/clamd.*
120 /var/lib/amavis(/.*)?
121 /var/lib/clamav(/.*)?
122 /var/virusmails(/.*)?
123 /var/opt/f-secure(/.*)?
124 /var/spool/amavisd(/.*)?
125 /var/lib/clamav-unofficial-sigs(/.*)?
126
127 cifs_t
128
129
130 cluster_conf_t
131
132 /etc/cluster(/.*)?
133
134 cluster_var_lib_t
135
136 /var/lib/pcsd(/.*)?
137 /var/lib/cluster(/.*)?
138 /var/lib/openais(/.*)?
139 /var/lib/pengine(/.*)?
140 /var/lib/corosync(/.*)?
141 /usr/lib/heartbeat(/.*)?
142 /var/lib/heartbeat(/.*)?
143 /var/lib/pacemaker(/.*)?
144
145 cluster_var_run_t
146
147 /var/run/crm(/.*)?
148 /var/run/cman_.*
149 /var/run/rsctmp(/.*)?
150 /var/run/aisexec.*
151 /var/run/heartbeat(/.*)?
152 /var/run/pcsd-ruby.socket
153 /var/run/corosync-qnetd(/.*)?
154 /var/run/corosync-qdevice(/.*)?
155 /var/run/corosync.pid
156 /var/run/cpglockd.pid
157 /var/run/rgmanager.pid
158 /var/run/cluster/rgmanager.sk
159
160 ecryptfs_t
161
162 /home/[^/]+/.Private(/.*)?
163 /home/[^/]+/.ecryptfs(/.*)?
164
165 exim_spool_t
166
167 /var/spool/exim[0-9]?(/.*)?
168
169 fusefs_t
170
171 /var/run/user/[0-9]+/gvfs
172
173 krb5_host_rcache_t
174
175 /var/tmp/krb5_0.rcache2
176 /var/cache/krb5rcache(/.*)?
177 /var/tmp/nfs_0
178 /var/tmp/DNS_25
179 /var/tmp/host_0
180 /var/tmp/imap_0
181 /var/tmp/HTTP_23
182 /var/tmp/HTTP_48
183 /var/tmp/ldap_55
184 /var/tmp/ldap_487
185 /var/tmp/ldapmap1_0
186
187 logwatch_cache_t
188
189 /var/lib/epylog(/.*)?
190 /var/lib/logcheck(/.*)?
191 /var/cache/logwatch(/.*)?
192
193 mail_spool_t
194
195 /var/mail(/.*)?
196 /var/spool/imap(/.*)?
197 /var/spool/mail(/.*)?
198 /var/spool/smtpd(/.*)?
199
200 nfs_t
201
202
203 root_t
204
205 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
206 /
207 /initrd
208
209 spamass_milter_state_t
210
211 /var/lib/spamass-milter(/.*)?
212
213 spamc_home_t
214
215 /root/.pyzor(/.*)?
216 /root/.razor(/.*)?
217 /root/.spamd(/.*)?
218 /root/.spamassassin(/.*)?
219 /home/[^/]+/.pyzor(/.*)?
220 /home/[^/]+/.razor(/.*)?
221 /home/[^/]+/.spamd(/.*)?
222 /home/[^/]+/.spamassassin(/.*)?
223
224 spamd_compiled_t
225
226 /var/lib/spamassassin/compiled(/.*)?
227
228 spamd_etc_t
229
230 /etc/pyzor(/.*)?
231 /etc/razor(/.*)?
232
233 spamd_log_t
234
235 /var/log/spamd.log.*
236 /var/log/mimedefang.*
237 /var/log/pyzord.log.*
238 /var/log/sa-update.log.*
239 /var/log/razor-agent.log.*
240
241 spamd_spool_t
242
243 /var/spool/spamd(/.*)?
244 /var/spool/spampd(/.*)?
245 /var/spool/spamassassin(/.*)?
246
247 spamd_tmp_t
248
249
250 spamd_var_lib_t
251
252 /var/lib/razor(/.*)?
253 /var/lib/pyzord(/.*)?
254 /var/lib/spamassassin(/.*)?
255
256 spamd_var_run_t
257
258 /var/run/spamassassin(/.*)?
259 /var/spool/MIMEDefang(/.*)?
260 /var/spool/MD-Quarantine(/.*)?
261
262 user_home_t
263
264 /home/[^/]+/.+
265
266
268 SELinux requires files to have an extended attribute to define the file
269 type.
270
271 You can see the context of a file using the -Z option to ls
272
273 Policy governs the access confined processes have to these files.
274 SELinux spamd policy is very flexible allowing users to setup their
275 spamd processes in as secure a method as possible.
276
277 EQUIVALENCE DIRECTORIES
278
279
280 spamd policy stores data with multiple different file context types un‐
281 der the /var/lib/spamassassin directory. If you would like to store
282 the data in a different directory you can use the semanage command to
283 create an equivalence mapping. If you wanted to store this data under
284 the /srv directory you would execute the following command:
285
286 semanage fcontext -a -e /var/lib/spamassassin /srv/spamassassin
287 restorecon -R -v /srv/spamassassin
288
289 STANDARD FILE CONTEXT
290
291 SELinux defines the file context types for the spamd, if you wanted to
292 store files with these types in a different paths, you need to execute
293 the semanage command to specify alternate labeling and then use re‐
294 storecon to put the labels on disk.
295
296 semanage fcontext -a -t spamd_update_exec_t '/srv/spamd/content(/.*)?'
297 restorecon -R -v /srv/myspamd_content
298
299 Note: SELinux often uses regular expressions to specify labels that
300 match multiple files.
301
302 The following file types are defined for spamd:
303
304
305
306 spamd_compiled_t
307
308 - Set files with the spamd_compiled_t type, if you want to treat the
309 files as spamd compiled data.
310
311
312
313 spamd_etc_t
314
315 - Set files with the spamd_etc_t type, if you want to store spamd files
316 in the /etc directories.
317
318
319 Paths:
320 /etc/pyzor(/.*)?, /etc/razor(/.*)?
321
322
323 spamd_exec_t
324
325 - Set files with the spamd_exec_t type, if you want to transition an
326 executable to the spamd_t domain.
327
328
329 Paths:
330 /usr/bin/spamd, /usr/bin/pyzord, /usr/sbin/spamd,
331 /usr/sbin/spampd, /usr/bin/mimedefang, /usr/bin/mimedefang-multi‐
332 plexor, /usr/libexec/mimedefang-wrapper
333
334
335 spamd_initrc_exec_t
336
337 - Set files with the spamd_initrc_exec_t type, if you want to transi‐
338 tion an executable to the spamd_initrc_t domain.
339
340
341 Paths:
342 /etc/rc.d/init.d/mimedefang.*, /etc/rc.d/init.d/spamd,
343 /etc/rc.d/init.d/pyzord, /etc/rc.d/init.d/spampd
344
345
346 spamd_log_t
347
348 - Set files with the spamd_log_t type, if you want to treat the data as
349 spamd log data, usually stored under the /var/log directory.
350
351
352 Paths:
353 /var/log/spamd.log.*, /var/log/mimedefang.*, /var/log/py‐
354 zord.log.*, /var/log/sa-update.log.*, /var/log/razor-agent.log.*
355
356
357 spamd_spool_t
358
359 - Set files with the spamd_spool_t type, if you want to store the spamd
360 files under the /var/spool directory.
361
362
363 Paths:
364 /var/spool/spamd(/.*)?, /var/spool/spampd(/.*)?, /var/spool/spa‐
365 massassin(/.*)?
366
367
368 spamd_tmp_t
369
370 - Set files with the spamd_tmp_t type, if you want to store spamd tem‐
371 porary files in the /tmp directories.
372
373
374
375 spamd_unit_file_t
376
377 - Set files with the spamd_unit_file_t type, if you want to treat the
378 files as spamd unit content.
379
380
381
382 spamd_update_exec_t
383
384 - Set files with the spamd_update_exec_t type, if you want to transi‐
385 tion an executable to the spamd_update_t domain.
386
387
388 Paths:
389 /usr/share/spamassassin/sa-update.cron, /usr/bin/sa-update
390
391
392 spamd_update_unit_file_t
393
394 - Set files with the spamd_update_unit_file_t type, if you want to
395 treat the files as spamd update unit content.
396
397
398 Paths:
399 /usr/lib/systemd/system/sa-update.timer, /usr/lib/systemd/sys‐
400 tem/sa-update.service
401
402
403 spamd_var_lib_t
404
405 - Set files with the spamd_var_lib_t type, if you want to store the
406 spamd files under the /var/lib directory.
407
408
409 Paths:
410 /var/lib/razor(/.*)?, /var/lib/pyzord(/.*)?, /var/lib/spamassas‐
411 sin(/.*)?
412
413
414 spamd_var_run_t
415
416 - Set files with the spamd_var_run_t type, if you want to store the
417 spamd files under the /run or /var/run directory.
418
419
420 Paths:
421 /var/run/spamassassin(/.*)?, /var/spool/MIMEDefang(/.*)?,
422 /var/spool/MD-Quarantine(/.*)?
423
424
425 Note: File context can be temporarily modified with the chcon command.
426 If you want to permanently change the file context you need to use the
427 semanage fcontext command. This will modify the SELinux labeling data‐
428 base. You will need to use restorecon to apply the labels.
429
430
432 semanage fcontext can also be used to manipulate default file context
433 mappings.
434
435 semanage permissive can also be used to manipulate whether or not a
436 process type is permissive.
437
438 semanage module can also be used to enable/disable/install/remove pol‐
439 icy modules.
440
441 semanage port can also be used to manipulate the port definitions
442
443 semanage boolean can also be used to manipulate the booleans
444
445
446 system-config-selinux is a GUI tool available to customize SELinux pol‐
447 icy settings.
448
449
451 This manual page was auto-generated using sepolicy manpage .
452
453
455 selinux(8), spamd(8), semanage(8), restorecon(8), chcon(1), sepol‐
456 icy(8), setsebool(8), spamd_update_selinux(8)
457
458
459
460spamd 23-10-20 spamd_selinux(8)