NobGit
public nobgit read

NobMail

Based on mailcow: dockerized

Languages

Repository composition by tracked source files.

PHP
PHP 49% JavaScript 35% HTML 9% CSS 4% Shell 2% Python 1% Lua 0% Perl 0% Ruby 0% SCSS 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/nobgit/nobmail.git
ssh://[email protected]:2222/orgs/nobgit/nobmail.git

Commit

[Dovecot] Fix imapsync_cron

632d1cab
andryyy <[email protected]> 6 years ago
data/Dockerfiles/dovecot/imapsync_cron.pl | 4 +++-
 docker-compose.yml                        | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

Diff

diff --git a/data/Dockerfiles/dovecot/imapsync_cron.pl b/data/Dockerfiles/dovecot/imapsync_cron.pl
index 77f04c4e..746b1d47 100644
--- a/data/Dockerfiles/dovecot/imapsync_cron.pl
+++ b/data/Dockerfiles/dovecot/imapsync_cron.pl
@@ -12,7 +12,7 @@ use sigtrap 'handler' => \&sig_handler, qw(INT TERM KILL QUIT);
 sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s };
 my $t = Proc::ProcessTable->new;
 my $imapsync_running = grep { $_->{cmndline} =~ /imapsync\s/i } @{$t->table};
-if ($imapsync_running gt 1)
+if ($imapsync_running ge 1)
 {
   print "imapsync is active, exiting...";
   exit;
@@ -44,6 +44,8 @@ $dbh = DBI->connect($dsn, '__DBUSER__', '__DBPASS__', {
   mysql_auto_reconnect => 1,
   mysql_enable_utf8mb4 => 1
 });
+$dbh->do("UPDATE imapsync SET is_running = 0");
+
 sub sig_handler {
   # Send die to force exception in "run"
   die "sig_handler received signal, preparing to exit...\n";
diff --git a/docker-compose.yml b/docker-compose.yml
index 4c1ca5c3..bf941ed0 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -188,7 +188,7 @@ services:
             - sogo
 
     dovecot-mailcow:
-      image: mailcow/dovecot:1.114
+      image: mailcow/dovecot:1.115
       depends_on:
         - mysql-mailcow
       dns: