1sendmail_selinux(8)         SELinux Policy sendmail        sendmail_selinux(8)
2
3
4

NAME

6       sendmail_selinux - Security Enhanced Linux Policy for the sendmail pro‐
7       cesses
8

DESCRIPTION

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

ENTRYPOINTS

24       The  sendmail_t  SELinux type can be entered via the mta_exec_type file
25       type.
26
27       The default entrypoint paths for the sendmail_t domain are the  follow‐
28       ing:
29
30
31

PROCESS TYPES

33       SELinux defines process types (domains) for each process running on the
34       system
35
36       You can see the context of a process using the -Z option to ps
37
38       Policy governs the access confined processes have  to  files.   SELinux
39       sendmail policy is very flexible allowing users to setup their sendmail
40       processes in as secure a method as possible.
41
42       The following process types are defined for sendmail:
43
44       sendmail_t
45
46       Note: semanage permissive -a sendmail_t can be used to make the process
47       type  sendmail_t permissive. SELinux does not deny access to permissive
48       process types, but the AVC (SELinux denials) messages are still  gener‐
49       ated.
50
51

BOOLEANS

53       SELinux  policy  is customizable based on least access required.  send‐
54       mail policy is extremely flexible and has several booleans  that  allow
55       you  to manipulate the policy and run sendmail with the tightest access
56       possible.
57
58
59
60       If you want to allow all domains to execute in fips_mode, you must turn
61       on the fips_mode boolean. Enabled by default.
62
63       setsebool -P fips_mode 1
64
65
66
67       If  you  want  to  allow  system  to run with NIS, you must turn on the
68       nis_enabled boolean. Disabled by default.
69
70       setsebool -P nis_enabled 1
71
72
73

MANAGED FILES

75       The SELinux process type sendmail_t can manage files labeled  with  the
76       following file types.  The paths listed are the default paths for these
77       file types.  Note the processes UID still need to have DAC permissions.
78
79       cifs_t
80
81
82       dovecot_spool_t
83
84            /var/spool/dovecot(/.*)?
85
86       ecryptfs_t
87
88            /home/[^/]+/.Private(/.*)?
89            /home/[^/]+/.ecryptfs(/.*)?
90
91       etc_aliases_t
92
93            /etc/mail/.*.db
94            /etc/mail/aliases.*
95            /etc/postfix/aliases.*
96            /etc/aliases
97            /etc/aliases.db
98
99       exim_spool_t
100
101            /var/spool/exim[0-9]?(/.*)?
102
103       fusefs_t
104
105            /var/run/user/[0-9]+/gvfs
106
107       krb5_host_rcache_t
108
109            /var/tmp/krb5_0.rcache2
110            /var/cache/krb5rcache(/.*)?
111            /var/tmp/nfs_0
112            /var/tmp/DNS_25
113            /var/tmp/host_0
114            /var/tmp/imap_0
115            /var/tmp/HTTP_23
116            /var/tmp/HTTP_48
117            /var/tmp/ldap_55
118            /var/tmp/ldap_487
119            /var/tmp/ldapmap1_0
120
121       mail_home_rw_t
122
123            /root/Maildir(/.*)?
124            /root/.esmtp_queue(/.*)?
125            /var/lib/arpwatch/.esmtp_queue(/.*)?
126            /home/[^/]+/.maildir(/.*)?
127            /home/[^/]+/Maildir(/.*)?
128            /home/[^/]+/.esmtp_queue(/.*)?
129
130       mailman_data_t
131
132            /etc/mailman.*
133            /var/lib/mailman(/.*)?
134            /var/spool/mailman.*
135
136       mqueue_spool_t
137
138            /var/spool/(client)?mqueue(/.*)?
139            /var/spool/mqueue.in(/.*)?
140
141       nfs_t
142
143
144       sendmail_log_t
145
146            /var/log/mail(/.*)?
147            /var/log/sendmail.st.*
148
149       sendmail_var_run_t
150
151            /var/run/smtpd.sock
152            /var/run/sendmail.pid
153            /var/run/sm-client.pid
154
155       user_home_t
156
157            /home/[^/]+/.+
158
159

FILE CONTEXTS

161       SELinux requires files to have an extended attribute to define the file
162       type.
163
164       You can see the context of a file using the -Z option to ls
165
166       Policy  governs  the  access  confined  processes  have to these files.
167       SELinux sendmail policy is very flexible allowing users to setup  their
168       sendmail processes in as secure a method as possible.
169
170       STANDARD FILE CONTEXT
171
172       SELinux  defines the file context types for the sendmail, if you wanted
173       to store files with these types in a different paths, you need to  exe‐
174       cute  the  semanage  command to specify alternate labeling and then use
175       restorecon to put the labels on disk.
176
177       semanage fcontext -a -t sendmail_exec_t '/srv/sendmail/content(/.*)?'
178       restorecon -R -v /srv/mysendmail_content
179
180       Note: SELinux often uses regular expressions  to  specify  labels  that
181       match multiple files.
182
183       The following file types are defined for sendmail:
184
185
186
187       sendmail_exec_t
188
189       - Set files with the sendmail_exec_t type, if you want to transition an
190       executable to the sendmail_t domain.
191
192
193       Paths:
194            /usr/sbin/sendmail(.sendmail)?,  /usr/bin/esmtp,   /usr/bin/msmtp,
195            /usr/bin/msmtpd,         /usr/sbin/rmail,         /usr/sbin/smtpd,
196            /usr/sbin/ssmtp,    /usr/lib/sendmail,     /usr/bin/esmtp-wrapper,
197            /var/qmail/bin/sendmail, /usr/sbin/sendmail.postfix
198
199
200       sendmail_initrc_exec_t
201
202       -  Set files with the sendmail_initrc_exec_t type, if you want to tran‐
203       sition an executable to the sendmail_initrc_t domain.
204
205
206
207       sendmail_keytab_t
208
209       - Set files with the sendmail_keytab_t type, if you want to  treat  the
210       files as kerberos keytab files.
211
212
213
214       sendmail_log_t
215
216       - Set files with the sendmail_log_t type, if you want to treat the data
217       as sendmail log data, usually stored under the /var/log directory.
218
219
220       Paths:
221            /var/log/mail(/.*)?, /var/log/sendmail.st.*
222
223
224       sendmail_tmp_t
225
226       - Set files with the sendmail_tmp_t type, if you want to store sendmail
227       temporary files in the /tmp directories.
228
229
230
231       sendmail_var_run_t
232
233       -  Set files with the sendmail_var_run_t type, if you want to store the
234       sendmail files under the /run or /var/run directory.
235
236
237       Paths:
238            /var/run/smtpd.sock, /var/run/sendmail.pid, /var/run/sm-client.pid
239
240
241       Note: File context can be temporarily modified with the chcon  command.
242       If  you want to permanently change the file context you need to use the
243       semanage fcontext command.  This will modify the SELinux labeling data‐
244       base.  You will need to use restorecon to apply the labels.
245
246

COMMANDS

248       semanage  fcontext  can also be used to manipulate default file context
249       mappings.
250
251       semanage permissive can also be used to manipulate  whether  or  not  a
252       process type is permissive.
253
254       semanage  module can also be used to enable/disable/install/remove pol‐
255       icy modules.
256
257       semanage boolean can also be used to manipulate the booleans
258
259
260       system-config-selinux is a GUI tool available to customize SELinux pol‐
261       icy settings.
262
263

AUTHOR

265       This manual page was auto-generated using sepolicy manpage .
266
267

SEE ALSO

269       selinux(8),  sendmail(8),  semanage(8), restorecon(8), chcon(1), sepol‐
270       icy(8), setsebool(8)
271
272
273
274sendmail                           23-10-20                sendmail_selinux(8)
Impressum