Title: qmail notes Subject: more notes on qmail qinstall appears to be dead: http://www.metin.org/ Another install script: http://www.qmail.nu/ Config qmail script: http://www.din.or.jp/~ushijima/qmail-conf/ This is a site with a much better howto: http://www.defcon1.org/html/Software_Articles/File-Share/Qmail-install/qmail-install.html This is a site with a much better howto: http://rucus.ru.ac.za/qmail/summersoft.html AdmintTools: Qmailanalog http://bandung.linux.or.id/download/server/mail/?D=A Matchup http://www.mathematik.uni-ulm.de/help/qmail/matchup.1.html To make a cool package I had to install several things: Mail Server: qmail-1.03, #the big kahuna mail server. qmailadmin, #lets you admin qmail from web page. autorespond, #handles bounces, and system messages checkpassword, #non system user account authentication. daemontools, # not quite sure what this is for. ezmlm, #mailing list majordomo type thing sqwebmail, #web interface for clients (perl) ucspi-tcp, #replace inetd vpopmail, #handle virtual domains & non-unix mail accounts. Web Server: Apache-1.3.12, mod_SSL-l-2.6.4, mod_perl-1.21 Security: OpenSSL, rsaref-2.0, System: Uninstall sendmail Switch from mailbox to maildir On DNS enter an MX record, and bounce server. =============================================================== qmail | vpop | ---------------------------------------------- | | | | qmailadmin sqwebmail curior-imap POP/APOP client | | | ----------- IMAP client | ----------------------- | | apache with mod_ssl openssl | | ----------------------- | secure webmail client =============================================================== ---------------------------- Qmail ---------------------------- I had to read: INSTALL /var/qmail/doc/INSTALL.ids /var/qmail/doc/INSTALL.alias /var/qmail/man/cat5/dot-qmail.0 < >> /var/qmail/control/locals # cat /var/qmail/control/locals 6. Make qmail refuse to accept SMTP messages from anyone but your hosts. # cat /var/qmail/control/rcpthosts # cp /var/qmail/control/locals /var/qmail/control/rcpthosts 7. Minimal survival command: # cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root .qmail-default # chmod 644 ~alias/.qmail* NOTE: *Delivery instructions for foo go into ~alias/.qmail-foo; *Delivery instructions for user-foo go into ~user/.qmail-foo. *See dot-qmail.0 for the full story. << almost unreadable Postmaster = ~alias/Mailbox MAILER-DAEMON = ~alias/.qmail-mailer-daemon < ~/Mailbox # ln -s ~/Mailbox /var/spool/mail/ NOTE: problems with /var/spool/mail: It's slow. It's insecure. It's a world-writable directory 9. # maildirmake $HOME/Maildir % echo ./Maildir/ > ~/.qmail 10. Use maildir insted of Mailbox cd /var/qmail/boot cat /var/qmail/boot/home cp /var/qmail/boot/home /var/qmail/rc vi /var/qmail/rc replace ./Mailbox with ./Maildir/ The format of ~user/Mailbox is inherently unreliable. If the system crashes while appending a new message to ~user/Mailbox the message will be truncated. If it was truncated in the middle of a line, it will merge with the next message! The mailer understands that it wasn't successful, but it can't fix your corrupted mbox. Qmail supports maildir, a crashproof format for incoming mail messages. maildir is fast and easy for MUAs to use. Even better, maildir works wonders over NFS---see below. 11. Make qmail's ``sendmail'' wrapper available to MUAs: # mv /usr/sbin/sendmail /usr/sbin/sendmail.org # ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail # mv /usr/lib/sendmail /usr/lib/sendmail.org # ln -s /var/qmail/bin/sendmail /usr/lib/sendmail 12. Enable deliveries of messages injected into qmail: # csh -cf '/var/qmail/rc &' 13. Read TEST.deliver. 14. Set up qmail-smtpd (all on one line): # vi /etc/inetd.conf Append smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env tcp-env /var/qmail/bin/qmail-smtpd 15. Fire it up # kill -HUP # ps -el |grep [q]mail 16 Add it to a startup script to # vi /etc/rc.d/init.d/qmail #!/bin/sh csh -cf '/var/qmail/rc &' exit Add a link in rc5.d that points to the start script. # ln -s /etc/rc.d/init.d/qmail /etc/rc.d/rc5.d/S80qmail ---------------------------- checkpassword ---------------------------- It's called vchkpw, but I haven't found my notes yet. ---------------------------- QmailAdmin ---------------------------- What is it? ~~~~~~~~~~~ QmailAdmin is a cgi program for administering Qmail with vchkpw. Requirements: ~~~~~~~~~~~~~ - A UNIX computer (Linux/Solaris/BSD) and C compiler (gcc) - A web server (Apache, Zeus) - Qmail 1.03 - vchkpw (a virtual domain addon for qmail) - ezmlm installed in /usr/local/bin/ezmlm (modify qmailadmin.h to change location) - autorespond installed in /usr/local/bin/autorespond (modify qmailadmin.h to change location) QmailAdmin is known to work on at least: - Linux - Solaris - FreeBSD Updates? ~~~~~~~~ Latest version is available at: http://www.inter7.com/qmailadmin Please refer your suggestions/bug reports to kbo@inter7.com Install guide 0. fast install guide.. type: ./configure make clean make make install-strip If it works, you are done! If it doesn't.. read below. 1. Before we can make and install there are a few things to consider.. a. do you have a vpopmail user and installed vchkpw b. where is your cgi bin directory c. where is your ezmlm directory d. where is your autorespond directory If you are missing any one of those you can stop reading this now and go install it!! 2. Below is a list of possible configuration options Note: Decide now which features you will want/need for your ./configure *Use this if your cgi bin is not in a standard location --enable-cgibindir={dir} HTTP server's cgi-bin directory. *Use this if your don't want the HTML templates to be in /usr/local/share/qmailadmin --with-htmllibdir={dir} qmailadmin HTML library directory. *Use this if your qmail directory is not in /var/qmail --enable-qmaildir={dir} directory where qmail is installed. *Use this if your URL PATH for cgi-bin is elsewhere --enable-cgipath={/cgi-bin/qmailadmin} URL path for cgi. *use this to set the vchkpw user if it is not vpopuser. --enable-vpopuser={vpopuser} user vchkpw was installed as. *Use this if your autorespond is not in /user/local/bin --enable-autoresponder-bin={path} Path to autoresponder binary. *Use this if ezmlm is not in /usr/local/bin/ezmlm --enable-ezmlmdir={dir} Directory that holds the ezmlm package. *Use this if you would like to set a system wide max pop user limit --enable-maxpopusers=unlimited -1 is unlimited, zero turns off functionality. *Use this to set a system wide max number of aliases --enable-maxaliases=unlimited -1 is unlimited, zero turns off functionality. *Use this to set a system wide max number of forwards --enable-maxforwards=unlimited -1 is unlimited zero turns off functionality. *Use this to set a system wide max number of autoresponders --enable-maxautorepsonders=unlimited -1 is unlimited zero turns off functionality. *Use this to set a system wide max number of mailing lists --enable-maxmailinglists=unlimited default is unlimited or a number. 3. Ok, now configure, using any options that you need to. For example: ./configure --enable-cgibindir=/my/wierd/cgi-bin/dir .... 4. make 5. make install or make install-strip (for a smaller binary) To run it, type into your webrowser: http://yourdomain/cgi-bin/qmailadmin Now.. some fine tuning.. 6. If you want to set per domain limits on the number of: a) pop accounts b) aliases c) forwards d) mailing lists e) autoresponders Then create a .qmailadmin-limits file in the virtual domain directory for the domain you wish to limit. The syntax of the .qmailadmin-limits file is as follows: maxpopaccounts X maxaliases X maxforwards X maxmailinglists X maxautoresponders X Where X is the maximum number you wish. Be sure the vpopmail user has read permissions to this file. The default is unlimited. If you set any of the above values to 0 it will effectually disable that part of the menu and that feature. 7. If you want to modify the "look" of qmail admin: Edit the html template files in /usr/local/share/qmailadmin/ or if you changed the location with the --with-htmllibdir={dir} then edit the files in that directory. 8. Enjoy If you have any questions or comments please email support@inter7.com or join the mailing list at http://www.inter7.com/qmailadmin/ ------------------------------------------------------- Install vpopmail: taken from the /vpopmail-3.4.12/INSTALL file. ------------------------------------------------------- 1. check for diskspace # df -k Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda1 6071904 3463704 2299756 60% / ------------------------------------------------------- # /sbin/fdisk -ls /dev/hda Disk /dev/hda: 255 heads, 63 sectors, 784 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 768 6168928+ 83 Linux /dev/hda2 769 784 128520 5 Extended /dev/hda5 769 784 128488+ 82 Linux swap --------------------------------------------------------- 2. add groups and users # cat /etc/group |grep vchkpw # /usr/sbin/groupadd vchkpw # /usr/sbin/useradd -g vchkpw vpopmail --------------------------------------------------------- 3. Create a /etc/tcp.smtp file # echo "127.0.0.:allow,RELAYCLIENT=\"\"" > /etc/tcp.smtp # cat /etc/tcp.smtp 127.0.0.:allow,RELAYCLIENT="" # echo "192.168.0.:allow,RELAYCLIENT=\"\"" >> /etc/tcp.smtp # cat /etc/tcp.smtp 127.0.0.:allow,RELAYCLIENT="" / 192.168.0.:allow,RELAYCLIENT="" ---------------------------------------------------------- Step 4. Install: # ./configure # make # make install-strip ---------------------------------------------------------- Step 6.Add a virtual domain # cd /home/vpopmail/bin # ./vadddomain 420worldwide.com Please enter password for postmaster: enter password again: vadddomain will modify the following qmail files (default locations used) /var/qmail/control/locals /var/qmail/control/rcpthosts /var/qmail/control/morercpthosts (if rcpthosts > than 50 lines) /var/qmail/control/virtualdomains /var/qmail/users/assign /var/qmail/users/cdb It will also create a domains directory ~vpopmail/domains/test.com ~vpopmail/domains/test.com/postmaster/Maildir ... ~vpopmail/domains/test.com/vpasswd ~vpopmail/domains/test.com/vpasswd.cdb ----------------------------------------------------------- 7. Add a new pop user. # cd /home/vpopmail/bin # ./vadduser john@420worldwide.com Please enter password for john@420worldwide.com: enter password again: ----------------------------------------------------------- 9. Delete a virtual domain # cd /home-dir-of-vpopmail/bin # ./vdeldomain test.com 10. Changing a pop users password (new in 3.4.3) # cd /home/vpopmail/bin # ./vpasswd user@domain.com or # ./vpasswd user@domain.com ----------------------------------------------------------- Install sqwebmail: Taken from INSTALL ----------------------------------------------------------- * --with-cacheowner=user - specifies who should own the cache directory. This is bin by default. However, if you choose to install vsqwebmail owned by the virtual userid, instead of root, you MUST use the cacheowner option to specify the virtual userid. * --enable-https - have SqWebMail generate https:// URLs for all accesses, instead of http://. * --enable-https=login - generate a single https:// URL for the login function only. The idea is to use SSL just to send the login and the password. In order for this option to work the URL for both http:// and https:// path to SqWebMail must be identical! * --enable-webpass=vpopmail - use the vpopmail.a library to change passwords (this will only work if the virtual userid used for the accounts also owns the vpopmail password database). * --enable-cgibindir=directory - where to install the sqwebmail executable program. This should be your /cgi-bin directory. The configure script will look for one in the usual places, this option can be used to tell configure where to look. * --with-maxmsgsize=n - maximum size of messages (including attachments. Defaults to 2097152 (two megabytes). Note that attachments are base64-encoded, which adds 25% overhead, so the maximum size of attachments is really about 1.5 megabytes. * --with-ispell=pathname - if configure finds ispell in the default path, or if you specify the full name to ispell using this option, users will be able to spell check their documents. authentication modules I specify = * authshadow - this module is like authpwd, except that it should be used on systems that use shadow password files, /etc/shadow. * authvchkpw - this is another virtual mail database lookup module, except that it uses the vpopmail vpasswd files. This module is provided for a quick way to use your existing vpopmail vpasswd files. Where possible, you should convert over to /etc/userdb. The included script vchkpw2userdb(8) might be of some help in doing VPOPMAIL AUTHENTICATION If you use vpopmail's support for MySQL authentication, you MUST use the --enable-logincache option, and do everything you need to do in order to use this option (install the cron job, etc...), otherwise you're going to bring your server to its knees. ------------------------------------------------------------ this worked -------------------------- ./configure --without-authpam --without-authuserdb --enable-webpass=no ./configure --without-authpam --without-authuserdb --enable-webpass=no --without-authpwd --without-authshadow ./configure --without-authpam --without-authuserdb --enable-https --enable-webpass=vpopmail --enable-default-domain=stilen.com this did not work -------------------------- ./configure --enable-https=login --enable-webpass=no --enable-cgibindir=/usr/local/apache/cgi-bin --with-maxmsgsize=20000000 --with-ispell=/usr/bin/ispell make configure-check # to verify the directories for the CGI and the image files Rerun configure and use --enable-cgibindir and --enable-imagedir if necessary. make #to compile SqWebMail make check make install-strip #use make install if make install-strip fails go to http://www.stilen.com/cgi-bin/sqwebmail ------------------------------------------------------------ You must now create the following cron job that runs at regular intervals: su -c "/usr/local/share/sqwebmail/cleancache.pl" bin ------------------------------------------------------------ install amailadmin ------------------------------------------------------------ ./configure make clean make make install-strip ========================================================= Getting your mail from a netscape client ++++++++++++++++++++++++++++++++++++++++++++++++++ These are notes from the mailing list =================================================== From: "Netfision" To: sqwebmail@inter7.com Date: 12 Dec 2000, 10:35:47 PM Subject: Re: How to setup pop3 services for my virtual domains user or virtual domain and in order to allow pop access using netscape client, you need to enter your email address (subsitutue the @ with %) as "username%domain.com" as the full username in netscape. ----- Original Message ----- From: System Administrator Cc: Sent: Wednesday, December 13, 2000 2:10 PM Subject: How to setup pop3 services for my virtual domains user > > > > HI all, > i'm using vpopmail to create my virtual domain and also sqwebmail to access user emails. > the sqwebmmail works fine. > > i'm trying to use pop3 from netscape mail. > pop3 stream tcp nowait root /var/qmail/bin/qmail-popup qmail-popup mars.mydomain.com /user/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir > > the problem is that when i run simple test > i telnet to port 110 and run simple pop3 ,test it works, but when using > pop3 via browser it's not working. > > can someone help me.