Get User Count from Dovecot



  • Odd one, but if you need to know how many user mailboxes exist on a standard DoveCot server (tested on CentOS 7), try this...

    for i in $(ls /var/vmail); do ls $i | wc -l; done | paste -sd+ - | bc