diff options
| author | Dan Fandrich <danf@mageia.org> | 2026-02-21 20:55:36 -0800 |
|---|---|---|
| committer | Dan Fandrich <danf@mageia.org> | 2026-02-21 21:10:56 -0800 |
| commit | 394f128c52caae23a9024c55cbef043bf7e080ea (patch) | |
| tree | 0d45a4af40cfa5e3a1da8a3f1ea7ffd502bec580 /modules/postfix | |
| parent | 5b23841245eea3a2ba86dd0544668b5e00eb5b4b (diff) | |
| download | puppet-394f128c52caae23a9024c55cbef043bf7e080ea.tar puppet-394f128c52caae23a9024c55cbef043bf7e080ea.tar.gz puppet-394f128c52caae23a9024c55cbef043bf7e080ea.tar.bz2 puppet-394f128c52caae23a9024c55cbef043bf7e080ea.tar.xz puppet-394f128c52caae23a9024c55cbef043bf7e080ea.zip | |
Use @ when accessing variables in templates
Access without the @ symbol is the older method and is discouraged.
This is the fourth batch of files.
Diffstat (limited to 'modules/postfix')
| -rw-r--r-- | modules/postfix/templates/group_aliases.conf | 8 | ||||
| -rw-r--r-- | modules/postfix/templates/ldap_aliases.conf | 8 | ||||
| -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/virtual_aliases | 26 |
6 files changed, 38 insertions, 38 deletions
diff --git a/modules/postfix/templates/group_aliases.conf b/modules/postfix/templates/group_aliases.conf index eac16dab..a4ad9e51 100644 --- a/modules/postfix/templates/group_aliases.conf +++ b/modules/postfix/templates/group_aliases.conf @@ -2,14 +2,14 @@ ldap = ldap_servers.map { |l| "ldaps://#{l}:636" } -%> server_host = <%= ldap.join(' ') %> -search_base = <%= dc_suffix %> +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 40d7da13..3bc50197 100644 --- a/modules/postfix/templates/ldap_aliases.conf +++ b/modules/postfix/templates/ldap_aliases.conf @@ -8,13 +8,13 @@ end ldap = ldap_servers.map { |l| "ldaps://#{l}:636" } -%> server_host = <%= ldap.join(' ') %> -search_base = <%= dc_suffix %> +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 6b42a4de..d3f6b50f 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,23 +40,23 @@ smtp_address_preference = ipv4 # FIXME Do not hardcode this mynetworks = 212.85.158.144/28 [2a02:2178:2:7::]/64 127.0.0.0/16 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 %> +mydestination = <%= @fqdn %> <%- if all_tags.include?('postfix::server::primary') -%> - ml.<%= domain %> + ml.<%= @domain %> <%- end -%> <%- 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 = @@ -113,7 +113,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 e0c116a7..331166c2 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 436e7a28..e2c4cdf4 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/virtual_aliases b/modules/postfix/templates/virtual_aliases index b2b1ce04..bca60907 100644 --- a/modules/postfix/templates/virtual_aliases +++ b/modules/postfix/templates/virtual_aliases @@ -1,37 +1,37 @@ # do not forget to add $domain or it will not work # do not hardcode the domain, or it will be harvested by bot -president@<%= domain %> jibz@<%= domain %> -secretary@<%= domain %> papoteur@<%= domain %> -tresorier@<%= domain %> maat@<%= domain %> +president@<%= @domain %> jibz@<%= @domain %> +secretary@<%= @domain %> papoteur@<%= @domain %> +tresorier@<%= @domain %> maat@<%= @domain %> -treasurer@<%= domain %> treasurer@group.<%= domain %> +treasurer@<%= @domain %> treasurer@group.<%= @domain %> -executive@<%= domain %> president@<%= domain %>, secretary@<%= domain %>, tresorier@<%= domain %> -admin@<%= domain %> maat@<%= domain %> +executive@<%= @domain %> president@<%= @domain %>, secretary@<%= @domain %>, tresorier@<%= @domain %> +admin@<%= @domain %> maat@<%= @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 : |
