Oefenweb / ansible-postfix

Ansible role to set up postfix in Debian-like systems
MIT License
174 stars 82 forks source link

FR - Ability to specify map type per respective option #76

Closed rhysxevans closed 3 years ago

rhysxevans commented 4 years ago

Hi,

It would be nice to specify the map database type per option if required.

IE there is a default postfix_default_database_type but we have the ability to overwrite if required

Something like (this works)

{% if postfix_sender_canonical_maps %}
sender_canonical_maps = {{ postfix_sender_canonical_maps_database_type | default(postfix_default_database_type) }}:{{ postfix_sender_canonical_maps_file }}
{% endif %}
{% if postfix_recipient_canonical_maps %}
recipient_canonical_maps = {{ postfix_recipient_canonical_maps_database_type | default(postfix_default_database_type) }}:{{ postfix_recipient_canonical_maps_file }}
{% endif %}

this allows us to specify

postfix_sender_canonical_maps_database_type: regexp
postfix_recipient_canonical_maps_database_type: regexp

To only override those specific map types if required

Thanks

tersmitten commented 4 years ago

Looks like a good idea!

ljohnston commented 3 years ago

Need this for smtp generic maps.

tersmitten commented 3 years ago

Fixed in https://github.com/Oefenweb/ansible-postfix/releases/tag/v3.2.0