I get the same behaviour for Kubuntu 10.10 (pinentry-qt4 0.8.0-1). You can see pinentry flickering very quickly a few times before it gives up and you get the error message. The same thing happens with thunderbird instead of kmail. I tried out pinentry a few times by hand (running it from the command line and putting in commands to it directly) but wasn't able to reproduce the problem in that fashion. Using pinentry-qt instead solves the problem for me too.
I get the same behaviour for Kubuntu 10.10 (pinentry-qt4 0.8.0-1). You can see pinentry flickering very quickly a few times before it gives up and you get the error message. The same thing happens with thunderbird instead of kmail. I tried out pinentry a few times by hand (running it from the command line and putting in commands to it directly) but wasn't able to reproduce the problem in that fashion. Using pinentry-qt instead solves the problem for me too.