spamc_selinux(8)
π spamc_selinux β the SELinux glow-up for spamc π
okay bestie, so this is the spamc_selinux page from the SELinux Policy spamc section, and it's literally all about how Security-Enhanced Linux keeps the spamc processes in check. think of it as the bouncer at the club, but for processes π«Ά
β¨ NAME β¨
spamc_selinux β Security Enhanced Linux Policy for the spamc processes π
πΈ SYNOPSIS πΈ
no cap, there's no synopsis section here β this one's all vibes and policy talk, so keep reading bestie π
π¦ DESCRIPTION π¦
Security-Enhanced Linux secures the spamc processes via flexible mandatory access control. yes, mandatory β she doesn't ask permission, she just governs π₯
The spamc processes execute with the spamc_t SELinux type. you can check if you have these processes running by executing the ps command with the -Z qualifier.
for example:
ps -eZ | grep spamc_t
run that and see who's showing up to the party π
π ENTRYPOINTS π
The spamc_t SELinux type can be entered via the spamc_exec_t file type.
the default entrypoint paths for the spamc_t domain are the following:
/usr/bin/razor.*, /usr/bin/pyzor, /usr/bin/spamc, /usr/bin/sa-learn,
/usr/bin/spamassassin
that's the vip list, bestie β those are the doors spamc_t comes through πͺβ¨
π PROCESS TYPES π
SELinux defines process types (domains) for each process running on the system.
you can see the context of a process using the -Z option to ps.
policy governs the access confined processes have to files. SELinux spamc policy is very flexible allowing users to setup their spamc processes in as secure a method as possible.
the following process types are defined for spamc:
spamc_t
Note:semanage permissive -a spamc_tcan be used to make the process typespamc_tpermissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated. so like, she won't actually block you, but she WILL be in the group chat talking about it ππ
π BOOLEANS π
SELinux policy is customizable based on least access required. spamc policy is extremely flexible and has several booleans that allow you to manipulate the policy and run spamc with the tightest access possible. tightest access possible = main character energy, honestly π
if you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default.
setsebool -P fips_mode 1
if you want to allow http daemon to check spam, you must turn on the httpd_can_check_spam boolean. Disabled by default.
setsebool -P httpd_can_check_spam 1
if you want to allow http daemon to send mail, you must turn on the httpd_can_sendmail boolean. Disabled by default.
setsebool -P httpd_can_sendmail 1
if you want to allow system to run with NIS, you must turn on the nis_enabled boolean. Disabled by default.
setsebool -P nis_enabled 1
if you want to allow user spamassassin clients to use the network, you must turn on the spamassassin_can_network boolean. Disabled by default.
setsebool -P spamassassin_can_network 1
see? five little switches and you're running the whole vibe check ποΈβ¨
π MANAGED FILES π
The SELinux process type spamc_t can manage files labeled with the following file types. the paths listed are the default paths for these file types. note the processes UID still need to have DAC permissions β SELinux isn't out here overriding your user permissions, she's just adding a layer, iykyk π«Ά
antivirus_db_t
/var/amavis(/.*)?
/var/clamav(/.*)?
/var/lib/clamd.*
/var/lib/amavis(/.*)?
/var/lib/clamav(/.*)?
/var/virusmails(/.*)?
/var/opt/f-secure(/.*)?
/var/spool/amavisd(/.*)?
/var/lib/clamav-unofficial-sigs(/.*)?
cifs_t
(no paths listed for this one, she's just vibing with no defaults π¦)
ecryptfs_t
/home/[^/]+/.Private(/.*)?
/home/[^/]+/.ecryptfs(/.*)?
fusefs_t
/run/user/[0-9]+/gvfs
krb5_host_rcache_t
/var/tmp/krb5_0.rcache2
/var/cache/krb5rcache(/.*)?
/var/tmp/nfs_0
/var/tmp/DNS_25
/var/tmp/host_0
/var/tmp/imap_0
/var/tmp/HTTP_23
/var/tmp/HTTP_48
/var/tmp/ldap_55
/var/tmp/ldap_487
/var/tmp/ldapmap1_0
nfs_t
(also no default paths β iconic minimalism π )
spamass_milter_state_t
/var/lib/spamass-milter(/.*)?
spamc_home_t
/root/.pyzor(/.*)?
/root/.razor(/.*)?
/root/.spamd(/.*)?
/root/.spamassassin(/.*)?
/home/[^/]+/.pyzor(/.*)?
/home/[^/]+/.razor(/.*)?
/home/[^/]+/.spamd(/.*)?
/home/[^/]+/.spamassassin(/.*)?
spamc_tmp_t
(no default paths listed here either, she's mysterious like that πΈ)
β FILE CONTEXTS β
SELinux requires files to have an extended attribute to define the file type.
you can see the context of a file using the -Z option to ls.
policy governs the access confined processes have to these files. SELinux spamc policy is very flexible allowing users to setup their spamc processes in as secure a method as possible.
π§ STANDARD FILE CONTEXT π§
SELinux defines the file context types for the spamc, and if you wanted to store files with these types in a different paths, you need to execute the semanage command to specify alternate labeling and then use restorecon to put the labels on disk.
semanage fcontext -a -t spamc_exec_t '/srv/spamc/content(/.*)?'
restorecon -R -v /srv/myspamc_content
Note: SELinux often uses regular expressions to specify labels that match multiple files. regex girlies rise π
the following file types are defined for spamc:
spamc_exec_t
- Set files with the
spamc_exec_ttype, if you want to transition an executable to thespamc_tdomain.
Paths:
/usr/bin/razor.*, /usr/bin/pyzor, /usr/bin/spamc, /usr/bin/sa-learn,
/usr/bin/spamassassin
spamc_home_t
- Set files with the
spamc_home_ttype, if you want to storespamcfiles in the users home directory.
Paths:
/root/.pyzor(/.*)?, /root/.razor(/.*)?, /root/.spamd(/.*)?,
/root/.spamassassin(/.*)?, /home/[^/]+/.pyzor(/.*)?,
/home/[^/]+/.razor(/.*)?, /home/[^/]+/.spamd(/.*)?,
/home/[^/]+/.spamassassin(/.*)?
spamc_tmp_t
- Set files with the
spamc_tmp_ttype, if you want to storespamctemporary files in the/tmpdirectories.
Note: File context can be temporarily modified with thechconcommand. if you want to permanently change the file context you need to use thesemanage fcontextcommand. this will modify the SELinux labeling database. you will need to userestoreconto apply the labels. temporary vs permanent is literally the whole plot twist here, don't skip it ππ
π COMMANDS π
semanage fcontext can also be used to manipulate default file context mappings.
semanage permissive can also be used to manipulate whether or not a process type is permissive.
semanage module can also be used to enable/disable/install/remove policy modules.
semanage boolean can also be used to manipulate the booleans
system-config-selinux is a GUI tool available to customize SELinux policy settings. yes bestie, a GUI β for when the terminal is giving too much and you just want to click things π±οΈβ¨
π AUTHOR π
This manual page was auto-generated using sepolicy manpage. (not me being auto-generated and still serving looks π
)
π¦ SEE ALSO π¦
and that's the whole page, bestie π this spamc_selinux(8) was rendered on 26-10-06 under the spamc banner from the spamc_selinux(8) manual β slay, go read your policy, and remember: least access required is the only aesthetic that matters ππ₯π
π¦ where this page comes from
- opensuse-leap 16.0: selinux-policy-doc 20250627+git412.dbf877ab7-160000.1.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms