So I've been reading some of the code more closely, and I believe that some refactoring of pipe.c and injector.c will allow the removal of the auth_check_user() function, and use only auth_check_user_ext() -- and let's rename it, too, since it's really about recipients, destinations... aliases! anyhow.
So inside of injector.c, there is process_header() then add_address() and finally a call to auth_check_username_ext() Inside of pipe.c, there is read_header() and insert_messages(). The latter seems to spend quite a bit of code on determining if the users returned by auth_check_user() are actually userids or forwards. This is exactly the distinction that auth_check_user_ext() does for you! I propose that the auth_check_user() parts of pipe.c be gutted to use auth_check_user_ext() instead. Also, as pipe.c has no main(), but is instead something of a library for main.c, which compiles to dbmail-smtp, a whole lot more cleanup and refactoring be done to consolidate the unique pieces of code and to share the common pieces of code. Heh, and perhaps add some consistency by making 'source'.c files which compile to binaries named dbmail-'source' :-P My impetus for this work is to avoid implementing auth_check_user() in my AuthLDAP code. Why spend the time implementing that when I can spend time refactoring everything else, instead! ;-) Aaron
