Re: Bug: 'noreplicate' database extra field ingnored

2018-10-22 Thread Phil

On 22 Oct 2018, at 8:08, Aki Tuomi wrote:


On 20.10.2018 7.29, Phil wrote:
The 'noreplicate' user database field described in the wiki appears 
to

make no difference as to whether an account gets replicated or not.
My sql user query returns a 'noreplicate' field and I can confirm 
that

this is getting set using 'doveadm user', however when I add a new
account with noreplicate=true it gets replicated regardless.

User query:
user_query = SELECT home, uid, gid, noreplicate FROM mail_accounts
WHERE address = '%u'

# doveadm user us...@mydomain.com
field    value
uid    1000
gid    1000
home    /mail/domains/mydomain.com/user1/Maildir
mail    maildir:/mail/domains/mydomain.com/user1/Maildir
noreplicate    t


Can you turn on 'mail_debug=yes' and provide logs for a noreplicate 
user

being replicated?

Aki



I added a new user 'reptest' with noreplicate='t' and have attached the 
logs from both ends of the replication pair.
You can see that the account was replicated and I have verified this by 
sending an email to the account and it immediately appears on both 
servers.

-Phil
Oct 22 20:02:36 mx dovecot: doveadm: Debug: auth PASS input: 
user=rept...@mydomain.com 
Oct 22 20:02:36 mx dovecot: doveadm: Debug: auth USER input: 
rept...@mydomain.com home=/mail/domains/mydomain.com/reptest/Maildir uid=1000 
gid=1000 noreplicate=t
Oct 22 20:02:36 mx dovecot: doveadm: Debug: Added userdb setting: 
plugin/noreplicate=t
Oct 22 20:02:36 mx dovecot: doveadm: Debug: Effective uid=1000, gid=1000, 
home=/mail/domains/mydomain.com/reptest/Maildir
Oct 22 20:02:36 mx dovecot: doveadm: Debug: Home dir not found: 
/mail/domains/mydomain.com/reptest/Maildir
Oct 22 20:02:36 mx dovecot: doveadm: Debug: Namespace inbox: type=private, 
prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=maildir:/mail/domains/mydomain.com/reptest/Maildir
Oct 22 20:02:36 mx dovecot: doveadm: Debug: maildir++: 
root=/mail/domains/mydomain.com/reptest/Maildir, index=, indexpvt=, control=, 
inbox=/mail/domains/mydomain.com/reptest/Maildir, alt=
Oct 22 20:02:37 mx dovecot: doveadm: Debug: Namespace : 
/mail/domains/mydomain.com/reptest/Maildir doesn't exist yet, using default 
permissions
Oct 22 20:02:37 mx dovecot: doveadm: Debug: Namespace : Using permissions from 
/mail/domains/mydomain.com/reptest/Maildir: mode=0700 gid=default
Oct 22 20:02:37 mx dovecot: doveadm: Debug: replication: Replication requested 
by 'mailbox create', priority=1
Oct 22 20:02:37 mx dovecot: doveadm(rept...@mydomain.com): Debug: auth PASS 
input: user=rept...@mydomain.com 
Oct 22 20:02:37 mx dovecot: doveadm(rept...@mydomain.com)<16633><>: Debug: auth 
USER input: rept...@mydomain.com 
home=/mail/domains/mydomain.com/reptest/Maildir uid=1000 gid=1000 noreplicate=t
Oct 22 20:02:37 mx dovecot: doveadm(rept...@mydomain.com)<16633><>: Debug: 
Added userdb setting: plugin/noreplicate=t
Oct 22 20:02:37 mx dovecot: doveadm: Debug: 
/mail/domains/mydomain.com/reptest/Maildir/dovecot.index.cache: Compressed, 
file_seq changed 0 -> 1540231357, size=32, max_uid=0
Oct 22 20:02:38 mx dovecot: doveadm(rept...@mydomain.com): Debug: 
remote(mail2.mydomain.com): auth PASS input: user=rept...@mydomain.com 
Oct 22 20:02:38 mx dovecot: doveadm(rept...@mydomain.com): Debug: 
remote(mail2.mydomain.com): auth USER input: rept...@mydomain.com 
home=/home/vmail/domains/mydomain.com/reptest/Maildir uid=1000 gid=1000 
noreplicate=t
Oct 22 20:02:38 mx dovecot: doveadm(rept...@mydomain.com): Debug: 
remote(mail2.mydomain.com): Added userdb setting: plugin/noreplicate=t
Oct 22 20:02:38 mx dovecot: doveadm(rept...@mydomain.com): Debug: 
remote(mail2.mydomain.com): Effective uid=1000, gid=1000, 
home=/home/vmail/domains/mydomain.com//Maildir
Oct 22 20:02:38 mx dovecot: doveadm(rept...@mydomain.com): Debug: 
remote(mail2.mydomain.com): Namespace : type=private, prefix=, sep=., 
inbox=yes, hidden=no, list=yes, subscriptions=yes 
location=maildir:/home/vmail/domains/mydomain.com/reptest/Maildir
Oct 22 20:02:38 mx dovecot: doveadm(rept...@mydomain.com): Debug: 
remote(mail2.mydomain.com): maildir++: 
root=/home/vmail/domains/mydomain.com/reptest/Maildir, index=, indexpvt=, 
control=, inbox=/home/vmail/domains/mydomain.com/reptest/Maildir, alt=
Oct 22 20:02:38 mx dovecot: doveadm(rept...@mydomain.com): Debug: Effective 
uid=1000, gid=1000, home=/mail/domains/mydomain.com/reptest/Maildir
Oct 22 20:02:38 mx dovecot: doveadm(rept...@mydomain.com): Debug: Namespace 
inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, 
subscriptions=yes location=maildir:/mail/domains/mydomain.com/reptest/Maildir
Oct 22 20:02:38 mx dovecot: doveadm(rept...@mydomain.com): Debug: maildir++: 
root=/mail/domains/mydomain.com/reptest/Maildir, index=, indexpvt=, control=, 
inbox=/mail/domains/mydomain.com/reptest/Maildir, alt=
Oct 22 20:02:38 mx dovecot: doveadm(rept...@mydomain.com): Debug: Namespace : 
Using permissions from /mail/domains/mydomain.com/reptest/Maildir: mode=0700 
gid=default
Oct 22 

Re: Bug: 'noreplicate' database extra field ingnored

2018-10-21 Thread Aki Tuomi


On 20.10.2018 7.29, Phil wrote:
> The 'noreplicate' user database field described in the wiki appears to
> make no difference as to whether an account gets replicated or not.
> My sql user query returns a 'noreplicate' field and I can confirm that
> this is getting set using 'doveadm user', however when I add a new
> account with noreplicate=true it gets replicated regardless.
>
> User query:
> user_query = SELECT home, uid, gid, noreplicate FROM mail_accounts
> WHERE address = '%u'
>
> # doveadm user us...@mydomain.com
> field    value
> uid    1000
> gid    1000
> home    /mail/domains/mydomain.com/user1/Maildir
> mail    maildir:/mail/domains/mydomain.com/user1/Maildir
> noreplicate    t
>
>
Can you turn on 'mail_debug=yes' and provide logs for a noreplicate user
being replicated?

Aki



Bug: 'noreplicate' database extra field ingnored

2018-10-19 Thread Phil
The 'noreplicate' user database field described in the wiki appears to 
make no difference as to whether an account gets replicated or not.
My sql user query returns a 'noreplicate' field and I can confirm that 
this is getting set using 'doveadm user', however when I add a new 
account with noreplicate=true it gets replicated regardless.


User query:
user_query = SELECT home, uid, gid, noreplicate FROM mail_accounts WHERE 
address = '%u'


# doveadm user us...@mydomain.com
field   value
uid 1000
gid 1000
home/mail/domains/mydomain.com/user1/Maildir
mailmaildir:/mail/domains/mydomain.com/user1/Maildir
noreplicate t


# 2.3.3 (dcead646b): /usr/local/etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.3 (f018bbab)
# OS: FreeBSD 11.2-RELEASE-p4 amd64
# Hostname: mx
doveadm_password = # hidden, use -P to show it
doveadm_port = 2727
imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
listen = *
mail_location = maildir:%h
managesieve_notify_capability = mailto
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

namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix =
}
passdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
plugin {
  mail_replica = tcps:mail2..com
}
protocols = imap lmtp submission
replication_full_sync_interval = 6 hours
service aggregator {
  fifo_listener replication-notify-fifo {
user = vmail
  }
  unix_listener replication-notify {
user = vmail
  }
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = postfix
mode = 0660
user = postfix
  }
  unix_listener auth-userdb {
user = vmail
  }
  user = root
}
service doveadm {
  inet_listener {
port = 2727
ssl = yes
  }
}
service imap-login {
  inet_listener imaps {
address = xxx.xxx.xxx.xxx
port = 993
  }
  process_limit = 256
  process_min_avail = 6
  service_count = 1
  vsz_limit = 64 M
}
service replicator {
  process_min_avail = 1
  unix_listener replicator-doveadm {
mode = 0600
user = vmail
  }
}
ssl = required
ssl_cert = .com.pem
ssl_client_ca_dir = /etc/ssl/
ssl_client_ca_file = /etc/ssl/cert.pem
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
userdb {
  args = /usr/local/etc/dovecot/dovecot-sql.conf.ext
  driver = sql
}
verbose_proctitle = yes
protocol imap {
  mail_max_userip_connections = 100
}
protocol lda {
  postmaster_address = postmaster@.com
  sendmail_path = /usr/sbin/sendmail
}