1

Topic: API Feature Request: Return unread message count for user

It would be really nice to have a simple API call to return the number of unread messages for a specific user, without requiring me to know the login credentials for a user's email box. 

EX: GET /api/user/<mail>/unreadMessageCount

returns an int

-- Steven

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: API Feature Request: Return unread message count for user

You can access user's mailbox with Dovecot Master User (and IMAP service):
https://docs.iredmail.org/dovecot.master.user.html

We have no plan to implement request feature in iRedAdmin-Pro shortly, sorry.

3

Re: API Feature Request: Return unread message count for user

I did find a "simple" way the API could access this: https://serverfault.com/questions/34473 … in-maildir

/var/vmail/vmail1/[domain].com/s/t/e/stevenc-2019.12.30.14.17.45/Maildir/cur

I verified by going to that directory in SSH and it is true, read messages have 2,S whereas unread have no S.

4

Re: API Feature Request: Return unread message count for user

Nice trick. Thanks for sharing. smile

But it won't work for other mailbox formats, like mdbox, sdbox.