accessing the value in the config-template needs to use the
item virtual method (`pmg.mail.item('filter-timeout')` instead of the
. operator, due to using kebab-case for 'filter-timeout' see [0].
the minimal value is set to 2 as we add 1 second for the rules
processing in the next patch, and postfix has 1 as minimum.
[0] http://template-toolkit.org/docs/manual/VMethods.html#section_item
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
type => 'boolean',
default => 1
},
+ 'filter-timeout' => {
+ description => "Timeout for the processing of one mail (in seconds) (postfix option"
+ ." `smtpd_proxy_timeout` and `lmtp_data_done_timeout`)",
+ type => 'integer',
+ default => 600,
+ minimum => 2,
+ maximum => 86400
+ },
};
}
before_queue_filtering => { optional => 1 },
ndr_on_block => { optional => 1 },
smtputf8 => { optional => 1 },
+ 'filter-timeout' => { optional => 1 },
};
}
[% END %]
[% IF pmg.mail.before_queue_filtering -%]
-smtpd_proxy_timeout = 600s
+smtpd_proxy_timeout = [% pmg.mail.item('filter-timeout') %]s
[% ELSE %]
content_filter=scan:127.0.0.1:10024
+lmtp_data_done_timeout = [% pmg.mail.item('filter-timeout') %]s
[%- END %]
mail_name = Proxmox