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 file types.
26
27 The default entrypoint paths for the sendmail_t domain are the follow‐
28 ing:
29
30 /usr/lib(64)?/sendmail, /bin/mail(x)?, /usr/sbin/sendmail(.sendmail)?,
31 /usr/bin/esmtp, /usr/sbin/ssmtp, /usr/sbin/rmail, /var/qmail/bin/send‐
32 mail, /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 all daemons the ability to read/write terminals,
63 you must turn on the allow_daemons_use_tty boolean. Disabled by
64 default.
65
66 setsebool -P allow_daemons_use_tty 1
67
68
69
70 If you want to allow all domains to use other domains file descriptors,
71 you must turn on the allow_domain_fd_use boolean. Enabled by default.
72
73 setsebool -P allow_domain_fd_use 1
74
75
76
77 If you want to allow confined applications to run with kerberos, you
78 must turn on the allow_kerberos boolean. Enabled by default.
79
80 setsebool -P allow_kerberos 1
81
82
83
84 If you want to allow sysadm to debug or ptrace all processes, you must
85 turn on the allow_ptrace boolean. Disabled by default.
86
87 setsebool -P allow_ptrace 1
88
89
90
91 If you want to allow system to run with NIS, you must turn on the
92 allow_ypbind boolean. Disabled by default.
93
94 setsebool -P allow_ypbind 1
95
96
97
98 If you want to allow all domains to have the kernel load modules, you
99 must turn on the domain_kernel_load_modules boolean. Disabled by
100 default.
101
102 setsebool -P domain_kernel_load_modules 1
103
104
105
106 If you want to allow all domains to execute in fips_mode, you must turn
107 on the fips_mode boolean. Enabled by default.
108
109 setsebool -P fips_mode 1
110
111
112
113 If you want to enable reading of urandom for all domains, you must turn
114 on the global_ssp boolean. Disabled by default.
115
116 setsebool -P global_ssp 1
117
118
119
120 If you want to allow confined applications to use nscd shared memory,
121 you must turn on the nscd_use_shm boolean. Enabled by default.
122
123 setsebool -P nscd_use_shm 1
124
125
126
127 If you want to support NFS home directories, you must turn on the
128 use_nfs_home_dirs boolean. Disabled by default.
129
130 setsebool -P use_nfs_home_dirs 1
131
132
133
134 If you want to support SAMBA home directories, you must turn on the
135 use_samba_home_dirs boolean. Disabled by default.
136
137 setsebool -P use_samba_home_dirs 1
138
139
140
142 The SELinux process type sendmail_t can manage files labeled with the
143 following file types. The paths listed are the default paths for these
144 file types. Note the processes UID still need to have DAC permissions.
145
146 anon_inodefs_t
147
148
149 cifs_t
150
151
152 dovecot_spool_t
153
154 /var/spool/dovecot(/.*)?
155
156 etc_aliases_t
157
158 /etc/postfix/aliases.*
159 /etc/aliases
160 /etc/aliases.db
161 /etc/mail/aliases
162 /etc/mail/aliases.db
163
164 initrc_tmp_t
165
166
167 mail_home_rw_t
168
169 /root/Maildir(/.*)?
170 /home/[^/]*/Maildir(/.*)?
171 /home/staff/Maildir(/.*)?
172
173 mail_spool_t
174
175 /var/mail(/.*)?
176 /var/spool/mail(/.*)?
177 /var/spool/imap(/.*)?
178
179 mnt_t
180
181 /mnt(/[^/]*)
182 /mnt(/[^/]*)?
183 /rhev(/[^/]*)?
184 /media(/[^/]*)
185 /media(/[^/]*)?
186 /etc/rhgb(/.*)?
187 /media/.hal-.*
188 /net
189 /afs
190 /rhev
191 /misc
192
193 mqueue_spool_t
194
195 /var/spool/(client)?mqueue(/.*)?
196
197 nfs_t
198
199
200 procmail_tmp_t
201
202
203 sendmail_log_t
204
205 /var/log/mail(/.*)?
206 /var/log/sendmail.st.*
207
208 sendmail_tmp_t
209
210
211 sendmail_var_run_t
212
213 /var/run/sendmail.pid
214 /var/run/sm-client.pid
215
216 tmp_t
217
218 /tmp
219 /usr/tmp
220 /var/tmp
221 /tmp-inst
222 /var/tmp-inst
223 /var/tmp/vi.recover
224
225 user_home_t
226
227 /home/[^/]*/.+
228 /home/staff/.+
229
230
232 SELinux requires files to have an extended attribute to define the file
233 type.
234
235 You can see the context of a file using the -Z option to ls
236
237 Policy governs the access confined processes have to these files.
238 SELinux sendmail policy is very flexible allowing users to setup their
239 sendmail processes in as secure a method as possible.
240
241 STANDARD FILE CONTEXT
242
243 SELinux defines the file context types for the sendmail, if you wanted
244 to store files with these types in a diffent paths, you need to execute
245 the semanage command to sepecify alternate labeling and then use
246 restorecon to put the labels on disk.
247
248 semanage fcontext -a -t sendmail_var_run_t '/srv/mysendmail_con‐
249 tent(/.*)?'
250 restorecon -R -v /srv/mysendmail_content
251
252 Note: SELinux often uses regular expressions to specify labels that
253 match multiple files.
254
255 The following file types are defined for sendmail:
256
257
258
259 sendmail_exec_t
260
261 - Set files with the sendmail_exec_t type, if you want to transition an
262 executable to the sendmail_t domain.
263
264
265 Paths:
266 /usr/lib(64)?/sendmail, /bin/mail(x)?, /usr/sbin/sendmail(.send‐
267 mail)?, /usr/bin/esmtp, /usr/sbin/ssmtp, /usr/sbin/rmail,
268 /var/qmail/bin/sendmail, /usr/sbin/sendmail.postfix
269
270
271 sendmail_initrc_exec_t
272
273 - Set files with the sendmail_initrc_exec_t type, if you want to tran‐
274 sition an executable to the sendmail_initrc_t domain.
275
276
277
278 sendmail_keytab_t
279
280 - Set files with the sendmail_keytab_t type, if you want to treat the
281 files as kerberos keytab files.
282
283
284
285 sendmail_log_t
286
287 - Set files with the sendmail_log_t type, if you want to treat the data
288 as sendmail log data, usually stored under the /var/log directory.
289
290
291 Paths:
292 /var/log/mail(/.*)?, /var/log/sendmail.st.*
293
294
295 sendmail_tmp_t
296
297 - Set files with the sendmail_tmp_t type, if you want to store sendmail
298 temporary files in the /tmp directories.
299
300
301
302 sendmail_var_run_t
303
304 - Set files with the sendmail_var_run_t type, if you want to store the
305 sendmail files under the /run or /var/run directory.
306
307
308 Paths:
309 /var/run/sendmail.pid, /var/run/sm-client.pid
310
311
312 Note: File context can be temporarily modified with the chcon command.
313 If you want to permanently change the file context you need to use the
314 semanage fcontext command. This will modify the SELinux labeling data‐
315 base. You will need to use restorecon to apply the labels.
316
317
319 semanage fcontext can also be used to manipulate default file context
320 mappings.
321
322 semanage permissive can also be used to manipulate whether or not a
323 process type is permissive.
324
325 semanage module can also be used to enable/disable/install/remove pol‐
326 icy modules.
327
328 semanage boolean can also be used to manipulate the booleans
329
330
331 system-config-selinux is a GUI tool available to customize SELinux pol‐
332 icy settings.
333
334
336 This manual page was auto-generated using sepolicy manpage .
337
338
340 selinux(8), sendmail(8), semanage(8), restorecon(8), chcon(1) , setse‐
341 bool(8)
342
343
344
345sendmail 15-06-03 sendmail_selinux(8)