replication notification with chroot users

Tim Kuijsten info at netsend.nl
Thu Jun 25 20:40:38 UTC 2015


I'm getting the following error when using dovecot replication:
dovecot: imap(foo at bar.com): Error: 
open(/var/dovecot/replication-notify-fifo) failed: No such file or directory

I guess this has something to do with the fact that every user is 
chrooted in it's own homedir. Does dsync support dsync notification when 
all users are chrooted? lmtp does not seem to have this problem so new 
mails get replicated, but status changes don't.

Thanks.

-Tim


Config on source:

# 2.2.15: /etc/dovecot/dovecot.conf
# OS: OpenBSD 5.7 amd64
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
dsync_remote_cmd = /usr/bin/ssh imap.netsend.nl
first_valid_gid = 30000
first_valid_uid = 30000
last_valid_gid = 30100
last_valid_uid = 30100
mail_debug = yes
mail_home = /srv/vmail/%d/%n
mail_location = maildir:~/Maildir
mail_plugins = " notify replication"
passdb {
   args = /passwd
   driver = passwd-file
}
passdb {
   args = /passwd_smtponly
   driver = passwd-file
}
plugin {
   mail_replica = remoteprefix:imap.netsend.nl
}
protocols = imap lmtp
service aggregator {
   fifo_listener replication-notify-fifo {
     mode = 0666
   }
   unix_listener replication-notify {
     mode = 0666
   }
}
service auth-worker {
   chroot = /etc/mail
   unix_listener /etc/mail/auth-worker {
     mode = 0600
     user = $default_internal_user
   }
   user = $default_internal_user
}
service auth {
   chroot = /etc/mail
   unix_listener /var/spool/postfix/private/dovecot-auth {
     group = _postfix
     mode = 0600
     user = _postfix
   }
}
service imap-login {
   inet_listener imap {
     port = 0
   }
   process_min_avail = 1
}
service lmtp {
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
     group = _postfix
     mode = 0600
     user = _postfix
   }
}
service replicator {
   process_min_avail = 1
   unix_listener replicator-doveadm {
     mode = 0600
   }
}
ssl = required
ssl_cert = </etc/ssl/private/2015/chain.crt
ssl_cipher_list = 
ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA256:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA;
ssl_dh_parameters_length = 2048
ssl_key = </etc/ssl/private/the.key
ssl_prefer_server_ciphers = yes
ssl_protocols = !SSLv2 !SSLv3
userdb {
   args = /passwd
   default_fields = uid=30000 gid=30000 home=/srv/vmail/%d/%n/./
   driver = passwd-file
}
valid_chroot_dirs = /srv/vmail
verbose_ssl = yes
protocol imap {
   mail_max_userip_connections = 20
}


config on destination imap.netsend.nl:

# 2.2.15: /etc/dovecot/dovecot.conf
# OS: OpenBSD 5.7 amd64
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
first_valid_gid = 30000
first_valid_uid = 30000
last_valid_gid = 30100
last_valid_uid = 30100
mail_debug = yes
mail_home = /srv/vmail/%d/%n
mail_location = sdbox:~/dbox
passdb {
   args = /passwd
   driver = passwd-file
}
passdb {
   args = /passwd_smtponly
   driver = passwd-file
}
protocols = imap lmtp
service auth-worker {
   chroot = /etc/mail
   unix_listener /etc/mail/auth-worker {
     mode = 0600
     user = $default_internal_user
   }
   user = $default_internal_user
}
service auth {
   chroot = /etc/mail
   unix_listener /var/spool/postfix/private/dovecot-auth {
     group = _postfix
     mode = 0600
     user = _postfix
   }
}
service imap-login {
   inet_listener imap {
     port = 0
   }
   process_min_avail = 1
}
service lmtp {
   unix_listener /var/spool/postfix/private/dovecot-lmtp {
     group = _postfix
     mode = 0600
     user = _postfix
   }
}
ssl = required
ssl_cert = </etc/ssl/private/2015/chain.crt
ssl_cipher_list = 
ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA256:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA;
ssl_dh_parameters_length = 2048
ssl_key = </etc/ssl/private/the.key
ssl_prefer_server_ciphers = yes
ssl_protocols = !SSLv2 !SSLv3
userdb {
   args = /passwd
   default_fields = uid=30000 gid=30000 home=/srv/vmail/%d/%n/./
   driver = passwd-file
}
valid_chroot_dirs = /srv/vmail
verbose_ssl = yes
protocol imap {
   mail_max_userip_connections = 20
}


More information about the dovecot mailing list