Sync received email with Dovecot problem on Debian 9

Discussion in 'Server Operation' started by gscaglia, Nov 2, 2017.

  1. gscaglia

    gscaglia Member HowtoForge Supporter

    Hi there,
    I've installed two servers in cluster following the Florian's how-to "Installing a Web, Email & MySQL Database Cluster on Debian 8.4 Jessie with ISPConfig 3.1" in Debian 9.

    They work fine for the sync emails with Dovecot, when I write a new email (e.g. in Roundcube) and when I read or delete a received email: the same operation happens on both servers immediatly.

    But when the master mail-server has received a new email, this one not appears on the slave mail-server until something happens in the master mail-server (e.g. the user read that email).

    Does anyone have an idea to fix it?

    Tanks a lot

    P.S. System configuration:
    Debian 9 Stretch, with Apache, Bind, Dovecot, Postfix and ISPConfig 3.1.7.p1 on each server
    Cluster sync by Dovecot for emails and Unison for web sites
     
    Last edited: Nov 2, 2017
  2. florian030

    florian030 Well-Known Member HowtoForge Supporter

    check the dovecot.conf:
    Code:
    mail_plugins = notify replication quota
    ...
    protocol imap {
      mail_plugins = $mail_plugins imap_quota
    }
    protocol lda {
      mail_plugins = $mail_plugins sieve
      [email protected]
    }
    ...
    
     
  3. gscaglia

    gscaglia Member HowtoForge Supporter

    Hi Florian,
    in your how-to the dovecot.conf is so:
    Code:
    ...
    mail_plugins = $mail_plugins notify replication quota
    ...
    protocol imap {
            mail_plugins = quota imap_quota notify replication
    }
    ...
    
    and for protocol lda the default dovecot.conf setting is so:
    Code:
    protocol lda {
      mail_plugins = sieve quota
      [email protected]
    }
    
    If I change these as you've written, on both servers (and I restart Dovecot), the received emails are queued but not put in their email-boxes.

    There's something wrong, have you got any ideas?

    Thanks a lot
     
    Last edited: Nov 3, 2017
  4. florian030

    florian030 Well-Known Member HowtoForge Supporter

    check the mail.log, use mailqueue and/or doveadm replicator status
     
  5. gscaglia

    gscaglia Member HowtoForge Supporter

    I see that in the dovecot.conf there are two different line plugin {...} and two different line protocol imap {..}.
    In the howto it was written "Open /etc/dovecot/dovecot.conf ... and add the following content".
    So, is it normal to have two different lines with the same instruction or must I preserve the one in the how-to and delete the default one?

    E.g. now I have both these plugin {...} so
    Code:
    at line 24:
    plugin {
      quota = dict:user::file:/var/vmail/%d/%n/.quotausage
      sieve=/var/vmail/%d/%n/.sieve
      sieve_max_redirects = 25
    }
    at line 112:
    plugin {
            replication_full_sync_interval = 1 hours
            mail_replica = tcp:xxx.xxx.xxx.xxx:4711
    }
    
    I must delete the plugin {...} instruction at line 24 or I preseve both (and the same for the protocol imap {..})?
     
    Last edited: Nov 8, 2017

Share This Page