From d32f3e9d16478ff341f7101ed864efc604b85fac Mon Sep 17 00:00:00 2001 From: hunter-nl Date: Sun, 5 May 2019 13:07:17 +0200 Subject: [PATCH] Fix processing imapsync custom parameters --- data/Dockerfiles/dovecot/imapsync_cron.pl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/data/Dockerfiles/dovecot/imapsync_cron.pl b/data/Dockerfiles/dovecot/imapsync_cron.pl index c63769f0..a6ec37cc 100644 --- a/data/Dockerfiles/dovecot/imapsync_cron.pl +++ b/data/Dockerfiles/dovecot/imapsync_cron.pl @@ -19,11 +19,20 @@ if ($imapsync_running eq 1) } sub qqw($) { - my @values = split('(?=--)', $_[0]); + my @params = (); + my @values = split(/(?=--)/, $_[0]); foreach my $val (@values) { + my @tmpparam = split(/ /, $val, 2); + foreach my $tmpval (@tmpparam) { + if ($tmpval ne '') { + push @params, $tmpval; + } + } + } + foreach my $val (@params) { $val=trim($val); } - return @values + return @params; } $run_dir="/tmp";