diff --git a/data/Dockerfiles/dovecot/imapsync_runner.pl b/data/Dockerfiles/dovecot/imapsync_runner.pl index 9eaf5f4314..8bfc298b04 100644 --- a/data/Dockerfiles/dovecot/imapsync_runner.pl +++ b/data/Dockerfiles/dovecot/imapsync_runner.pl @@ -150,6 +150,7 @@ sub sig_handler { "--passfile1", $passfile1->filename, "--port1", $port1, "--host2", "localhost", + (!exists($ENV{IMAP_PORT})? () : ('--port2', $ENV{IMAP_PORT})), "--user2", $user2 . '*' . trim($master_user), "--passfile2", $passfile2->filename, ($dry eq "1" ? ('--dry') : ()),