1sendmail_selinux(8) SELinux Policy sendmail sendmail_selinux(8)
2
3
4
6 sendmail_selinux - Security Enhanced Linux Policy for the sendmail pro‐
7 cesses
8
10 Security-Enhanced Linux secures the sendmail processes via flexible
11 mandatory access control.
12
13 The sendmail processes execute with the sendmail_t SELinux type. You
14 can check if you have these processes running by executing the ps com‐
15 mand with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep sendmail_t
20
21
22
24 The sendmail_t SELinux type can be entered via the mta_exec_type, send‐
25 mail_exec_t, mta_exec_type file types.
26
27 The default entrypoint paths for the sendmail_t domain are the follow‐
28 ing:
29
30 /usr/sbin/sendmail(.sendmail)?, /usr/bin/esmtp, /usr/sbin/rmail,
31 /usr/sbin/ssmtp, /usr/lib/sendmail, /var/qmail/bin/sendmail,
32 /usr/sbin/sendmail.postfix
33
35 SELinux defines process types (domains) for each process running on the
36 system
37
38 You can see the context of a process using the -Z option to ps
39
40 Policy governs the access confined processes have to files. SELinux
41 sendmail policy is very flexible allowing users to setup their sendmail
42 processes in as secure a method as possible.
43
44 The following process types are defined for sendmail:
45
46 sendmail_t
47
48 Note: semanage permissive -a sendmail_t can be used to make the process
49 type sendmail_t permissive. SELinux does not deny access to permissive
50 process types, but the AVC (SELinux denials) messages are still gener‐
51 ated.
52
53
55 SELinux policy is customizable based on least access required. send‐
56 mail policy is extremely flexible and has several booleans that allow
57 you to manipulate the policy and run sendmail with the tightest access
58 possible.
59
60
61
62 If you want to allow users to resolve user passwd entries directly from
63 ldap rather then using a sssd server, you must turn on the authlo‐
64 gin_nsswitch_use_ldap boolean. Disabled by default.
65
66 setsebool -P authlogin_nsswitch_use_ldap 1
67
68
69
70 If you want to allow all daemons the ability to read/write terminals,
71 you must turn on the daemons_use_tty boolean. Disabled by default.
72
73 setsebool -P daemons_use_tty 1
74
75
76
77 If you want to deny any process from ptracing or debugging any other
78 processes, you must turn on the deny_ptrace boolean. Enabled by
79 default.
80
81 setsebool -P deny_ptrace 1
82
83
84
85 If you want to allow any process to mmap any file on system with
86 attribute file_type, you must turn on the domain_can_mmap_files bool‐
87 ean. Enabled by default.
88
89 setsebool -P domain_can_mmap_files 1
90
91
92
93 If you want to allow all domains write to kmsg_device, while kernel is
94 executed with systemd.log_target=kmsg parameter, you must turn on the
95 domain_can_write_kmsg boolean. Disabled by default.
96
97 setsebool -P domain_can_write_kmsg 1
98
99
100
101 If you want to allow all domains to use other domains file descriptors,
102 you must turn on the domain_fd_use boolean. Enabled by default.
103
104 setsebool -P domain_fd_use 1
105
106
107
108 If you want to allow all domains to have the kernel load modules, you
109 must turn on the domain_kernel_load_modules boolean. Disabled by
110 default.
111
112 setsebool -P domain_kernel_load_modules 1
113
114
115
116 If you want to allow all domains to execute in fips_mode, you must turn
117 on the fips_mode boolean. Enabled by default.
118
119 setsebool -P fips_mode 1
120
121
122
123 If you want to enable reading of urandom for all domains, you must turn
124 on the global_ssp boolean. Disabled by default.
125
126 setsebool -P global_ssp 1
127
128
129
130 If you want to allow confined applications to run with kerberos, you
131 must turn on the kerberos_enabled boolean. Enabled by default.
132
133 setsebool -P kerberos_enabled 1
134
135
136
137 If you want to allow system to run with NIS, you must turn on the
138 nis_enabled boolean. Disabled by default.
139
140 setsebool -P nis_enabled 1
141
142
143
144 If you want to allow confined applications to use nscd shared memory,
145 you must turn on the nscd_use_shm boolean. Disabled by default.
146
147 setsebool -P nscd_use_shm 1
148
149
150
151 If you want to allow Redis to run redis-sentinal notification scripts,
152 you must turn on the redis_enable_notify boolean. Disabled by default.
153
154 setsebool -P redis_enable_notify 1
155
156
157
158 If you want to support ecryptfs home directories, you must turn on the
159 use_ecryptfs_home_dirs boolean. Disabled by default.
160
161 setsebool -P use_ecryptfs_home_dirs 1
162
163
164
165 If you want to support fusefs home directories, you must turn on the
166 use_fusefs_home_dirs boolean. Disabled by default.
167
168 setsebool -P use_fusefs_home_dirs 1
169
170
171
172 If you want to support NFS home directories, you must turn on the
173 use_nfs_home_dirs boolean. Disabled by default.
174
175 setsebool -P use_nfs_home_dirs 1
176
177
178
179 If you want to support SAMBA home directories, you must turn on the
180 use_samba_home_dirs boolean. Disabled by default.
181
182 setsebool -P use_samba_home_dirs 1
183
184
185
187 The SELinux process type sendmail_t can manage files labeled with the
188 following file types. The paths listed are the default paths for these
189 file types. Note the processes UID still need to have DAC permissions.
190
191 anon_inodefs_t
192
193
194 cifs_t
195
196
197 dovecot_spool_t
198
199 /var/spool/dovecot(/.*)?
200
201 ecryptfs_t
202
203 /home/[^/]+/.Private(/.*)?
204 /home/[^/]+/.ecryptfs(/.*)?
205
206 etc_aliases_t
207
208 /etc/mail/.*.db
209 /etc/mail/aliases.*
210 /etc/postfix/aliases.*
211 /etc/aliases
212 /etc/aliases.db
213
214 exim_spool_t
215
216 /var/spool/exim[0-9]?(/.*)?
217
218 fusefs_t
219
220 /var/run/user/[^/]*/gvfs
221
222 initrc_tmp_t
223
224
225 mail_home_rw_t
226
227 /root/Maildir(/.*)?
228 /root/.esmtp_queue(/.*)?
229 /home/[^/]+/.maildir(/.*)?
230 /home/[^/]+/Maildir(/.*)?
231 /home/[^/]+/.esmtp_queue(/.*)?
232
233 mail_spool_t
234
235 /var/mail(/.*)?
236 /var/spool/imap(/.*)?
237 /var/spool/mail(/.*)?
238 /var/spool/smtpd(/.*)?
239
240 mailman_data_t
241
242 /etc/mailman.*
243 /var/lib/mailman(/.*)?
244 /var/spool/mailman.*
245
246 mqueue_spool_t
247
248 /var/spool/(client)?mqueue(/.*)?
249 /var/spool/mqueue.in(/.*)?
250
251 nfs_t
252
253
254 procmail_tmp_t
255
256
257 sendmail_log_t
258
259 /var/log/mail(/.*)?
260 /var/log/sendmail.st.*
261
262 sendmail_tmp_t
263
264
265 sendmail_var_run_t
266
267 /var/run/sendmail.pid
268 /var/run/sm-client.pid
269
270 user_home_t
271
272 /home/[^/]+/.+
273
274
276 SELinux requires files to have an extended attribute to define the file
277 type.
278
279 You can see the context of a file using the -Z option to ls
280
281 Policy governs the access confined processes have to these files.
282 SELinux sendmail policy is very flexible allowing users to setup their
283 sendmail processes in as secure a method as possible.
284
285 STANDARD FILE CONTEXT
286
287 SELinux defines the file context types for the sendmail, if you wanted
288 to store files with these types in a diffent paths, you need to execute
289 the semanage command to sepecify alternate labeling and then use
290 restorecon to put the labels on disk.
291
292 semanage fcontext -a -t sendmail_var_run_t '/srv/mysendmail_con‐
293 tent(/.*)?'
294 restorecon -R -v /srv/mysendmail_content
295
296 Note: SELinux often uses regular expressions to specify labels that
297 match multiple files.
298
299 The following file types are defined for sendmail:
300
301
302
303 sendmail_exec_t
304
305 - Set files with the sendmail_exec_t type, if you want to transition an
306 executable to the sendmail_t domain.
307
308
309 Paths:
310 /usr/sbin/sendmail(.sendmail)?, /usr/bin/esmtp, /usr/sbin/rmail,
311 /usr/sbin/ssmtp, /usr/lib/sendmail, /var/qmail/bin/sendmail,
312 /usr/sbin/sendmail.postfix
313
314
315 sendmail_initrc_exec_t
316
317 - Set files with the sendmail_initrc_exec_t type, if you want to tran‐
318 sition an executable to the sendmail_initrc_t domain.
319
320
321
322 sendmail_keytab_t
323
324 - Set files with the sendmail_keytab_t type, if you want to treat the
325 files as kerberos keytab files.
326
327
328
329 sendmail_log_t
330
331 - Set files with the sendmail_log_t type, if you want to treat the data
332 as sendmail log data, usually stored under the /var/log directory.
333
334
335 Paths:
336 /var/log/mail(/.*)?, /var/log/sendmail.st.*
337
338
339 sendmail_tmp_t
340
341 - Set files with the sendmail_tmp_t type, if you want to store sendmail
342 temporary files in the /tmp directories.
343
344
345
346 sendmail_var_run_t
347
348 - Set files with the sendmail_var_run_t type, if you want to store the
349 sendmail files under the /run or /var/run directory.
350
351
352 Paths:
353 /var/run/sendmail.pid, /var/run/sm-client.pid
354
355
356 Note: File context can be temporarily modified with the chcon command.
357 If you want to permanently change the file context you need to use the
358 semanage fcontext command. This will modify the SELinux labeling data‐
359 base. You will need to use restorecon to apply the labels.
360
361
363 semanage fcontext can also be used to manipulate default file context
364 mappings.
365
366 semanage permissive can also be used to manipulate whether or not a
367 process type is permissive.
368
369 semanage module can also be used to enable/disable/install/remove pol‐
370 icy modules.
371
372 semanage boolean can also be used to manipulate the booleans
373
374
375 system-config-selinux is a GUI tool available to customize SELinux pol‐
376 icy settings.
377
378
380 This manual page was auto-generated using sepolicy manpage .
381
382
384 selinux(8), sendmail(8), semanage(8), restorecon(8), chcon(1), sepol‐
385 icy(8) , setsebool(8)
386
387
388
389sendmail 19-04-25 sendmail_selinux(8)