I'd like to use PAM as an authentication method for a whole lot of apps (pop/imap/ftp/apache), but also as a backend for my mail system (exim). In the current case, I have LDAP behind PAM, so I could configure exim to query directly the LDAP directory, but I'd like to find a solution where I can just plug another user database and be ready to go. Can PAM be used to say if a user exists (when a mail is received in that case) or is only for authentication?