Kinda like C++'s std::vector things, allowing you to walk thru an "array" of aliased domain names.
I am adding the following functions to vpopmail (If Tom allows them...) and adding support for them in the extension:
valias_select_names, valias_select_names_next, valias_select_names_end
Submit a patch on sourceforge is what tom would say :P
These functions retrieve just the sorted names of aliases for a domain.
I just got it to compile with no errors for the first time. There are probably a couple of days of testing before I publish the code. I think there is a conflict in the version checking code in config.m4 and the latest version of vpopmail. I just added some #define's and #undefs in the code to bypass it. I believe something better must be done before it is submitted to PECL, but that is not very high on my prioroty list.
I am testing the extension running PHP as an Apache module, with Apache running as vpopmail:vchkpw. I think it should also run from CGI as long as it is run as the vpopmail user. I don't see any way to get around running as the mail system user, and considering how easy it is to setup a separate instance of Apache I don't see any reason to worry about anything else. If you don't agree, now is the time to show me a better way.
How about a public private key sort of thing like SSH?
Using named pipes as a means to "talk" to each other. This would require a deamon. Or even, just exec, and having a binary setuid vpopmail:vchkpw and talk over stdin, and stdout. Redirecting stderr to a log file of some sort, to log bad auth's, and good ones. And the changes done. This would be better than running apache as vpopmail:vchkpw. But that is totally up to you, i prefer not to run two different apache's side by side, just one, running as www:www :)