Rick, please upload the patch again. Remember, you need to click on the "Upload and Attach a File" checkbox, select the file to upload and provide a description.
It must have been the checkbox I missed... I know I selected the file.
Please make sure that you aren't using scandir for the sorting, as it isn't available on all platforms. You could copy bkscandir() from qmailadmin though...
I am loading the entries into an array (names) and calling qsort(), pretty much stolen directly out of qmailadmin/util.c.
The string handling that needs checked relates to the variable names, which is supposed to be a dynamic array of dynamic strings. It is free()'d in valias_select_names_end(). (Remember I'm a c newbie.)