Oh thanks, that works. Although I'd still like to know why the Perl scripts (and the short C program) I wrote didn't work. Are the .db files Sendmail create so special that another program can't read them?
But, thank you very much for the command, I didn't know the -u option of makemap. At least I can see the content of its db and check what is inside.