I've got a setup with Dovecot using a PostgreSQL backend together with vmm. I usually get messages like this into log:
dovecot: dict: pgsql(10.0.0.2): Connected to database mail
Based on investigation I think it's because Dovecot is losing/closing connection to the PostgreSQL server. Is there any way to tell Dovecot to keep connection alive?