Compare commits
3 Commits
2b52e5e413
...
07723fa44a
Author | SHA1 | Date |
---|---|---|
Tobias Herre | 07723fa44a | |
Tobias Herre | 017d50d6f0 | |
Tobias Herre | b39817b4e5 |
|
@ -0,0 +1,83 @@
|
|||
#
|
||||
#
|
||||
#
|
||||
|
||||
bundle agent dovecot(cfg)
|
||||
{
|
||||
vars:
|
||||
freebsd::
|
||||
"cfg_dir" string => "/usr/local/etc/dovecot";
|
||||
"dovecot_conf" string => "$(cfg_dir)/dovecot.conf";
|
||||
|
||||
"pkgs" slist => {
|
||||
"dovecot"
|
||||
};
|
||||
debian::
|
||||
"cfg_dir" string => "/etc/dovecot";
|
||||
"dovecot_conf" string => "$(cfg_dir)/dovecot.conf";
|
||||
|
||||
"imap_key" string => "$(cfg_dir)/private/imap.key";
|
||||
"imap_cert" string => "$(cfg_dir)/private/imap.crt";
|
||||
|
||||
|
||||
"service_name" string => "dovecot";
|
||||
"pkgs" slist => {
|
||||
"dovecot-core",
|
||||
"dovecot-mysql",
|
||||
"dovecot-managesieved",
|
||||
"dovecot-submissiond",
|
||||
"dovecot-lmtpd",
|
||||
"dovecot-imapd",
|
||||
"dovecot-pop3d"
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
methods:
|
||||
"any" usebundle => wmde_install_packages(@(pkgs),"dovecot");
|
||||
"any" usebundle => wmde_service("$(service_name)","dovecot_kept","dovecot_repaired"),
|
||||
depends_on => {
|
||||
"dovecot_pkgs_installed",
|
||||
"dovecot_imap_key_installed",
|
||||
"dovecot_imap_cert_installed",
|
||||
"dovecot_cfg_created"
|
||||
};
|
||||
services:
|
||||
|
||||
files:
|
||||
"$(dovecot_conf)"
|
||||
classes => if_repaired(dovecot_repaired),
|
||||
create => "true",
|
||||
template_method => "mustache",
|
||||
depends_on => {"dovecot_pkgs_installed"},
|
||||
handle => "dovecot_cfg_created",
|
||||
edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/dovecot/dovecot.conf.mustache";
|
||||
|
||||
"$(imap_cert)"
|
||||
handle => "dovecot_imap_cert_installed",
|
||||
classes => if_repaired(dovecot_repaired),
|
||||
copy_from => local_dcp( execresult( "/usr/bin/readlink -qfn $(cfg[imap_cert])","noshell" )),
|
||||
perms => mog("600","root","root");
|
||||
|
||||
"$(imap_key)"
|
||||
handle => "dovecot_imap_key_installed",
|
||||
classes => if_repaired(dovecot_repaired),
|
||||
copy_from => local_dcp( execresult( "/usr/bin/readlink -qfn $(cfg[imap_key])","noshell" )),
|
||||
perms => mog("600","root","root");
|
||||
|
||||
|
||||
|
||||
|
||||
reports:
|
||||
"IMAP_CERT: $(imap_cert)";
|
||||
|
||||
dovecot_kept::
|
||||
"DOVECOT kept";
|
||||
|
||||
dovecot_repaired::
|
||||
"DOVECOT repaired";
|
||||
|
||||
}
|
1
php.cf
1
php.cf
|
@ -38,6 +38,7 @@ vars:
|
|||
"php$(version)-mysql",
|
||||
"php-json",
|
||||
"php$(version)-xml",
|
||||
"php-gd"
|
||||
};
|
||||
ubuntu::
|
||||
"pkgs" slist => {
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
#
|
||||
# Manged by CFEngine
|
||||
#
|
||||
|
||||
protocols = {{#vars.dovecot.cfg.protocols}} {{.}} {{/vars.dovecot.cfg.protocols}}
|
||||
|
||||
service imap-login {
|
||||
inet_listener imap {
|
||||
#port = 143
|
||||
}
|
||||
inet_listener imaps {
|
||||
port = 993
|
||||
ssl = yes
|
||||
}
|
||||
|
||||
# Number of connections to handle before starting a new process. Typically
|
||||
# the only useful values are 0 (unlimited) or 1. 1 is more secure, but 0
|
||||
# is faster. <doc/wiki/LoginProcess.txt>
|
||||
#service_count = 1
|
||||
|
||||
# Number of processes to always keep waiting for more connections.
|
||||
#process_min_avail = 0
|
||||
|
||||
# If you set service_count=0, you probably need to grow this.
|
||||
#vsz_limit = $default_vsz_limit
|
||||
}
|
||||
|
||||
protocol imap {
|
||||
|
||||
ssl_cert = <{{vars.dovecot.imap_cert}}
|
||||
ssl_key = <{{vars.dovecot.imap_key}}
|
||||
|
||||
# Space separated list of plugins to load (default is global mail_plugins).
|
||||
#mail_plugins = $mail_plugins
|
||||
|
||||
# Maximum number of IMAP connections allowed for a user from each IP address.
|
||||
# NOTE: The username is compared case-sensitively.
|
||||
#mail_max_userip_connections = 10
|
||||
}
|
||||
|
||||
|
||||
{{#vars.dovecot.cfg.userdbs}}
|
||||
userdb {
|
||||
driver = {{driver}}
|
||||
args = {{args}}
|
||||
{{raw}}
|
||||
}
|
||||
{{/vars.dovecot.cfg.userdbs}}
|
||||
|
||||
{{#vars.dovecot.cfg.passdbs}}
|
||||
passdb {
|
||||
driver = {{driver}}
|
||||
args = {{args}}
|
||||
{{raw}}
|
||||
}
|
||||
{{/vars.dovecot.cfg.passdbs}}
|
||||
|
||||
{{vars.dovecot.cfg.raw}}
|
||||
|
Loading…
Reference in New Issue