1

Topic: Programmatically detect which users have new emails

==== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): postrges
- Linux/BSD distribution name and version: ubuntu 14.04
- Related log if you're reporting an issue:
====

Hello there!

I want to notify users who have new emails by sms.

This means I'll have a cron job that basically must get a list of all mailboxes which have been modified since the last time it ran.

Now I guess I can directly crawl the 'vmail1' directory, but I was wondering if there is a more elegant/simple way to do this. There doesn't seem to be any record of mail events in the database (which is postrgesql in my case).

Hope I'm not overlooking something obvious!

Thanks in advance,

ram (newb)

----

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

2

Re: Programmatically detect which users have new emails

If you use Dovecot LDA to deliver local emails, track /var/log/dovecot-sieve.log should be enough. (or /var/log/dovecot-lmtp.log if you use LMTP to deliver local emails)