Created
June 11, 2014 16:39
-
-
Save mrballcb/9d05b30b15cbb3951a9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A manual SELECT needs to return data in order specified bellow: | |
# username, cryptpw, clearpw, uid, gid, home, maildir, quota, fullname, options | |
# | |
MYSQL_SELECT_CLAUSE SELECT CONCAT(email.name, '@', domain.name), \ | |
user.password, \ | |
'', \ | |
503, \ | |
500, \ | |
TRIM(TRAILING '/Maildir/' FROM CASE \ | |
WHEN email.homedir LIKE "/netapp%" THEN email.homedir \ | |
ELSE CONCAT('/IV/user_data/email/', email.homedir) END), \ | |
CASE WHEN email.homedir LIKE "/netapp%" THEN email.homedir \ | |
ELSE CONCAT('/IV/user_data/email/', email.homedir) END, \ | |
email.quota, \ | |
CONCAT(user.first_name,' ', user.last_name), \ | |
'' \ | |
FROM email, domain, user \ | |
WHERE email.name = '$(local_part)' \ | |
AND domain.name = '$(domain)' \ | |
AND email.domain_id = domain.id \ | |
AND user.email_id = email.id \ | |
AND domain.active = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment