On 5.3.2012, at 10.35, Jan-Frode Myklebust wrote:
>> 1) Replicator syncs all users at startup. If you can change your userdb
>> iteration to return only one test user for replicator that avoids it. (You
>> may be able to do protocol replicator { userdb {..} } and protocol
>> !replicator { .. })
>
> IMHO it would be great if it didn't sync all users. We probably av have
> hundreds of thousands of inactive users that we would like to sync at a
> later point. Also when we provision users that's just an entry in a
> LDAP-directory without any files or directories. So dovecot shouldn't
> create any directories for these before they've received mail or logged in.
>
> So, ideally (for us), dovecot should keep a log over which accounts are
> active (has received or checked mail), and only sync users that has been
> active for the last $timeperiode on startup.
Well, all of this could be done already, although not very automatically..
Whenever a new mail is delivered or user is logged in, the user's last-login
timestamp in SQL could be updated. And replicator's userdb iterate_query could
return only users whose last-login timestamp is new enough. The SQL userdb
could be used only by replicator, everything else could keep using LDAP.