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. Disabled by default.
60
61 setsebool -P spamd_enable_home_dirs 1
62
63
64
65 If you want to allow all domains to execute in fips_mode, you must turn
66 on the fips_mode boolean. Enabled by default.
67
68 setsebool -P fips_mode 1
69
70
71
73 SELinux defines port types to represent TCP and UDP ports.
74
75 You can see the types associated with a port by using the following
76 command:
77
78 semanage port -l
79
80
81 Policy governs the access confined processes have to these ports.
82 SELinux spamd policy is very flexible allowing users to setup their
83 spamd processes in as secure a method as possible.
84
85 The following port types are defined for spamd:
86
87
88 spamd_port_t
89
90
91
92 Default Defined Ports:
93 tcp 783,10026,10027
94
96 The SELinux process type spamd_t can manage files labeled with the fol‐
97 lowing file types. The paths listed are the default paths for these
98 file types. Note the processes UID still need to have DAC permissions.
99
100 antivirus_db_t
101
102 /var/amavis(/.*)?
103 /var/clamav(/.*)?
104 /var/lib/clamd.*
105 /var/lib/amavis(/.*)?
106 /var/lib/clamav(/.*)?
107 /var/virusmails(/.*)?
108 /var/opt/f-secure(/.*)?
109 /var/spool/amavisd(/.*)?
110 /var/lib/clamav-unofficial-sigs(/.*)?
111
112 cifs_t
113
114
115 cluster_conf_t
116
117 /etc/cluster(/.*)?
118
119 cluster_var_lib_t
120
121 /var/lib/pcsd(/.*)?
122 /var/lib/cluster(/.*)?
123 /var/lib/openais(/.*)?
124 /var/lib/pengine(/.*)?
125 /var/lib/corosync(/.*)?
126 /usr/lib/heartbeat(/.*)?
127 /var/lib/heartbeat(/.*)?
128 /var/lib/pacemaker(/.*)?
129
130 cluster_var_run_t
131
132 /var/run/crm(/.*)?
133 /var/run/cman_.*
134 /var/run/rsctmp(/.*)?
135 /var/run/aisexec.*
136 /var/run/heartbeat(/.*)?
137 /var/run/corosync-qnetd(/.*)?
138 /var/run/corosync-qdevice(/.*)?
139 /var/run/corosync.pid
140 /var/run/cpglockd.pid
141 /var/run/rgmanager.pid
142 /var/run/cluster/rgmanager.sk
143
144 ecryptfs_t
145
146 /home/[^/]+/.Private(/.*)?
147 /home/[^/]+/.ecryptfs(/.*)?
148
149 exim_spool_t
150
151 /var/spool/exim[0-9]?(/.*)?
152
153 fusefs_t
154
155 /var/run/user/[^/]*/gvfs
156
157 logwatch_cache_t
158
159 /var/lib/epylog(/.*)?
160 /var/lib/logcheck(/.*)?
161 /var/cache/logwatch(/.*)?
162
163 mail_spool_t
164
165 /var/mail(/.*)?
166 /var/spool/imap(/.*)?
167 /var/spool/mail(/.*)?
168 /var/spool/smtpd(/.*)?
169
170 nfs_t
171
172
173 root_t
174
175 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
176 /
177 /initrd
178
179 spamass_milter_state_t
180
181 /var/lib/spamass-milter(/.*)?
182
183 spamc_home_t
184
185 /root/.pyzor(/.*)?
186 /root/.razor(/.*)?
187 /root/.spamd(/.*)?
188 /root/.spamassassin(/.*)?
189 /home/[^/]+/.pyzor(/.*)?
190 /home/[^/]+/.razor(/.*)?
191 /home/[^/]+/.spamd(/.*)?
192 /home/[^/]+/.spamassassin(/.*)?
193
194 spamd_compiled_t
195
196 /var/lib/spamassassin/compiled(/.*)?
197
198 spamd_etc_t
199
200 /etc/pyzor(/.*)?
201 /etc/razor(/.*)?
202
203 spamd_log_t
204
205 /var/log/spamd.log.*
206 /var/log/mimedefang.*
207 /var/log/pyzord.log.*
208 /var/log/sa-update.log.*
209 /var/log/razor-agent.log.*
210
211 spamd_spool_t
212
213 /var/spool/spamd(/.*)?
214 /var/spool/spampd(/.*)?
215 /var/spool/spamassassin(/.*)?
216
217 spamd_var_lib_t
218
219 /var/lib/razor(/.*)?
220 /var/lib/pyzord(/.*)?
221 /var/lib/spamassassin(/.*)?
222
223 spamd_var_run_t
224
225 /var/run/spamassassin(/.*)?
226 /var/spool/MIMEDefang(/.*)?
227 /var/spool/MD-Quarantine(/.*)?
228
229 user_home_t
230
231 /home/[^/]+/.+
232
233
235 SELinux requires files to have an extended attribute to define the file
236 type.
237
238 You can see the context of a file using the -Z option to ls
239
240 Policy governs the access confined processes have to these files.
241 SELinux spamd policy is very flexible allowing users to setup their
242 spamd processes in as secure a method as possible.
243
244 EQUIVALENCE DIRECTORIES
245
246
247 spamd policy stores data with multiple different file context types
248 under the /var/lib/spamassassin directory. If you would like to store
249 the data in a different directory you can use the semanage command to
250 create an equivalence mapping. If you wanted to store this data under
251 the /srv directory you would execute the following command:
252
253 semanage fcontext -a -e /var/lib/spamassassin /srv/spamassassin
254 restorecon -R -v /srv/spamassassin
255
256 STANDARD FILE CONTEXT
257
258 SELinux defines the file context types for the spamd, if you wanted to
259 store files with these types in a diffent paths, you need to execute
260 the semanage command to sepecify alternate labeling and then use
261 restorecon to put the labels on disk.
262
263 semanage fcontext -a -t spamd_etc_t '/srv/myspamd_content(/.*)?'
264 restorecon -R -v /srv/myspamd_content
265
266 Note: SELinux often uses regular expressions to specify labels that
267 match multiple files.
268
269 The following file types are defined for spamd:
270
271
272
273 spamd_compiled_t
274
275 - Set files with the spamd_compiled_t type, if you want to treat the
276 files as spamd compiled data.
277
278
279
280 spamd_etc_t
281
282 - Set files with the spamd_etc_t type, if you want to store spamd files
283 in the /etc directories.
284
285
286 Paths:
287 /etc/pyzor(/.*)?, /etc/razor(/.*)?
288
289
290 spamd_exec_t
291
292 - Set files with the spamd_exec_t type, if you want to transition an
293 executable to the spamd_t domain.
294
295
296 Paths:
297 /usr/bin/spamd, /usr/bin/pyzord, /usr/sbin/spamd,
298 /usr/sbin/spampd, /usr/bin/mimedefang, /usr/bin/mimedefang-multi‐
299 plexor, /usr/libexec/mimedefang-wrapper
300
301
302 spamd_initrc_exec_t
303
304 - Set files with the spamd_initrc_exec_t type, if you want to transi‐
305 tion an executable to the spamd_initrc_t domain.
306
307
308 Paths:
309 /etc/rc.d/init.d/mimedefang.*, /etc/rc.d/init.d/spamd,
310 /etc/rc.d/init.d/pyzord, /etc/rc.d/init.d/spampd
311
312
313 spamd_log_t
314
315 - Set files with the spamd_log_t type, if you want to treat the data as
316 spamd log data, usually stored under the /var/log directory.
317
318
319 Paths:
320 /var/log/spamd.log.*, /var/log/mimedefang.*,
321 /var/log/pyzord.log.*, /var/log/sa-update.log.*, /var/log/razor-
322 agent.log.*
323
324
325 spamd_spool_t
326
327 - Set files with the spamd_spool_t type, if you want to store the spamd
328 files under the /var/spool directory.
329
330
331 Paths:
332 /var/spool/spamd(/.*)?, /var/spool/spampd(/.*)?, /var/spool/spa‐
333 massassin(/.*)?
334
335
336 spamd_tmp_t
337
338 - Set files with the spamd_tmp_t type, if you want to store spamd tem‐
339 porary files in the /tmp directories.
340
341
342
343 spamd_update_exec_t
344
345 - Set files with the spamd_update_exec_t type, if you want to transi‐
346 tion an executable to the spamd_update_t domain.
347
348
349 Paths:
350 /usr/share/spamassassin/sa-update.cron, /usr/bin/sa-update
351
352
353 spamd_var_lib_t
354
355 - Set files with the spamd_var_lib_t type, if you want to store the
356 spamd files under the /var/lib directory.
357
358
359 Paths:
360 /var/lib/razor(/.*)?, /var/lib/pyzord(/.*)?, /var/lib/spamassas‐
361 sin(/.*)?
362
363
364 spamd_var_run_t
365
366 - Set files with the spamd_var_run_t type, if you want to store the
367 spamd files under the /run or /var/run directory.
368
369
370 Paths:
371 /var/run/spamassassin(/.*)?, /var/spool/MIMEDefang(/.*)?,
372 /var/spool/MD-Quarantine(/.*)?
373
374
375 Note: File context can be temporarily modified with the chcon command.
376 If you want to permanently change the file context you need to use the
377 semanage fcontext command. This will modify the SELinux labeling data‐
378 base. You will need to use restorecon to apply the labels.
379
380
382 semanage fcontext can also be used to manipulate default file context
383 mappings.
384
385 semanage permissive can also be used to manipulate whether or not a
386 process type is permissive.
387
388 semanage module can also be used to enable/disable/install/remove pol‐
389 icy modules.
390
391 semanage port can also be used to manipulate the port definitions
392
393 semanage boolean can also be used to manipulate the booleans
394
395
396 system-config-selinux is a GUI tool available to customize SELinux pol‐
397 icy settings.
398
399
401 This manual page was auto-generated using sepolicy manpage .
402
403
405 selinux(8), spamd(8), semanage(8), restorecon(8), chcon(1), sepol‐
406 icy(8), setsebool(8), spamd_update_selinux(8)
407
408
409
410spamd 21-03-26 spamd_selinux(8)