Skip to content

Commit

Permalink
Merge pull request #107 from ljohnston/master
Browse files Browse the repository at this point in the history
Add postfix_smtp_generic_maps_database_type
  • Loading branch information
tersmitten authored Feb 22, 2021
2 parents c69a7b8 + 81f9288 commit fea3a8d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ None
* `postfix_header_checks` [default: `[]`]: Lookup tables for content inspection of primary non-MIME message headers `/etc/postfix/header_checks` ([see](http://www.postfix.org/postconf.5.html#header_checks))
* `postfix_header_checks_database_type` [default: `regexp`]: The database type for use in `header_checks`
* `postfix_generic` [default: `[]`]: Generic table address mapping in `/etc/postfix/generic` ([see](http://www.postfix.org/generic.5.html))
* `postfix_smtp_generic_maps_database_type` [default: `"{{ postfix_default_database_type }}"`]: The database type for use in `smtp_generic_maps`

* `postfix_mydestination` [default: `["{{ postfix_hostname }}", 'localdomain', 'localhost', 'localhost.localdomain']`]: Specifies what domains this machine will deliver locally, instead of forwarding to another machine
* `postfix_mynetworks` [default: `['127.0.0.0/8', '[::ffff:127.0.0.0]/104', '[::1]/128']`]: The list of "trusted" remote SMTP clients that have more privileges than "strangers"
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ postfix_sender_dependent_relayhost_maps: []
postfix_header_checks: []
postfix_header_checks_database_type: regexp
postfix_generic: []
postfix_smtp_generic_maps_database_type: "{{ postfix_default_database_type }}"

postfix_relayhost: ''
postfix_relayhost_mxlookup: false
Expand Down
4 changes: 2 additions & 2 deletions handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
when: postfix_default_database_type != 'regexp'

- name: postmap generic
command: postmap {{ postfix_default_database_type }}:{{ postfix_generic_file }}
when: postfix_default_database_type != 'regexp'
command: postmap {{ postfix_smtp_generic_maps_database_type }}:{{ postfix_generic_file }}
when: postfix_smtp_generic_maps_database_type != 'regexp'

- name: remove pid
file:
Expand Down
2 changes: 1 addition & 1 deletion templates/etc/postfix/main.cf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ transport_maps = {{ postfix_transport_maps_database_type }}:{{ postfix_transport
sender_dependent_relayhost_maps = {{ postfix_default_database_type }}:{{ postfix_sender_dependent_relayhost_maps_file }}
{% endif %}
{% if postfix_generic %}
smtp_generic_maps = {{ postfix_default_database_type }}:{{ postfix_generic_file }}
smtp_generic_maps = {{ postfix_smtp_generic_maps_database_type }}:{{ postfix_generic_file }}
{% endif %}
{% if postfix_header_checks %}
smtp_header_checks = {{ postfix_header_checks_database_type }}:{{ postfix_header_checks_file }}
Expand Down

0 comments on commit fea3a8d

Please sign in to comment.