Compare commits
2 Commits
07723fa44a
...
c51019ba09
Author | SHA1 | Date |
---|---|---|
Tobias Herre | c51019ba09 | |
Tobias Herre | 3270974a5f |
30
dovecot.cf
30
dovecot.cf
|
@ -32,10 +32,6 @@ vars:
|
|||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
methods:
|
||||
"any" usebundle => wmde_install_packages(@(pkgs),"dovecot");
|
||||
"any" usebundle => wmde_service("$(service_name)","dovecot_kept","dovecot_repaired"),
|
||||
|
@ -48,11 +44,18 @@ methods:
|
|||
services:
|
||||
|
||||
files:
|
||||
"$(cfg_dir)/."
|
||||
create => "true",
|
||||
perms => mog("755","root","root"),
|
||||
depends_on => {"dovecot_pkgs_installed"},
|
||||
handle => "dovecot_cfg_dir_created";
|
||||
|
||||
"$(dovecot_conf)"
|
||||
classes => if_repaired(dovecot_repaired),
|
||||
create => "true",
|
||||
perms => mog("644","root","root"),
|
||||
template_method => "mustache",
|
||||
depends_on => {"dovecot_pkgs_installed"},
|
||||
depends_on => {"dovecot_pkgs_installed","dovecot_cfg_dir_created"},
|
||||
handle => "dovecot_cfg_created",
|
||||
edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/dovecot/dovecot.conf.mustache";
|
||||
|
||||
|
@ -81,3 +84,20 @@ reports:
|
|||
"DOVECOT repaired";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
bundle agent dovecot_vimbadmin_sql(cfg)
|
||||
{
|
||||
vars:
|
||||
"cfg_file" string => "$(sys.workdir)/data/agent/dovecot/vimbadmin-sql.comf";
|
||||
files:
|
||||
"$(cfg_file)"
|
||||
classes => if_repaired(dovecot_repaired),
|
||||
create => "true",
|
||||
template_method => "mustache",
|
||||
edit_template => "$(sys.workdir)/inputs/$(def.wmde_libdir)/templates/dovecot/vimbadmin-sql.conf.mustache";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
default_pass_scheme = CRYPT
|
||||
driver = mysql
|
||||
connect = host={{vars.dovecot_vimbadmin_sql.cfg.db_host}} dbname={{vars.dovecot_vimbadmin_sql.cfg.db_name}} user={{vars.dovecot_vimbadmin_sql.cfg.db_user}} password={{vars.dovecot_vimbadmin_sql.cfg.db_pass}}
|
||||
password_query = \
|
||||
SELECT username AS user, password, \
|
||||
homedir AS userdb_home, uid AS userdb_uid, gid AS userdb_gid \
|
||||
FROM mailbox WHERE username = '%u'
|
||||
iterate_query = SELECT username AS user FROM mailbox
|
Loading…
Reference in New Issue