Compare commits
2 Commits
4635b346e1
...
71bef3b692
Author | SHA1 | Date |
---|---|---|
Tobias Herre | 71bef3b692 | |
Tobias Herre | 2c5c5f1951 |
16
postfix.cf
16
postfix.cf
|
@ -47,6 +47,8 @@ vars:
|
|||
"postmap_cmd" string => "/usr/sbin/postmap";
|
||||
any::
|
||||
"data_dir" string => "$(db_dir)/postfix";
|
||||
"maps_dir" string => "$(cfg_dir)/maps";
|
||||
|
||||
|
||||
users:
|
||||
debian::
|
||||
|
@ -69,6 +71,12 @@ files:
|
|||
create => "true",
|
||||
perms => m(755);
|
||||
|
||||
"$(maps_dir)/."
|
||||
create => "true",
|
||||
perms => m("755");
|
||||
|
||||
|
||||
|
||||
"$(postfix.db_dir)/."
|
||||
create => "true",
|
||||
perms => mog("755","root","root"),
|
||||
|
@ -172,15 +180,15 @@ vars:
|
|||
|
||||
"idx" slist => getindices("file");
|
||||
|
||||
"sql_dir" string => "$(postfix.cfg_dir)/sql";
|
||||
"maps_dir" string => "$(postfix.cfg_dir)/maps";
|
||||
|
||||
"$(idx)" string => "$(sql_dir)/$(idx).sql";
|
||||
"$(idx)" string => "$(maps_dir)/$(idx).sql";
|
||||
files:
|
||||
"$(sql_dir)/."
|
||||
"$(maps_dir)/."
|
||||
create => "true",
|
||||
perms => m("755");
|
||||
|
||||
"$(sql_dir)/$(idx).sql"
|
||||
"$(maps_dir)/$(idx).sql"
|
||||
create=>"true",
|
||||
perms=>m("644"),
|
||||
content=>"
|
||||
|
|
49
sympa.cf
49
sympa.cf
|
@ -140,6 +140,45 @@ reports:
|
|||
|
||||
}
|
||||
|
||||
bundle agent sympa_create_postfix_general_maps(cfg,dest_file)
|
||||
{
|
||||
vars:
|
||||
"dl" slist => getindices(@(cfg[domains]));
|
||||
|
||||
"cnt" string => string_mustache("
|
||||
#
|
||||
# Managed by CFEngine
|
||||
#
|
||||
{{#dl}}
|
||||
sympa@{{.}} sympa:sympa@{{.}}(dl)
|
||||
listmaster@{{.}}(dl) sympa:listmaster@{{.}}(dl)
|
||||
bounce@{{.}}(dl) sympa:bounce@{{.}}(dl)
|
||||
abuse-feedback-report@{{.}} sympa:abuse-feedback-report@{{.}}
|
||||
{{/dl}}
|
||||
",
|
||||
bundlestate("$(this.bundle)"));
|
||||
classes:
|
||||
"postfix_repaired" expression => not(fileexists("$(dest_file).db")),
|
||||
scope => "namespace";
|
||||
files:
|
||||
"$(dest_file)"
|
||||
perms => m("644"),
|
||||
create => "true",
|
||||
content => "$(cnt)
|
||||
",
|
||||
classes => if_repaired("postfix_repaired"),
|
||||
handle => "sympa_postfix_general_maps_created" ;
|
||||
commands:
|
||||
postfix_repaired::
|
||||
"$(postfix.postmap_cmd)"
|
||||
args => "$(dest_file)",
|
||||
inform => "true",
|
||||
depends_on => {"sympa_postfix_general_maps_created"};
|
||||
|
||||
|
||||
reports:
|
||||
}
|
||||
|
||||
bundle agent sympa_postfix_sql(cfg)
|
||||
{
|
||||
vars:
|
||||
|
@ -152,14 +191,14 @@ vars:
|
|||
|
||||
"idx" slist => getindices("file");
|
||||
|
||||
"sql_dir" string => "$(postfix.cfg_dir)/sql";
|
||||
"$(idx)" string => "$(sql_dir)/$(idx).sql";
|
||||
"maps_dir" string => "$(postfix.cfg_dir)/sql";
|
||||
"$(idx)" string => "$(maps_dir)/$(idx).sql";
|
||||
files:
|
||||
"$(sql_dir)/."
|
||||
"$(maps_dir)/."
|
||||
create => "true",
|
||||
perms => m("755");
|
||||
|
||||
"$(sql_dir)/$(idx).sql"
|
||||
"$(maps_dir)/$(idx).sql"
|
||||
create=>"true",
|
||||
perms=>m("644"),
|
||||
content=>"
|
||||
|
@ -282,7 +321,7 @@ methods:
|
|||
};
|
||||
|
||||
# "any" usebundle => install_sympa_domain("@(cfg[domains][$(domains_idx)])");
|
||||
"any" usebundle => install_sympa_domains(@(cfg[domains2]));
|
||||
"any" usebundle => install_sympa_domains(@(cfg[domains]));
|
||||
reports:
|
||||
# "IDX $(domains_idx)";
|
||||
# "DOMCONF: $(cfg[$(idx)])";
|
||||
|
|
Loading…
Reference in New Issue