I am trying to get procmail to work with libnotify (notify-send). My .procmailrc has a couple of recipes, which just essentially filter mails into different folders.. nothing fancy.
Most of my recipes are like:
:0:
* ^TO_*(address)
FOLDER/
I add the following to my .procmailrc, after all the rules. I copied this recipe from Google. What I want is that on every new mail (before or after processing my other recipes), notify-send command below is run.
:0 ic:
| DISPLAY=:0.0 notify-send "New mail!"
But This doesn't work. What am I doing wrong??
procmailrule in your setup. As it stands, your email is consumed by whatever rule matches it first, so it never gets to the notification rule; having the notification rule first, with acflag (carbon copy), ensures your email will cause a notification and will still be processed by the following rules. – Stephen Kitt Mar 25 '15 at 08:51