1 #ifndef CVM__QMAIL__H__ 2 #define CVM__QMAIL__H__ 3 4 #include <bglibs/str.h> 5 6 struct qmail_user 7 { 8 str user; 9 unsigned long uid; 10 unsigned long gid; 11 str homedir; 12 char dash; 13 str ext; 14 }; 15 16 extern const char* qmail_root; 17 extern const char* qmail_me; 18 extern const char* qmail_envnoathost; 19 int qmail_init(void); 20 21 int qmail_users_init(void); 22 int qmail_users_reinit(void); 23 int qmail_users_lookup(struct qmail_user* user, const char* name, char dash); 24 int qmail_users_lookup_split(struct qmail_user* u, const char* name, 25 str* local, str* ext); 26 27 int qmail_domains_init(void); 28 int qmail_domains_reinit(void); 29 int qmail_domains_lookup(const str* d, str* domain, str* prefix); 30 31 int qmail_dotfile_exists(const struct qmail_user* user, const char* ext, 32 str* path); 33 34 int qmail_lookup_init(void); 35 int qmail_lookup_cvm(struct qmail_user* user, 36 str* domain, 37 str* username, 38 str* ext); 39 40 #endif 41