Skip to content

Commit

Permalink
Add support for smtp_bind_address* parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
tersmitten committed Mar 20, 2024
1 parent 7a2f032 commit 5778da8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ None
* `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"
* `postfix_inet_interfaces` [default: `all`]: Network interfaces to bind ([see](http://www.postfix.org/postconf.5.html#inet_interfaces))
* `postfix_inet_protocols` [default: `all`]: The Internet protocols Postfix will attempt to use when making or accepting connections ([see](http://www.postfix.org/postconf.5.html#inet_protocols))
* `postfix_smtp_ipv6_bind` [default: empty]: Outbound network interfaces to use (IpV6) ([see](http://www.postfix.org/postconf.5.html#smtp_bind_address6))
* `postfix_smtp_ipv4_bind` [default: `all`]: Outbound network interfaces to use (IpV4) ([see](http://www.postfix.org/postconf.5.html#smtp_bind_address))
*
* `postfix_smtp_ipv4_bind` [optional]: Outbound network interfaces to use (IPv4) ([see](http://www.postfix.org/postconf.5.html#smtp_bind_address))
* `postfix_smtp_ipv6_bind` [optional]: Outbound network interfaces to use (IPv6) ([see](http://www.postfix.org/postconf.5.html#smtp_bind_address6))

* `postfix_relayhost` [default: `''` (no relay host)]: Hostname to relay all email to
* `postfix_relayhost_mxlookup` [default: `false` (not using mx lookup)]: Lookup for MX record instead of A record for relayhost
* `postfix_relayhost_port` [default: 587]: Relay port (on `postfix_relayhost`, if set)
Expand Down
2 changes: 0 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ postfix_smtp_tls_wrappermode: false
postfix_smtp_tls_note_starttls_offer: true

postfix_inet_interfaces: all
postfix_smtp_ipv6_bind: ''
postfix_smtp_ipv4_bind: all
postfix_inet_protocols: all
postfix_mydestination:
- "{{ postfix_hostname }}"
Expand Down
4 changes: 2 additions & 2 deletions templates/etc/postfix/main.cf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ inet_interfaces = {{ postfix_inet_interfaces }}
{% else %}
inet_interfaces = {{ postfix_inet_interfaces | join(', ') }}
{% endif %}
{% if postfix_smtp_ipv4_bind %}
{% if postfix_smtp_ipv4_bind is defined %}
smtp_bind_address = {{ postfix_smtp_ipv4_bind }}
{% endif %}
{% if postfix_smtp_ipv6_bind %}
{% if postfix_smtp_ipv6_bind is defined %}
smtp_bind_address6 = {{ postfix_smtp_ipv6_bind }}
{% endif %}
{% if postfix_inet_protocols is string %}
Expand Down

0 comments on commit 5778da8

Please sign in to comment.