In claws-mail you can specify an external script to run on receipt of mail, either manually triggered or on an automatic run. I have a script which I can run successfully manually. It does not appear to run when I trigger receiving mail in claws-mail.
It has worked in the past. I'm not sure when it ceased to work, possibly when I replaced bookwork with trixie. Does anyone else see this? -- Does anybody read signatures any more? https://charlescurley.com https://charlescurley.com/blog/

