1

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??

  • Do you get any error messages in your procmail log? – larsks Mar 24 '15 at 23:49
  • @larsks: I got it working by setting Xauthority path. However, I still don't know if my rule is OK or not. – ConfusedRecipe Mar 25 '15 at 03:33
  • You need to make your notification rule the first procmail rule 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 a c flag (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

0 Answers0