I recommend to try MailNag.
An extensible mail notification daemon
Mailnag is a daemon program that checks POP3 and IMAP servers for new mail.
On mail arrival it performs various actions provided by plugins.
Mailnag comes with a set of desktop-independent default plugins for
visual/sound notifications, script execution etc. and can be extended
with additional plugins easily.
You can install it from official PPA with:
sudo add-apt-repository ppa:pulb/mailnag
sudo apt-get update
sudo apt-get install mailnag
If you need intergration with desktop then
for GNOME Shell install gnome-shell-mailnag
sudo apt-get install gnome-shell-mailnag
if you use GNOME Online Accounts in GNOME Shell then install mailnag-goa-plugin
sudo apt-get install mailnag-goa-plugin
for modern Unity, MATE, Xfce, Pantheon Elementary install mailnag-messagingmenu-plugin
sudo apt-get install mailnag-messagingmenu-plugin
for Cinnamon use instruction from mailnagapplet
.
Note: Some packages are currently not available for 18.04 LTS, but I have contacted the developer to fix this problem.