Frequently Asked Questions qmail-patch@jms1.net mailing list John Simpson 2012-07-09 ---------------------------------------- This document is, very definitely, a "work in progress". It will be updated as needed. Any suggestions regarding it should be directed to the list- if I like your idea, and if nobody has any compelling reason for NOT making the change, I will change this document. ---------- Background Information 0.1. Who is John Simpson? That's me. I work as a freelance IT consultant in Orlando, Florida, although thanks to the power of ssh I do have several clients in other parts of the USA, as well as a few in other countries. I consider myself, first and foremost, to be a programmer. However, I spent about nine years building, running, and providing consulting services for ISPs, with a strong background in qmail and djbdns. I have been running qmail on a daily basis since April 1998, and at the current time (2007-12-19) I am directly responsible for keeping about twenty qmail servers running, with consulting oversight of about fifty others. 0.2. How can I contact you privately? If you're looking for help with a server, PLEASE use the list. There are two reasons for this: (1) I'm usually not the only person capable of answering questions. Asking on the list will allow your question to be seen by others who may be able to provide an answer more quickly than I do (I don't spend every hour of every day monitoring the list, and in fact there may be periods of several days where I don't look at email at all.) (2) Whatever your question is, chances are that somebody else will have a similiar issue in the future. Asking on the list will ensure that your question, and whatever answers you receive, will be in the archives where others can find them in the future. (One of the things which irritates me most is having to answer the same questions, over and over again.) If using the list is not an option, remember that IT consulting is how I make my living. Please realize that I will consider any request for off-list help to be a solicitation for consulting services, and will expect to be paid accordingly. Don't be surprised if you email me, and the response is something like "I charge $___ per hour, with a two hour minimum, first two hours paid up front" (which IS how I normally do business with a new client- two hour minimum, first two hours paid up front. I've been burned before, and I don't plan to repeat the experience.) The simple version is this: either be prepared to discuss it on the public list, or be prepared to make it worth my time. I'm not going to answer technical questions in private, for strangers, for free. With that said, I have several email addresses. My primary address is at the top of this document. If you are unable to email that address because of a blacklisting issue, you can use my gmail address, which is my ham radio call sign (see below.) As for "instant messenger" programs... I don't use any of the "big name" chat programs, such as AIM, MSN, Yahoo, or ICQ. I do use jabber, however I don't accept "buddy requests" or random chat requests from people who aren't on my list. If you'd like to get on my list, you'll need to ask via email or some other method first. For the most part, I only do Jabber with people I know personally, or with clients. 0.3. What's up with the "KG4ZOW" thing? I am an amateur radio operator, KG4ZOW is my call sign. If you're interested in learning more about amateur radio, email me off-list, or vist http://www.arrl.org/ for the USA, http://www.rsgb.org/ for the UK, or http://www.iaru.org/iaru-soc.html to find the National Amateur Radio Society where you live. ---------- Mailing List 1.1. What is the purpose of the mailing list? The primary purpose of the list is to discuss the combined patch and the features it adds to qmail. If you need clarification on how something works, want to suggest a new feature, or have a bug report (I'll be the first to admit I'm not perfect!) this is the place to do it. In addition, http://qmail.jms1.net/ contains a lot of other information relating to qmail. This list is the appropriate place to discuss anything on the web site, including the patches I have written for programs like vpopmail and simscan. The list can also be used to discuss things about qmail which may not relate directly to the combined patch. However, it's not my intent for the list to try and replace djb's qmail list, or any other list. 1.2. What is the list NOT for? The list is NOT for beginner-level support. We expect you to know how to administer your server. Nobody here is going to hold your hand and teach you how to use Linux. If you don't already understand basic *nix system administration well enough to write your own simple shell scripts, you are probably not going to understand qmail well enough to effectively administer it. Do yourself a favour and spend some time learning how to properly administer your system, before you try to take on something as complicated as qmail. It's also NOT a forum for bashing other lists, or for attacking people, whether on this list or not. And no, it's NOT a replacement for the qmailrocks list. 1.3. What are the rules on the mailing list? Send an email to qmail-patch-info@jms1.net and the server will send you back a copy of the rules. Or visit http://qmail.jms1.net/list/q-p-rules.txt to see the same file. 1.4. What other lists are out there? I have an announcement list, where I let people know about new versions of the combined patch, as well as any other significant changes to my scripts or web site (since most of the people using the combined patch are also using my scripts.) Anything I send to the announce list will also be sent to this list, so there is no need to subscribe to both of them (unless you really want to, not a big deal to me.) The list follows the normal ezmlm rules (i.e. adding "-subscribe" to the list address will start the subscription process, etc.) That list address is: qmail-patch-announce@jms1.net DJB, the original author of qmail, hosts a mailing list for qmail. His list is for discussion of qmail in general, and is where you will find the authors of "netqmail", along with myself and a lot of other very knowledgable people. However, his list has most of the same "no nonsense" policies that I do. It's an ezmlm list with the address: qmail@lists.cr.yp.to 1.5. Is the list archived? Is it possible to read the list via RSS feed? Archives and RSS feeds for all of my mailing lists (both qmail-patch and qmail-patch-announce) are available at this URL: http://www.jms1.net/lists/ The software I'm using to make the archives available on the net, Bruce Guenter's ezmlm-browse, also provides a link which can be used to read the list with an RSS reader. All I ask is that if you do use RSS, PLEASE don't set your RSS client to pull updates more than once every half hour. I don't plan to obsess about it, but if I happen to notice an excessive amount of RSS traffic from the same IP, I will track it in the logs and block that IP (from my server entirely, not just from the RSS feeds or the web sites.) ---------- The Combined Patch 2.1. What is the combined patch? The "combined patch" is a single patch file, made up of several other smaller patches combined. When I started using qmail patches (to supply features that qmail didn't have by itself) I had a small set of them, which all applied cleanly if I did them in a specific order. Eventually I needed to add one which wouldn't apply cleanly with the others, no matter what order I applied them. I *was* able to combine the features, but only by manually editing the source code. After several months of manually editing the code whenever I built a new qmail machine, it occurred to me that I could run "diff" after applying the patches and manually changing the code, and produce a single patch file which gave me ALL of the new features, and save myself a bunch of time when building qmail servers. Over time, more and more features got added to the combined patch- both patches written by others, and patches I wrote myself. Others have been using it for several years, and with their bug reports and suggestions, it has become one of the more widely used "mega-patches" for qmail. 2.2. What patches are included in the combined patch? Too many to mention here, and the list is constantly changing. This web page has a full list of what's included in each version: http://qmail.jms1.net/patches/combined-details.shtml 2.3. What's the difference between the "stable" and "testing" versions of the combined patch? The "testing" version is the absolute latest version of the combined patch which I have released. Most of the time, it's what I'm running on my own server. It usually has newer features and bug fixes, but may not have been as well tested as I would like. The "stable" version is one which has been released as the "testing" version for at least a month, and which has had no bug reports at all. Note that I don't obsess about the versions, there have been times when the "stable" name hasn't moved for several months, not because there has been anything wrong with the "testing" version, but because I didn't think about moving the name. 2.4. I think I found a bug in the combined patch. Join the mailing list and let me know about it. However, you should first make sure you understand qmail and your own server well enough to rule out the chance that maybe the problem has to do with how your server is set up. 2.5. I built my server using the "qmailrocks" directions, and... The directions on the qmailrocks web site are known to be badly broken in several respects. In addition, the packages being distributed on the qmailrocks web site are shamefully out of date. The version of the combined patch he's distributing, for example, I stopped providing support for over a year ago. To be honest, I've grown tired of waiting for Eric (the author of the "qmailrocks" directions and the owner of the web site) to do something about it- either fix the directions, or give somebody else access to the web site so they can fix it. I'm also not interested in trying to debug problems with qmailrocks systems, or have discussions about it on my mailing lists. THEREFORE. If you started with the qmailrocks directions, you need to start your server over from scratch, compiling and installing CURRENT VERSIONS of each package from the original source, using the directions which accompany each package (i.e. the README and/or INSTALL files in each tarball.) This page lists the problems most people seem to run into when upgrading an existing qmailrocks machine to the modern versions of the various packages: http://qmail.jms1.net/upgrade-qmr.shtml If you really need an "install guide" to hold your hand and walk you through the process of building your server, I recommend "Life with qmail". Make sure to pay attention as you go along, his intent isn't just to give you a working server, he's trying to teach you how it works as well. http://lifewithqmail.org/ Questions which show up on the list which involve qmailrocks machines will probably be ignored. If you're really married to the qmailrocks method, they have their own mailing list where you can ask questions. 2.6. I'm using qmail-ldap, and... qmail-ldap is a totally different "distribution" of qmail. It has been extensively patched, using a totally different set of patches, and it has its own community based around it, almost totally separate from the mainstream qmail community. If you are running qmail-ldap, you should be asking your questions on the qmail-ldap mailing list. http://www.qmail-ldap.org/ http://lifewithqmail.org/ldap/ 2.7. I'm using Plesk, and... I've got two answers for this one. (1) Plesk is a COMMERCIAL PRODUCT. If you are using Plesk, you are supposed to have a valid license. If you're paying for that license, you have the right to call them for support. And if you're NOT paying for that license, you're violating their copyright, and we have no interest in enabling you to continue violating the law. Either call Plesk for support, or don't run Plesk. (2) Plesk's version of qmail has a bunch of custom patches that they wrote for themselves. Those patches are covered by Plesk's copyright, and are not available to anybody other than authorized Plesk users. Nobody here (or in the larger qmail community) knows exactly what they've done to qmail, nor are we interested in finding their patch and tearing it apart to figure out what they've done to it, especially when authorized Plesk users are allowed to call them for help. Of course, if you're an authorized Plesk user and can legally give me a copy of their patch, and you are willing to pay me for the time it would take to reverse-engineer their patch, I'm willing to try and answer your questions. Just be aware that if you choose to do this, there will be several hours of up-front research time before I can even try to answer your question. ---------- Useful web pages 3.1. What web pages are available to learn more about the patch, or about qmail in general? djb's qmail site: http://cr.yp.to/ My qmail site: http://qmail.jms1.net/ Information about my combined patch: http://qmail.jms1.net/patches/combined.shtml http://qmail.jms1.net/patches/combined-details.shtml vpopmail: http://www.inter7.com/vpopmail/ http://qmail.jms1.net/vpopmail/ simscan: http://www.inter7.com/simscan/ http://qmail.jms1.net/simscan/ courier-imap: http://www.courier-mta.org/imap/ http://qmail.jms1.net/courier/ dovecot: http://www.dovecot.org/ http://qmail.jms1.net/dovecot.shtml Also, please make an honest attempt to find answers to your questions using Google or some other search engine, before asking a question on the list. 3.2. How come your web site doesn't work with Internet Explorer? Read the web page you see when you try it, and you will understand. ---------- Questions about qmail ---------- Questions about vpopmail 5.1. I'm (writing a script, writing a .qmail file, just curious) and noticed that if I have more than a few domains, or more than a few mailboxes in one domain, vpopmail creates a directory with the name "0" (or "1", "2", etc.) What is this?/How do I stop this? This is called "hashing". The idea is that, under most *nix filesystems, the entries in a directory are not sorted or index in any way, and when the kernel wants to access a given item within a directory, it has to do a sequential search. For a directory with thousands of items, doing a sequential search can be a very time-consuming task. In many cases, breaking the list into several sub-directories allows the kernel to access a particular item more quickly. If you are writing scripts which work with vpopmail mailboxes, you should never assume that any domain or mailbox will be located in a specific location. You should ALWAYS use the vpopmail command line tools, or the vpopmail API if you're writing your own program, to locate the physical directory for a domain or a mailbox. To find a domain's directory, use "vdominfo -d domain.xyz". To find a mailbox's directory, use "vuserinfo -d mailbox@domain.xyz". 5.2. I want to use your ONCHANGE patch for vpopmail, but I don't see a download link on your web page. Where can I find it? Download vpopmail version 5.4.16 or later. It's now a standard part of the vpopmail package. 5.3. Why doesn't the ONCHANGE functionality work with qmailadmin? It does, however you MUST compile and install qmailadmin AFTER compiling and installing a version of vpopmail which has the ONCHANGE functionality built into the library. The qmailadmin binary links a lot of its code from "libvpopmail". This is the same library which is used by the vpopmail command-line tools. There are two ways to link code like this- static linking, where the program text (the actual machine language instructions) are literally copied from the library into the final executable, and dynamic linking, where the executable contains a reference to the library, and the kernel loads the library into memory when loading the program. The vpopmail command-line programs, and qmailadmin, use static linking. This results in faster load times (the kernel doesn't have to find, load, and resolve linkages into that dynamic library) but it means that if the libary code changes, the executable needs to be rebuilt. With vpopmail this isn't a big problem, because the process which builds the library also builds the command-line tools at the same time, however qmailadmin is not part of the vpopmail package, and is therefore not automatically rebuilt. The code which calls the "onchange" program is contained within libvpopmail. When qmailadmin calls the libpopmail function to (for example) add a new mailbox, that function within the library actually calls the "onchange" program. If you originally built qmailadmin with a library which didn't have the ONCHANGE support in it, qmailadmin doesn't have that code. To fix it, you need to first make sure you've built a version of vpopmail which has the ONCHANGE support, and then you need to rebuild qmailadmin from scratch (i.e. expand the source code into a new directory, configure it, compile it, and install it over the existing executable.) 5.4. I did that, and it calls the "onchange" program when I do some things, but not when I create or remove a mailing list. This is because qmailadmin doesn't call any libvpopmail functions when it creates or removes a mailing list. However, when a list is created, the list of valid email addresses for the domain does change (the list address is created or removed) so the ONCHANGE program does need to be called. I have written an ONCHANGE patch for qmailadmin, which makes it run the ONCHANGE program directly when it adds or removes a mailing list. You will find it on my web site's vpopmail page. This link goes directly to that part of the page: http://qmail.jms1.net/vpopmail/#onchange-qmailadmin ---------- Questions about courier-imap 6.1. Anything about courier-imap... Ever since I started using courier-imap, the author seems to have been trying to avoid or disown anything to do with vpopmail... I don't know the story, but there appears to be some kind of bad blood between him and the authors of vpopmail. In May 2008, he announced that he would no longer support for the "vchkpw" authentication method from courier-authlib, which means that if any bugs were found, he was basically refusing to fix them. I don't honestly know if he went so far as to remove the code from the courier-authlib distribution, but the announcement left a bad taste in my mouth- bad enough that I started looking for a different IMAP server. I tried dovecot, and found that there was very little effort involved in "converting" the existing mailboxes to work with dovecot- the directory structure is one which dovecot knows how to deal with, and dovecot can use the same UUID format (no mailbox reloads for the clients.) The only problem was that the control files (the non-message text files created within the mailboxes) were slightly different, and dovecot came with a script which converted them automatically. So I'm using dovecot on my own server now. I have no plans to return to courier, although I still have many clients using it, which means I do still remember how to administer it. However, for new server installs, if you have no overwhelming reason to use courier, I recommend you use dovecot instead. I don't plan to remove the pages on my web site relating to courier, however I think it's a good bet that they won't be updated any more... ---------- Questions about dovecot ---------- Questions about qmail-scanner 8.1. Anything about qmail-scanner... My recommenation is that, on any server which receives any appreciable amount of email, you should use simscan instead of qmail-scanner. For the record, I'm not saying this because I think there's anything "wrong" with qmail-scanner. On the contrary, it's an awesome program- I used it for several years with excellent results. The issue is that it's written in Perl, which means that every time it runs, the Perl software has to interpret the qmail-scanner-queue.pl and all of the modules it uses before it can start actually running. I have personally seen the overhead of interpreting this code, over and over again, bring a moderately loaded server (15-20 concurrent SMTP connections, with clamd, but not spamassassin) to its knees. Simscan does basically the same thing as qmail-scanner. However, it runs much more quickly becuse it's compiled from C into machine code once, and the machine code only needs to be loaded into memory (if it's not already there) before the program can start- the overhead of having to parse several thousand lines of Perl and build a code tree, doesn't exist with simscan. ---------- Questions about simscan ---------- Thanks (I get by with a little help from my friends...) 10.1. I have to throw out a special "thank you" to Patrick "marlowe" McDonald, who helped me write and proofread this document, and who has been a source of good ideas, sanity checks, and good advice, ever since I met him. I'd also like to thank the following people, who have helped me with this document, the mailing lists, the combined patch, the qmail.jms1.net web site, or just in general. Phil Barnett, AI4OF Troy "Bookworm" Belding Rance Hall Niamh Holding Nigel Mundy, G1TDM Ed Neville Note that this is NOT an exhaustive list by any means. There are also "Thanks to..." notes all over the web site and inside several of the scripts as well. If anybody is listed in a "Thanks to..." on the web site or in a script, or has helped with something relating to the list or the web sites in the past, and would also like to be listed here, let me know.