Skip to content

Commit

Permalink
Added: Support for per-Milter and per-policy server timeout (Servers:…
Browse files Browse the repository at this point in the history
…:mta::postfix::postconf() - Postfix >= 3.0.0)
  • Loading branch information
nuxwin committed May 26, 2019
1 parent 05c4f1c commit e70f6b3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Git 1.5.x
------------------------------------------------------------------------------------------------------------------------

BACKEND
Added: Support for per-Milter and per-policy server timeout (Servers::mta::postfix::postconf() - Postfix >= 3.0.0)
Added: iMSCP::Database::mariadb adapter (for use with new DBD::MariaDB driver for DBI, in place of DBD::mysql when available)
Added: Array::Utils library (PerlVendor)
Enhancement: Make it possible to override any default DNS resource record (Bind9 server implementation)
Expand Down
17 changes: 16 additions & 1 deletion engine/PerlLib/Servers/mta/postfix.pm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ use iMSCP::File;
use iMSCP::Getopt;
use iMSCP::Rights 'setRights';
use iMSCP::Service;
use Text::Balanced qw/ extract_multiple extract_bracketed /;
use Tie::File;
use parent 'Common::SingletonClass';

Expand Down Expand Up @@ -1066,7 +1067,21 @@ sub postconf
sub {
return unless ( my $p, my $v ) = $_[0] =~ /^([^=]+)\s+=\s*(.*)/;

my ( @vls, @rpls ) = ( split( /,\s*/, $v ), () );
my @vls = extract_multiple(
$v,
[
# Support for per-Milter and per-policy server timeout
# and other settings (Postfix >= 3)
# See http://www.postfix.org/announcements/postfix-3.0.0.html
# See http://www.postfix.org/MILTER_README.html
sub { extract_bracketed( $_[0], '{}' ) },
# Comma or whitespace separated parameter values
qr/([^,\s*]+)/
],
undef,
TRUE
);
my @rpls;

defined $params{$p}->{'values'}
&& ref $params{$p}->{'values'} eq 'ARRAY' or die( sprintf(
Expand Down

0 comments on commit e70f6b3

Please sign in to comment.