I think the easiest way would be to configure vpopmail for mysql - then connect to the same auth table with your php registration script. (I haven't actually tried this, if anyone can think of a reason it won't work, I'm sure I'll get flamed here soon.)