Commit 3a61c9f3 authored by Hinrikus Wolf's avatar Hinrikus Wolf
Browse files

Merge branch 'issue-10' into 'master'

postfix: add rt4mailgate support

See merge request !4
parents 90090b33 f26819b0
...@@ -26,3 +26,8 @@ postfix_network_access: ...@@ -26,3 +26,8 @@ postfix_network_access:
- cidr: 134.130.5.32/27 # rwth - cidr: 134.130.5.32/27 # rwth
action: permit action: permit
postfix_content_filter: false # or: spamassassin postfix_content_filter: false # or: spamassassin
postfix_aliases_rt: []
# - queue: IT
# url: https://rt.example.com
# address: it
...@@ -78,6 +78,15 @@ ...@@ -78,6 +78,15 @@
- postfix - postfix
- mail - mail
- name: install rt-mailgate if needed
apt:
name: rt4-clients
state: present
when: postfix_aliases_rt|bool
tags:
- postfix
- mail
- name: ensure system alias database is present - name: ensure system alias database is present
template: template:
src: aliases.j2 src: aliases.j2
......
{% for alias in system_aliases %} {% for alias in system_aliases %}
{{ alias.src }}: {{ alias.dest }} {{ alias.src }}: {{ alias.dest }}
{% endfor %} {% endfor %}
{% for alias in postfix_aliases_rt|default([]) %}
{{ alias.address|default(alias.queue|lower) }}: "|/usr/bin/rt-mailgate --queue {{ alias.queue }} --action correspond --url {{ alias.url }}"
{{ alias.address|default(alias.queue|lower) }}-comment: "|/usr/bin/rt-mailgate --queue {{ alias.queue }} --action comment --url {{ alias.url }}"
{% endfor %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment