Making and Installing EnderUNIX QLDAPAdmin v.1.0-Release Candidate 1 ==================================================================== This file provides brief instructions on how to build and install QLDAPAdmin on UNIX (and UNIX-like) system. More detailed information and instructions can be found in EnderUNIX website: (http://www.enderunix.org/qldapadmin/INSTALL). It is recommended that you read, or at least skim through, ALL of the instructions in this file before attempting to build the software. Making and Installing ----------------------------------------------- 1. Unpack the software and change directory: % tar xfz qldapadmin-VERSION.tar.gz % cd qldapadmin-VERSION (replacing VERSION with the appropriate version string). If you are reading this file, you probably have already done this!:)) 2. Edit file named qconfig.h in qldapadmin-VERSION/src and make appropriate changes to suit your system. (NOTE: a "#" is NOT a comment! use "//" or "/* ... */" to comment out stuff!) If your OS is Linux, comment out #define LINUX directive, similarly, if you are using Solaris, #define SOLARIS should be commented out! If you like to force quota addition to users when they are first created set this uncommented. If you uncomment this, make sure that you set the DEFAULT_QUOTA_SIZE and DEFAULT_QUOTA_COUNT parameters in your configuration file. #define HARDQUOTA 1 If you want your configuration file in a different place, change this to your liking... #define CONFIGFILE "/usr/local/etc/qldapadmin.conf" #define MAXFORWARDS 3 Maximun number of mailForwardingAddress values #define MAXALTERNATES 3 Maximum number of mailAlternateAddress values 3. Edit Makefile and change SH, CC, CFLAGS, LDFLAGS, CPPFLAGS and LIBS values, in your qldapadmin-VERSION/src directory. Note that your LDAP distribution's header files and libraries should be pointed out by CPPFLAGS, LDFLAGS and LIBS directives. Variable Description Example CC C++ compiler g++ CFLAGS C++ flags -O2 --pipe CPPFLAGS cpp flags -I/path/include LDFLAGS ld flags -L/usr/local/lib LIBS libraries -ldap -llber -lcrypt If your OS is Solaris, you can simply copy Makefile.Solaris to Makefile, for a running Makefile :) 4. Type: % make If all goes well, all binaries will be compiled. However for this step to become successfull, you will need to supply the needed variables in Makefile and qconfig.h 5. install the binaries. You may need to become the super-user (e.g. root) to do this (depending on where you are installing things): % su root -c 'make install' Binaris will be installed in /usr/local/bin Installed tools are: qaddaltaddr qadddomain qaddforward qadduser qdelaltaddr qdeldomain qdelforward qdeluser qlistdomains qlistusers qmodifyuser qpasswd qsetacctstatus qsetdeliverymode qsetmailhost qsetmsgstore qsetquota quserinfo 6. Copy qldapadmin-VERSION/src/qldapadmin.conf.sample as your CONFIGFILE and edit it with your favorite editor to change settings. LDAP_USER "cn=root, dc=enderunix, dc=org" This should be a user who is capable of doing write operations in the LDAP database. LDAP_PASSWORD "secret" Your password you use when binding to your LDAP server LDAP_BASEDN "dc=enderunix, dc=org" LDAP_SERVER "localhost" Self explanatory though, your ldap server's hostname or IP LDAP_PORT 389 Most of the time you won't need to change this. The port number that your LDAP server binds to MAILHOST "freefall.enderunix.org" Default mailhost ;) DEFAULT_QUOTA_SIZE="10000000" If you set HARDQUOTA directive in qconfig.h, this should not be left blank. This is the quota for the user in *bytes*. DEFAULT_QUOTA_COUNT="1000" If you set HARDQUOTA directive in qconfig.h, this should not be left blank. This is the quota for the user measured in units e.g. mails 7. That's it! Before you start using QLDAPAdmin you must create your base DN in the LDAP Server. To create base DN edit ld.txt file in this directory and run the following command. root# ldapadd -D"cn=root, dc=enderunix, dc=org" -w secret -f ld.txt change "cn=root, dc=enderunix, dc=org" value with your LDAP_USER value and "secret" value with your LDAP_PASSWORD value that you define in qconfig.h 8. GUI If you also want to have a GUI at hand, you should compile the GUI. For this, read the file INSTALL-GUI and follow the instructions explained there. How to Add Domain: ================== You should've created the BASE_DN entry in your LDAP server. If you didn't consult OpenLDAP documentation or the docs of your LDAP distribution. If your BASE_DN exists, then simply type: # qadddomain or # qaddomain -c domain_description domainname How to Add Users: ================= simply run qadduser. If no argument is given qadduser will ask you the questions about the user and will create the appropriate entries in the LDAP server. Avalible options to qadduser: -u mail address -s mail server -p password -q mail quota in the format: 10000S, 100C -d mailMessageStore -c Gecos -h help secreen -v version information Example: # qadduser -u tosbi@enderunix.org -p aaa -s freefall.enderunix.org \ -c "Big Tosbi" -q "10000000S, 1000C" -d /usr/home/foo/bar or # qadduser How to Delete Domain: ===================== run qdeldomain! # qdeldomain or # qdeldomain -d enderunix.org -f -f is to force deletion (do not ask for confirmation) How to Delete User: =================== run qdeluser! # qdeluser or # qdeluser tosbi@enderunix.org How to Change Password: ======================= # qpasswd -p new_password deliali@enderunix.org or # qpasswd How to Modify a User: ===================== # qmodifyuser How to get information about a user: ==================================== # quserinfo roots@enderunix.org How to Set User Quota: ====================== # qsetquota -s 10000000 -c 1000 ali@veli.com where -s specifies mail size and -c specifies mail count. How to Set Mail Host: ===================== # qsetmailhost -m ali@enderunix.org freefall.enderunix.org How to Set User Mail Message Store: =================================== # qsetmsgstore -m /usr/home/alibaba alibaba@enderunix.org How to List Qmail Domains: ========================== # qlistdomains How to List Qmail Users for a Domain: ===================================== # qlistusers enderunix.org How to add Mail Forwarding Address for a user: ============================================== # qaddforward -f forward@other_domain.com user@domain.com How to delete Mail Forwarding Address for a user: ================================================= # qdelforward -f forward@other_domain.com user@domain.com How to add Mail Alternate Address for a user: ============================================== # qaddaltaddr -a forward@other_domain.com user@domain.com How to delete Mail Alternate Address for a user: ================================================= # qdelaltaddr -a forward@other_domain.com user@domain.com How to set account status for a user: ===================================== # qsetacctstatus -s [active|disabled|nopop] username e.g. # qsetacctstatus -s active isa@enderunix.com How to set delivery mode for a user ===================================: # qsetdeliverymode -m [echo|forwardonly|localdelivery|normal|reply|nombox] username e.g. # qsetdeliverymode -m forwardonly ahmet@enderunix.com You may use -h switch to get help! or you can use man [qldapadmin binary] to get the man page. (c) 2001, EnderUNIX Software Development Team @ Istanbul, Turkiye http://www.EnderUNIX.org/ mailto:roots@enderunix.org End of INSTALL file. Mon Dec 4 03:06:09 GMT 2001