Initial commit
This commit is contained in:
commit
11b84aa872
40 changed files with 995 additions and 0 deletions
11
templates/postfix/conf.d/bad_smtp_auth_users.j2
Normal file
11
templates/postfix/conf.d/bad_smtp_auth_users.j2
Normal file
|
@ -0,0 +1,11 @@
|
|||
### {{ ansible_managed }}
|
||||
|
||||
# Use this file to block SMTP-Auth access for users.
|
||||
# Example:
|
||||
# username REJECT
|
||||
|
||||
{% if postfix_bad_smtp_auth_users is defined %}
|
||||
{% for user in postfix_bad_smtp_auth_users %}
|
||||
{{ "%-30s %s" | format(user, "REJECT") }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
10
templates/postfix/conf.d/client_checks.j2
Normal file
10
templates/postfix/conf.d/client_checks.j2
Normal file
|
@ -0,0 +1,10 @@
|
|||
### {{ ansible_managed }}
|
||||
|
||||
### With this file you can allow or disallow clients to connect to the SMTP server.
|
||||
|
||||
{% if postfix_client_checks is defined %}
|
||||
{% for client in postfix_client_checks %}
|
||||
{{ client.comment }}
|
||||
{{ "%-30s %s" | format(client.name, client.state) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
7
templates/postfix/conf.d/destination_limit.j2
Normal file
7
templates/postfix/conf.d/destination_limit.j2
Normal file
|
@ -0,0 +1,7 @@
|
|||
### {{ ansible_managed }}
|
||||
|
||||
{% if postfix_dlimit_domains is defined %}
|
||||
{% for domain in postfix_dlimit_domains %}
|
||||
{{ "%-50s %s" | format(domain, "dlimit:") }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
7
templates/postfix/conf.d/header_add.j2
Normal file
7
templates/postfix/conf.d/header_add.j2
Normal file
|
@ -0,0 +1,7 @@
|
|||
### {{ ansible_managed }}
|
||||
|
||||
{% if postfix_header_add is defined %}
|
||||
{% for header in postfix_header_add %}
|
||||
{{ "%-50s %s" | format(header.destination, header.header) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
21
templates/postfix/conf.d/header_treatment.j2
Normal file
21
templates/postfix/conf.d/header_treatment.j2
Normal file
|
@ -0,0 +1,21 @@
|
|||
### {{ ansible_managed }}
|
||||
|
||||
# Remove sensible headers
|
||||
/^Mail-System-Version:/ IGNORE
|
||||
/^Mailer:/ IGNORE
|
||||
/^Originating-Client:/ IGNORE
|
||||
/^User-Agent:/ IGNORE
|
||||
/^X-Enigmail-Version:/ IGNORE
|
||||
/^X-Mailer:/ IGNORE
|
||||
/^X-MimeOLE:/ IGNORE
|
||||
/^X-Newsreader:/ IGNORE
|
||||
/^X-Originating-IP:/ IGNORE
|
||||
/^X-Sender:/ IGNORE
|
||||
|
||||
/^\s*(Received: from)[^\n]*(.*)/ REPLACE $1 [127.0.0.1] (localhost [127.0.0.1])
|
||||
|
||||
{% if postfix_header_treatment is defined %}
|
||||
{% for header in postfix_header_treatment %}
|
||||
{{ header }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
13
templates/postfix/conf.d/helo_checks.j2
Normal file
13
templates/postfix/conf.d/helo_checks.j2
Normal file
|
@ -0,0 +1,13 @@
|
|||
### {{ ansible_managed }}
|
||||
|
||||
{% if postfix_default_helo_checks is defined %}
|
||||
{% for check in postfix_default_helo_checks %}
|
||||
{{ "%-30s %s" | format(check.client, check.state) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if postfix_helo_checks is defined %}
|
||||
{% for check in postfix_default_helo_checks %}
|
||||
{{ "%-30s %s" | format(check.client, check.state) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
8
templates/postfix/conf.d/permit_sasl_login_mismatch.j2
Normal file
8
templates/postfix/conf.d/permit_sasl_login_mismatch.j2
Normal file
|
@ -0,0 +1,8 @@
|
|||
### {{ ansible_managed }}
|
||||
### Enable sender spoofing for selected accounts
|
||||
|
||||
{% if postfix_permit_login_mismatch is defined %}
|
||||
{% for user in postfix_permit_login_mismatch %}
|
||||
{{ "%-50s %s" | format(user, "permit_login_mismatch") }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
19
templates/postfix/conf.d/postscreen_access.j2
Normal file
19
templates/postfix/conf.d/postscreen_access.j2
Normal file
|
@ -0,0 +1,19 @@
|
|||
### {{ ansible_managed }}
|
||||
|
||||
{% if postfix_default_postscreen_access is defined %}
|
||||
{% for source in postfix_default_postscreen_access %}
|
||||
{% if source.comment is defined %}
|
||||
# {{ source.comment }}
|
||||
{% endif %}
|
||||
{{ "%-40s %s" | format(source.source, source.state) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if postfix_postscreen_access is defined %}
|
||||
{% for source in postfix_postscreen_access %}
|
||||
{% if source.comment is defined %}
|
||||
# {{ source.comment }}
|
||||
{% endif %}
|
||||
{{ "%-40s %s" | format(source.source, source.state) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
9
templates/postfix/conf.d/relay_by_sender.j2
Normal file
9
templates/postfix/conf.d/relay_by_sender.j2
Normal file
|
@ -0,0 +1,9 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
# http://www.postfix.org/postconf.5.html#sender_dependent_relayhost_maps
|
||||
|
||||
{% if postfix_relay_by_sender is defined %}
|
||||
{% for map in postfix_relay_by_sender %}
|
||||
{{ map }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
1
templates/postfix/conf.d/relay_checks.j2
Normal file
1
templates/postfix/conf.d/relay_checks.j2
Normal file
|
@ -0,0 +1 @@
|
|||
### {{ ansible_managed }}
|
20
templates/postfix/conf.d/sender_checks.j2
Normal file
20
templates/postfix/conf.d/sender_checks.j2
Normal file
|
@ -0,0 +1,20 @@
|
|||
### {{ ansible_managed }}
|
||||
|
||||
{% if postfix_sender_checks is defined %}
|
||||
{% for sender in postfix_sender_checks %}
|
||||
{% if sender.comment is defined %}
|
||||
# {{ sender.comment }}
|
||||
{% endif %}
|
||||
{{ "%-50s %s" | format(sender.client, sender.state) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
# Blocked Domains
|
||||
{% for domain in postfix_blocked_domains %}
|
||||
{{ "%-50s %s" | format(domain, "REJECT No spammers") }}
|
||||
{% endfor %}
|
||||
|
||||
# Blocked Sender
|
||||
{% for sender in postfix_blocked_senders %}
|
||||
{{ "%-50s %s" | format(sender, "REJECT No spammers") }}
|
||||
{% endfor %}
|
12
templates/postfix/conf.d/transport_global_exceptions.j2
Normal file
12
templates/postfix/conf.d/transport_global_exceptions.j2
Normal file
|
@ -0,0 +1,12 @@
|
|||
### {{ ansible_managed }}
|
||||
|
||||
# Use this file for mail addresses that should be treated specially.
|
||||
|
||||
{% if postfix_transport_global_exceptions is defined %}
|
||||
{% for address in postfix_transport_global_exceptions %}
|
||||
{% if address.comment is defined %}
|
||||
# {{ address.comment }}
|
||||
{% endif %}
|
||||
{{ "%-50s %s" | format(address.adress, address.state) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
10
templates/postfix/conf.d/transport_relay.j2
Normal file
10
templates/postfix/conf.d/transport_relay.j2
Normal file
|
@ -0,0 +1,10 @@
|
|||
### {{ ansible_managed }}
|
||||
|
||||
{% if postfix_transport_relay is defined %}
|
||||
{% for transport in postfix_transport_relay %}
|
||||
{% if transport.comment is defined %}
|
||||
# {{ transport.comment }}
|
||||
{% endif %}
|
||||
{{ "%-50s %s" | format(transport.destination, transport.relay) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
13
templates/postfix/conf.d/transport_tor.j2
Normal file
13
templates/postfix/conf.d/transport_tor.j2
Normal file
|
@ -0,0 +1,13 @@
|
|||
### {{ ansible_managed }}
|
||||
|
||||
{% if postfix_default_transport_tor_domains is defined %}
|
||||
{% for domain in postfix_default_transport_tor_domains %}
|
||||
{{ "%-50s %s" | format(domain.name, domain.relay) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if postfix_transport_tor_domains is defined %}
|
||||
{% for domain in postfix_transport_tor_domains %}
|
||||
{{ "%-50s %s" | format(domain.name, domain.relay) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue