Last active
December 15, 2015 13:19
-
-
Save dinocore1/5266863 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
driver = sqlite | |
connect = /etc/mailbox.sqlite | |
password_query = SELECT password, (username || '@' || domain) AS user FROM mailbox WHERE username = '%n' AND domain = '%d' | |
user_query = SELECT '/var/vmail/%d/%n' AS mail, 999 AS uid, 8 AS gid FROM mailbox WHERE username = '%n' AND domain = '%d' AND active = '1' | |
iterate_query = SELECT username, domain FROM mailbox | |
This file contains hidden or 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
CREATE TABLE mailbox ( | |
username varchar(255) NOT NULL, | |
domain varchar(255) NOT NULL, | |
password varchar(255) NOT NULL, | |
active tinyint(1) NOT NULL default '1' | |
); |
This file contains hidden or 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
dbpath = /etc/mailbox.sqlite | |
query = SELECT '%d/%u/' FROM mailbox WHERE username = '%u' AND domain = '%d' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment