diff options
author | Dan Fandrich <danf@mageia.org> | 2024-10-04 21:44:50 -0700 |
---|---|---|
committer | Dan Fandrich <danf@mageia.org> | 2024-10-04 21:48:08 -0700 |
commit | f5b2645d869b76598c18527d388ed76719c06bdd (patch) | |
tree | 659f3ee719b437817a02db4a31dbd37a65972412 /modules/postfix/templates | |
parent | ae1976228660588902a904f7509a106b790531cb (diff) | |
download | puppet-f5b2645d869b76598c18527d388ed76719c06bdd.tar puppet-f5b2645d869b76598c18527d388ed76719c06bdd.tar.gz puppet-f5b2645d869b76598c18527d388ed76719c06bdd.tar.bz2 puppet-f5b2645d869b76598c18527d388ed76719c06bdd.tar.xz puppet-f5b2645d869b76598c18527d388ed76719c06bdd.zip |
Revert "Use @ when accessing variables in templates"
Variables defined within a template can't be accessed with @. This
change needs to be reworked to eliminate those cases.
This reverts commits 2c7da665 and ae197622.
Diffstat (limited to 'modules/postfix/templates')
-rw-r--r-- | modules/postfix/templates/group_aliases.conf | 10 | ||||
-rw-r--r-- | modules/postfix/templates/ldap_aliases.conf | 12 | ||||
-rw-r--r-- | modules/postfix/templates/main.cf | 22 | ||||
-rw-r--r-- | modules/postfix/templates/simple_relay_main.cf | 6 | ||||
-rw-r--r-- | modules/postfix/templates/sympa_aliases | 6 | ||||
-rw-r--r-- | modules/postfix/templates/transport_regexp | 8 | ||||
-rw-r--r-- | modules/postfix/templates/virtual_aliases | 20 |
7 files changed, 42 insertions, 42 deletions
diff --git a/modules/postfix/templates/group_aliases.conf b/modules/postfix/templates/group_aliases.conf index a230a070..eac16dab 100644 --- a/modules/postfix/templates/group_aliases.conf +++ b/modules/postfix/templates/group_aliases.conf @@ -1,15 +1,15 @@ <%- ldap = ldap_servers.map { |l| "ldaps://#{l}:636" } -%> -server_host = <%= @ldap.join(' ') %> -search_base = <%= @dc_suffix %> +server_host = <%= ldap.join(' ') %> +search_base = <%= dc_suffix %> query_filter = (&(cn=mga-%u)(objectClass=groupOfNames)) result_attribute = mail special_result_attribute = member bind = yes -bind_dn = cn=postfix-<%= @hostname %>,ou=System Accounts,<%= @dc_suffix %> -bind_pw = <%= @ldap_password %> +bind_dn = cn=postfix-<%= hostname %>,ou=System Accounts,<%= dc_suffix %> +bind_pw = <%= ldap_password %> # postfix complain on url # warning: dict_ldap_open: URL scheme ldaps requires protocol version 3 version = 3 -domain = group.<%= @domain %> +domain = group.<%= domain %> diff --git a/modules/postfix/templates/ldap_aliases.conf b/modules/postfix/templates/ldap_aliases.conf index 232cf02e..40d7da13 100644 --- a/modules/postfix/templates/ldap_aliases.conf +++ b/modules/postfix/templates/ldap_aliases.conf @@ -7,14 +7,14 @@ end ldap = ldap_servers.map { |l| "ldaps://#{l}:636" } -%> -server_host = <%= @ldap.join(' ') %> -search_base = <%= @dc_suffix %> -query_filter = (&(uid=%u)(|<%= @query_string %>)) +server_host = <%= ldap.join(' ') %> +search_base = <%= dc_suffix %> +query_filter = (&(uid=%u)(|<%= query_string %>)) result_attribute = mail bind = yes -bind_dn = cn=postfix-<%= @hostname %>,ou=System Accounts,<%= @dc_suffix %> -bind_pw = <%= @ldap_password %> +bind_dn = cn=postfix-<%= hostname %>,ou=System Accounts,<%= dc_suffix %> +bind_pw = <%= ldap_password %> # postfix complain on url # warning: dict_ldap_open: URL scheme ldaps requires protocol version 3 version = 3 -domain = <%= @domain %> +domain = <%= domain %> diff --git a/modules/postfix/templates/main.cf b/modules/postfix/templates/main.cf index 9fe072b2..7fe0f073 100644 --- a/modules/postfix/templates/main.cf +++ b/modules/postfix/templates/main.cf @@ -21,7 +21,7 @@ mailq_path = /usr/bin/mailq queue_directory = /var/spool/postfix mail_owner = postfix <% if all_tags.include?('postfix::simple_relay') || all_tags.include?('postfix::server::secondary') %> -relayhost = sucuk.<%= @domain %> +relayhost = sucuk.<%= domain %> <%- end -%> # User configurable parameters @@ -40,21 +40,21 @@ smtp_address_preference = ipv4 # FIXME Do not hardcode this mynetworks = 212.85.158.144/28 [2a02:2178:2:7::]/64 127.0.0.1 163.172.148.228 [2001:bc8:4400:2800::4115] -myhostname = <%= @fqdn %> -mydomain = <%= @domain %> +myhostname = <%= fqdn %> +mydomain = <%= domain %> <%- if all_tags.include?('postfix::server::secondary') -%> -relay_domains = <%= @domain %>, - ml.<%= @domain %>, - group.<%= @domain %> +relay_domains = <%= domain %>, + ml.<%= domain %>, + group.<%= domain %> <%- end -%> -mydestination = <%= @fqdn %> - ml.<%= @domain %> +mydestination = <%= fqdn %> + ml.<%= domain %> <%- if all_tags.include?('postfix::server::primary') -%> -virtual_mailbox_domains = <%= @domain %>, - group.<%= @domain %> +virtual_mailbox_domains = <%= domain %>, + group.<%= domain %> # postfix complain if not set # Mar 22 23:51:20 alamut postfix/virtual[22952]: fatal: bad string length 0 < 1: virtual_mailbox_base = @@ -98,7 +98,7 @@ sympabounce_destination_recipient_limit = 1 <%- end -%> #delay_warning_time = 4h -smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (<%= @lsbdistid %>) +smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) (<%= lsbdistid %>) unknown_local_recipient_reject_code = 450 smtp-filter_destination_concurrency_limit = 2 lmtp-filter_destination_concurrency_limit = 2 diff --git a/modules/postfix/templates/simple_relay_main.cf b/modules/postfix/templates/simple_relay_main.cf index 331166c2..e0c116a7 100644 --- a/modules/postfix/templates/simple_relay_main.cf +++ b/modules/postfix/templates/simple_relay_main.cf @@ -20,8 +20,8 @@ mail_owner = postfix # User configurable parameters -myhostname = <%= @fqdn %> -mydomain = <%= @domain %> +myhostname = <%= fqdn %> +mydomain = <%= domain %> inet_protocols = all mynetworks_style = host #delay_warning_time = 4h @@ -38,7 +38,7 @@ smtpd_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt local_recipient_maps = fallback_transport_maps = regexp:/etc/postfix/transport_regexp transport_maps = regexp:/etc/postfix/transport_regexp -mydestination = ml.<%= @domain %> +mydestination = ml.<%= domain %> sympa_destination_recipient_limit = 1 sympabounce_destination_recipient_limit = 1 virtual_alias_maps = regexp:/etc/postfix/sympa_aliases diff --git a/modules/postfix/templates/sympa_aliases b/modules/postfix/templates/sympa_aliases index 63650c84..436e7a28 100644 --- a/modules/postfix/templates/sympa_aliases +++ b/modules/postfix/templates/sympa_aliases @@ -1,8 +1,8 @@ # everything is handled with transports in postfix, # but according to https://www.sympa.org/faq/postfix, we also need this one <% escaped_domain = ( 'ml.' + domain ).sub('.','\.') %> -/^(.*)-owner\@<%= @escaped_domain %>$/ $1+owner@ml.<%= @domain %> +/^(.*)-owner\@<%= escaped_domain %>$/ $1+owner@ml.<%= domain %> # redirect the mail from the ml domain to sysadmin -/^listmaster\@<%= @escaped_domain %>$/ listmaster@<%= @domain %> +/^listmaster\@<%= escaped_domain %>$/ listmaster@<%= domain %> # errors are sent there, so that should also be redirected -/^sympa-request\@<%= @escaped_domain %>$/ listmaster@<%= @domain %> +/^sympa-request\@<%= escaped_domain %>$/ listmaster@<%= domain %> diff --git a/modules/postfix/templates/transport_regexp b/modules/postfix/templates/transport_regexp index 941b77df..3eb5494f 100644 --- a/modules/postfix/templates/transport_regexp +++ b/modules/postfix/templates/transport_regexp @@ -2,9 +2,9 @@ ml_domain = 'ml\.' + domain.gsub('.','\.') %> <%- if classes.include?('sympa::server') -%> -/^.*+owner\@<%= @ml_domain %>$/ sympabounce: -/^bounce+.*\@<%= @ml_domain %>$/ sympabounce: -/^.*\@<%= @ml_domain %>$/ sympa: +/^.*+owner\@<%= ml_domain %>$/ sympabounce: +/^bounce+.*\@<%= ml_domain %>$/ sympabounce: +/^.*\@<%= ml_domain %>$/ sympa: <%- else -%> -/^.*\@<%= @ml_domain %>$/ smtp:sucuk.mageia.org +/^.*\@<%= ml_domain %>$/ smtp:sucuk.mageia.org <%- end -%> diff --git a/modules/postfix/templates/virtual_aliases b/modules/postfix/templates/virtual_aliases index a3c9d125..861e79c6 100644 --- a/modules/postfix/templates/virtual_aliases +++ b/modules/postfix/templates/virtual_aliases @@ -1,32 +1,32 @@ # do not forget to add $domain or it will not work # do not hardcode the domain, or it will be harvested by bot -treasurer@<%= @domain %> treasurer@group.<%= @domain %> -president@<%= @domain %> ennael@<%= @domain %> -secretary@<%= @domain %> obgr_seneca@<%= @domain %> +treasurer@<%= domain %> treasurer@group.<%= domain %> +president@<%= domain %> ennael@<%= domain %> +secretary@<%= domain %> obgr_seneca@<%= domain %> -contact@<%= @domain %> council@group.<%= @domain %> -press@<%= @domain %> council@group.<%= @domain %> +contact@<%= domain %> council@group.<%= domain %> +press@<%= domain %> council@group.<%= domain %> # later switch to a team alias -root@<%= @domain %> sysadmin@group.<%= @domain %> +root@<%= domain %> sysadmin@group.<%= domain %> -security@<%= @domain %> security@group.<%= @domain %> +security@<%= domain %> security@group.<%= domain %> # Temporary(?) alias until there is a real board-commits@ list -board-commits@ml.<%= @domain %> board-public@ml.<%= @domain %> +board-commits@ml.<%= domain %> board-public@ml.<%= domain %> # TODO see https://www.ietf.org/rfc/rfc2142.txt <% ['postmaster','hostmaster','abuse','noc','listmaster','MAILER-DAEMON'].each { |a| %> -<%= @a %>@<%= @domain %> root@<%= @domain %> +<%= a %>@<%= domain %> root@<%= domain %> <% } ['webmaster','www'].each { |a| %> -<%= @a %>@<%= @domain %> web@group.<%= @domain %> +<%= a %>@<%= domain %> web@group.<%= domain %> <% } %> # TODO : |