Since Mail.app had trouble connecting to the various accounts, I tried to 'reset' it by removing all accounts and the stored passwords in Keychain Access.app. Then I re-added all the mail accounts. ...
It works only when you right click on the mail message and choose "run rules", but not on incoming messages (without interaction). The first dialog is shown both when incoming or running manually, ...