wip
This commit is contained in:
parent
d2e5f06413
commit
c7a707f907
2 changed files with 31 additions and 6 deletions
|
@ -39,7 +39,7 @@ setup = f"""
|
||||||
WHERE domains.name = 'example.com';
|
WHERE domains.name = 'example.com';
|
||||||
|
|
||||||
INSERT INTO users (name, domain_id, redirect)
|
INSERT INTO users (name, domain_id, redirect)
|
||||||
SELECT 'bw_test_alias', domains.id, 'irgendweo@gmail.com'
|
SELECT 'bw_test_alias', domains.id, 'somewhere@example.com'
|
||||||
FROM domains
|
FROM domains
|
||||||
WHERE domains.name = 'example.com';
|
WHERE domains.name = 'example.com';
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -17,11 +17,6 @@ files = {
|
||||||
'/etc/postfix/master.cf': {
|
'/etc/postfix/master.cf': {
|
||||||
**file_options,
|
**file_options,
|
||||||
},
|
},
|
||||||
'/etc/postfix/virtual_alias_maps.cf': {
|
|
||||||
'content_type': 'mako',
|
|
||||||
'context': node.metadata.get('mailserver/database'),
|
|
||||||
**file_options,
|
|
||||||
},
|
|
||||||
'/etc/postfix/virtual_mailbox_domains.cf': {
|
'/etc/postfix/virtual_mailbox_domains.cf': {
|
||||||
'content_type': 'mako',
|
'content_type': 'mako',
|
||||||
'context': node.metadata.get('mailserver/database'),
|
'context': node.metadata.get('mailserver/database'),
|
||||||
|
@ -32,6 +27,11 @@ files = {
|
||||||
'context': node.metadata.get('mailserver/database'),
|
'context': node.metadata.get('mailserver/database'),
|
||||||
**file_options,
|
**file_options,
|
||||||
},
|
},
|
||||||
|
'/etc/postfix/virtual_alias_maps.cf': {
|
||||||
|
'content_type': 'mako',
|
||||||
|
'context': node.metadata.get('mailserver/database'),
|
||||||
|
**file_options,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
svc_systemd['postfix'] = {
|
svc_systemd['postfix'] = {
|
||||||
|
@ -39,3 +39,28 @@ svc_systemd['postfix'] = {
|
||||||
'postgres_db:mailserver',
|
'postgres_db:mailserver',
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
actions['test_virtual_mailbox_domains'] = {
|
||||||
|
'command': 'false',
|
||||||
|
'unless': "postmap -q example.com pgsql:/etc/postfix/virtual_mailbox_domains.cf | grep -q '^example.com$'",
|
||||||
|
'needs': [
|
||||||
|
'svc_systemd:postfix',
|
||||||
|
'action:mailserver_update_test_pw',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
actions['test_virtual_mailbox_maps'] = {
|
||||||
|
'command': 'false',
|
||||||
|
'unless': "postmap -q bw_test_user@example.com pgsql:/etc/postfix/virtual_mailbox_maps.cf | grep -q '^bw_test_user@example.com$'",
|
||||||
|
'needs': [
|
||||||
|
'svc_systemd:postfix',
|
||||||
|
'action:mailserver_update_test_pw',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
actions['test_virtual_alias_maps'] = {
|
||||||
|
'command': 'false',
|
||||||
|
'unless': "postmap -q bw_test_alias@example.com pgsql:/etc/postfix/virtual_alias_maps.cf | grep -q '^somewhere@example.com$'",
|
||||||
|
'needs': [
|
||||||
|
'svc_systemd:postfix',
|
||||||
|
'action:mailserver_update_test_pw',
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue