1 /* 2 * $Id: vldap.h 1014 2011-02-03 16:04:37Z volz0r $ 3 * Copyright (C) 2000-2009 Inter7 Internet Technologies, Inc. 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License 7 * as published by the Free Software Foundation; either version 2 8 * of the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 */ 19 20 /* NOTE: From of vpopmail 5.4.15, LDAP connection info is stored in 21 ~vpopmail/etc/vpopmail.ldap. The format of the file is as follows: 22 23 ldap server|ldap port|ldap user|ldap password|ldap basedn 24 25 Comments (lines starting with '#') are allowed. 26 27 Port should be the actual port. 28 29 For example: 30 31 # This is the LDAP configuration file for vpopmail. 32 localhost|389|cn=vpopmailuser, o=vpopmail|vpoppasswd|o=vpopmail 33 34 */ 35 36 int ldapversion = 3; 37 38 void *safe_malloc (size_t siz); 39 char *safe_strdup (const char *s); 40 void safe_free (void **p); 41 int ldap_connect (); 42 int compose_dn (char **dn, char *domain); 43 44 #ifndef VPOPMAIL_LDAP_H 45 #define VPOPMAIL_LDAP_H 46 47 char *VLDAP_SERVER; 48 int VLDAP_PORT = LDAP_PORT; 49 char *VLDAP_USER; 50 char *VLDAP_PASSWORD; 51 char *VLDAP_BASEDN; 52 53 static char *vldap_attrs[] = { 54 "name", 55 "uid", 56 "qmailGID", 57 "qmailUID", 58 "qmaildomain", 59 "userPassword", 60 "mailQuota", 61 "mailMessageStore", 62 #ifdef CLEAR_PASS 63 "clearPassword", 64 #endif 65 NULL 66 }; 67 #endif 68