Change signature of ldap_call_handlers
rename clean_filter
Use LDAPv3 instead of the default
Use scope from settings, assign msgid immediately.
Free event_signal
Do not write past the end of the array
Simplify and make create_filter more readable
Check that the filter is valid before processing the format.
Handle user nonexistence gracefully.
Arg handling was wrong
Simplify arg handling in imap_login.

We are hopefully on our way to proper argument parsing but not there yet.
Also we leak the copied string.
A mix of declaration and code
It should have been strdup all along