No mail being recevied with lots of profiles mapped to Gmail using IMAP

Check your incoming mail log, you will probably find authentication failures due to a gmail limitation on your concurrent connections.

https://support.google.com/mail/answer/97150?hl=en

Options

  1. Don't use IMAP and related 'folders' in this way owing to scalability issues if in use by many cilents /services, use dedicated mailboxes.

  2. Use a virtual mailbox, arrange for all 'real' email to be forwarded to a common mailbox, use JEMH Project Mappings to route those messages appropriately