Puppet Class: cis_security_hardening::rules::dovecot
- Defined in:
- manifests/rules/dovecot.pp
Summary
Ensure IMAP and POP3 server is not enabledOverview
dovecot is an open source IMAP and POP3 server for Linux based systems.
Rationale: Unless POP3 and/or IMAP servers are to be provided by this system, it is recommended that the service be disabled to reduce the potential attack surface.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'manifests/rules/dovecot.pp', line 19
class cis_security_hardening::rules::dovecot (
Boolean $enforce = false,
) {
if $enforce {
case $facts['os']['name'].downcase() {
'ubuntu': {
ensure_packages(['dovecot-imapd', 'dovecot-pop3d'], {
ensure => purged,
})
}
'sles': {
ensure_packages(['dovecot'], {
ensure => absent,
})
}
'redhat': {
ensure_packages(['dovecot'], {
ensure => purged,
})
ensure_packages(['cyrus-imapd'], {
ensure => purged,
})
}
default: {
ensure_resource('service', ['dovecot'], {
ensure => 'stopped',
enable => false
})
}
}
}
}
|