From a4ce1f62c9b5a0640c7a7d5e0ae1b840239f5f3f Mon Sep 17 00:00:00 2001 From: Rikard Danielsson Date: Wed, 18 Dec 2024 09:19:10 +0100 Subject: [PATCH] adding ability to use message_size_limit in main.cf --- manifests/mail/postfix.pp | 1 + templates/mail/postfix/main.erb.cf | 3 +++ 2 files changed, 4 insertions(+) diff --git a/manifests/mail/postfix.pp b/manifests/mail/postfix.pp index 81ac94f52..6f17897e1 100644 --- a/manifests/mail/postfix.pp +++ b/manifests/mail/postfix.pp @@ -4,6 +4,7 @@ String $alias_domains, String $environment, String $imap_domain, + Optional[Integer] $message_size_limit, Array[String] $relaying_servers, String $short_domain, String $smtp_domain, diff --git a/templates/mail/postfix/main.erb.cf b/templates/mail/postfix/main.erb.cf index 63b666ec9..e847e36b2 100644 --- a/templates/mail/postfix/main.erb.cf +++ b/templates/mail/postfix/main.erb.cf @@ -56,3 +56,6 @@ smtpd_sasl_path = inet:<%= @imap_domain %>:12346 smtpd_sasl_auth_enable = yes virtual_transport = lmtp:<%= @imap_domain %>:24 +<% if @message_size_limit -%> +message_size_limit = <%= @message_size_limit %> +<% end -%>