<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><font size="2" face="Helvetica, Arial, sans-serif">Hallo liebe
        Mitglieder der Liste,</font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif">Ich habe eine
        Replikation zu einem Server aufgebaut. Der neue Server hat ein
        komplett leeres User Storage, welches per NFS angebunden ist.<br>
        Die Replikation scheint augenscheinlich zu funktionieren, auf
        dem neuen Server erscheinen die entsprechenden Dateien im
        maildir Format.</font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif"># doveadm
        replicator status '*' && doveadm replicator dsync-status<br>
        username                               priority fast sync full
        sync success sync failed<br>
        <a class="moz-txt-link-abbreviated" href="mailto:1@tld.de">1@tld.de</a>                                low      01:28:50 
        21:55:19  02:31:39     y<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:2@tld.de">2@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                                    
        low      01:21:42  21:55:28  -            y<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:3@tld.de">3@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                           
        none     00:40:22  00:45:22  00:33:51     -<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:4@tld.de">4@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                          
        none     00:12:24  00:48:34  00:30:40     -<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:5@tld.de">5@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                                 
        none     00:11:19  00:48:31  00:15:24     -<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:6@tld.de">6@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                                 
        none     00:03:31  04:28:43  -            y<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:7@tld.de">7@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                                  
        none     00:53:50  00:53:50  01:03:57     -<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:8@tld.de">8@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                               
        low      01:28:50  21:56:15  -            y<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:9@tld.de">9@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                                  
        none     04:15:28  04:15:28  21:51:47     -<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:10@tld.de">10@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                                 
        none     00:17:31  00:22:13  00:41:16     -<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:11@tld.de">11@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                           
        none     00:02:47  02:45:13  00:45:22     -<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:12@tld.de">12@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                                  
        none     00:03:31  21:55:19  02:50:30     y<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:13@tld.de">13@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                                  
        none     00:03:31  21:55:19  17:04:51     y<br>
        username                                                type  
        status<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:1@tld.de">1@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                                   
        normal Waiting for dsync to finish<br>
                                                                -     
        Not connected<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:3@tld.de">3@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                                   
        normal Waiting for dsync to finish<br>
                                                                -     
        Not connected<br>
                                                                -     
        Not connected<br>
      </font><font size="2" face="Helvetica, Arial, sans-serif"><a class="moz-txt-link-abbreviated" href="mailto:7@tld.de">7@tld.de</a></font><font
        size="2" face="Helvetica, Arial, sans-serif">                                        
        normal Waiting for dsync to finish<br>
                                                                -     
        Not connected<br>
                                                                -     
        Not connected<br>
                                                                -     
        Not connected</font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif"><br>
      </font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif">Der neue
        Server hat aktuell eine Load von ca. 7<br>
        Bei genauerer Suche nach dem Grund, fällt mir das auf:</font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif"># ps aux |
        grep " D "<br>
        vpostfix  275393  0.0  0.1  52036  9376 ?        D    10:44  
        0:05 dovecot/doveadm-server<br>
        vpostfix  275395  0.0  0.1  51276  8668 ?        D    10:44  
        0:03 dovecot/doveadm-server<br>
        vpostfix  275547  0.0  0.1  51924  9032 ?        D    10:45  
        0:04 dovecot/doveadm-server<br>
        vpostfix  276809  0.0  0.1  58768 15512 ?        D    10:52  
        0:05 dovecot/doveadm-server<br>
      </font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif">Der Grund für
        den Status D scheint von dem Aufruf zu kommen:<br>
        doveadm: Error: Failed to access mailbox dovecot-box-sync.lock:
stat(/srv/mail/mail_storage2/tld.de/1/mail/.dovecot-box-sync.lock/tmp)
        failed: Not a directory</font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif">Stellt man das
        von der Konsole aus nach:<br>
        # stat
/srv/mail/mail_storage2/celebrate.de/fk/mail/.dovecot-box-sync.lock/tmp                                
        stat: cannot statx
        '/srv/mail/mail_storage2/tld.de/1/mail/.dovecot-box-sync.lock/tmp':
        Permission denied</font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif">Auf dem
        NFS-NAS sieht man:<br>
        # ls -la /mnt/raid5array1/mail_storage2/tld.de/fk/mail/.dovecot*<br>
        -rw-------  1 vpostfix  vpostfix  0 Oct 17 11:06
/mnt/raid5array1/mail_storage2/celebrate.de/1/mail/.dovecot-box-sync.lock</font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif">^- man sieht,
        dass .dovecot-box-sync.lock eine Datei und kein Verzeichnis ist,
        darum kann auch /tmp darin nicht existieren</font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif">Was läuft hier
        schief? Nachfolgend die Konfiguration des Servers:<br>
        # dovecot -n<br>
        # 2.3.16 (7e2e900c1a): /etc/dovecot/dovecot.conf<br>
        # Pigeonhole version 0.5.16 (09c29328)<br>
        # OS: Linux 5.15.149-1-pve x86_64 AlmaLinux release 8.10
        (Cerulean Leopard)<br>
        # Hostname: tld.de<br>
        disable_plaintext_auth = no<br>
        doveadm_password = # hidden, use -P to show it<br>
        first_valid_uid = 1000<br>
        imap_id_send =<br>
        lda_mailbox_autocreate = yes<br>
        lda_mailbox_autosubscribe = yes<br>
        lmtp_save_to_detail_mailbox = yes<br>
        log_path = /var/log/dovecot.log<br>
        login_greeting =  ready.<br>
        mail_debug = yes<br>
        mail_fsync = always<br>
        mail_full_filesystem_access = yes<br>
        mail_gid = 1000<br>
        mail_home = /srv/mail/mail_storage2/%d/%n<br>
        mail_location = maildir:~/mail<br>
        mail_plugins = " notify replication"<br>
        mail_privileged_group = vpostfix<br>
        mail_uid = 1000<br>
        managesieve_notify_capability = mailto<br>
        managesieve_sieve_capability = fileinto reject envelope
        encoded-character vacation subaddress comparator-i;ascii-numeric
        relational regex imap4flags copy include variables body enotify
        environment mailbox date index ihave duplicate mime foreverypart
        extracttext vacation-seconds<br>
        mbox_write_locks = fcntl<br>
        mmap_disable = yes<br>
        namespace inbox {<br>
          inbox = yes<br>
          location =<br>
          mailbox Drafts {<br>
            special_use = \Drafts<br>
          }<br>
          mailbox Sent {<br>
            special_use = \Sent<br>
          }<br>
          mailbox "Sent Messages" {<br>
            special_use = \Sent<br>
          }<br>
          mailbox Spam {<br>
            auto = subscribe<br>
            special_use = \Junk<br>
          }<br>
          mailbox Trash {<br>
            special_use = \Trash<br>
          }<br>
          prefix =<br>
        }<br>
        passdb {<br>
          args = scheme=CRYPT username_format=%u /etc/dovecot/users<br>
          driver = passwd-file<br>
        }<br>
        plugin {<br>
          mail_replica = tcp:192.168.130.191:4711<br>
          recipient_delimiter = +<br>
          replication_full_sync_interval = 1 day<br>
          replication_sync_timeout = 10<br>
          sieve = <a class="moz-txt-link-freetext" href="file:~/sieve;active=~/.dovecot.sieve">file:~/sieve;active=~/.dovecot.sieve</a><br>
          sieve_before = /etc/dovecot/spam-global.sieve<br>
          sieve_extensions = +vacation-seconds<br>
          sieve_vacation_default_period = 1d<br>
          sieve_vacation_max_period = 30d<br>
          sieve_vacation_min_period = 0<br>
          sieve_vacation_use_original_recipient = yes<br>
        }<br>
        postmaster_address = <a class="moz-txt-link-abbreviated" href="mailto:xxx@tld.de">xxx@tld.de</a><br>
        protocols = imap pop3 lmtp sieve<br>
        service aggregator {<br>
          fifo_listener replication-notify-fifo {<br>
            mode = 0666<br>
            user = vpostfix<br>
          }<br>
          unix_listener replication-notify {<br>
            mode = 0666<br>
            user = vpostfix<br>
          }<br>
        }<br>
        service auth {<br>
          inet_listener {<br>
            address = 192.168.130.192<br>
            port = 3659<br>
          }<br>
          unix_listener /var/spool/postfix/private/auth {<br>
            group = vpostfix<br>
            mode = 0666<br>
            user = vpostfix<br>
          }<br>
          unix_listener auth-userdb {<br>
            group = vpostfix<br>
            mode = 0600<br>
            user = vpostfix<br>
          }<br>
        }<br>
        service config {<br>
          unix_listener config {<br>
            user = vpostfix<br>
          }<br>
        }<br>
        service doveadm {<br>
          inet_listener {<br>
            port = 4711<br>
          }<br>
          user = vpostfix<br>
        }<br>
        service imap-login {<br>
          process_min_avail = 1<br>
          service_count = 1<br>
        }<br>
        service lmtp {<br>
          inet_listener lmtp {<br>
            address = 192.168.130.192<br>
            port = 24<br>
          }<br>
        }<br>
        service managesieve-login {<br>
          inet_listener sieve {<br>
            port = 4190<br>
          }<br>
        }<br>
        service replicator {<br>
          process_min_avail = 1<br>
          unix_listener replicator-doveadm {<br>
            mode = 0666<br>
            user = vpostfix<br>
          }<br>
        }<br>
        ssl_cert = </etc/dehydrated/certs/tld.de/fullchain.pem<br>
        ssl_cipher_list = PROFILE=SYSTEM<br>
        ssl_dh = # hidden, use -P to show it<br>
        ssl_key = # hidden, use -P to show it<br>
        userdb {<br>
          args = username_format=%u /etc/dovecot/users<br>
          driver = passwd-file<br>
        }<br>
        protocol lmtp {<br>
          mail_plugins = " notify replication sieve"<br>
        }<br>
        protocol lda {<br>
          mail_plugins = " notify replication sieve"<br>
        }<br>
        protocol imap {<br>
          mail_max_userip_connections = 10<br>
          mail_plugins = " notify replication quota imap_quota"<br>
        }<br>
        <br>
      </font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif"><br>
      </font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif"><br>
      </font></p>
    <p><font size="2" face="Helvetica, Arial, sans-serif"><br>
      </font></p>
  </body>
</html>