Fetcher is triggered many times in quick succession if multiple mails arrive at the same time
Ideally we would have the option to merge or ignore requests so that the fetcher is only triggered once instead of once for every new mail.
I'm thinking of something along the lines of this:
- goimapnotify detects that a new mail is in the monitoring mailbox
- a timer is started for 10 seconds (would be nice to have it configurable)
- if a new message is detected, the timer is reset
- when the 10 seconds timer expires, trigger the onNotify handler
This way, if a bunch of emails come in at the same time, the onNotify handler is only triggered once.