reference implementation of imail server in C99