<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<article>
  <title>Helios qmail FAQ</title>

  <articleinfo>
    <author>
      <firstname>Pawel</firstname>

      <surname>Foremski</surname>

      <email>pjf@gna.org</email>
    </author>

    <author>
      <firstname>Christian</firstname>

      <surname>Löschenkohl</surname>

      <email>christian.loeschenkohl@linea7.com</email>
    </author>

    <copyright>
      <year>2004</year>

      <holder>Pawel Foremski and Christian Löschenkohl</holder>
    </copyright>

    <legalnotice>
      <para>This file is free documentation.</para>
    </legalnotice>

    <abstract>
      <para>Answers frequently asked questions about Helios qmail</para>
    </abstract>

    <pubdate>23-10-2004</pubdate>
  </articleinfo>

  <sect1>
    <title>Design questions</title>

    <qandaset>
      <qandadiv>
        <qandaentry>
          <question>
            <para>Why is it the heck all scripted in PHP?!</para>
          </question>

          <answer>
            <para>There are several reasons.</para>

            <para>First of all, Helios qmail is written (mostly in fact) in
            PHP because it aims to be flexible and easy to understand and
            adapt for individual needs. Apart of that it`s code is easier to
            maintain and extend, even without recompilation or restarting the
            server. Helios qmail should be used rather by experienced system
            administrators, not by "PHP &amp; MySQL &amp; Apache
            "programmers"/"webmasters"", because it was developed to make
            their lifes simplier. Only such persons can understand how to use
            this software reasonably.</para>

            <para>Apart of that, scripts are in fact less (or even not)
            exposed for some security issues (if used right), for example
            buffer overflow vulnerabilities.</para>
          </answer>
        </qandaentry>

        <qandaentry>
          <question>
            <para>OK, but what about speed?</para>
          </question>

          <answer>
            <para>The answer is simple: Helios qmail is only little slower
            than stock qmail would be if it had Helios qmail`s features, so it
            is really fast (and reliable too).</para>

            <para>If you are not convinced about this, take a look at the
            Helios qmail code and see where PHP scripts are plugged into the
            qmail. Most of them are executed during the SMTP session and one
            (new mail notification script) is executed during delivery time.
            What does it mean? Think what today delays SMTP sessions the most
            - usually these are antispam and antivir checks and sending the
            message data, so today the delay that executing a PHP script cause
            is about a few percents of common SMTP session time. Usually there
            is no big difference for example in sending a message in 10 or 11
            seconds.</para>

            <para>Remember that sending mails to remote hosts was only
            slightly modified and Helios qmail is in fact as fast as stock
            qmail in that. You can also turn off near all of it`s features
            (eg. if you do not use some of them) to speed it up.</para>
          </answer>
        </qandaentry>

        <qandaentry>
          <question>
            <para>But this is just plain wrong! It should be written in
            C!</para>
          </question>

          <answer>
            <para>First try to make your own qmail distribution and we will
            see if it is right for such project ;-).</para>
          </answer>
        </qandaentry>
      </qandadiv>
    </qandaset>
  </sect1>

  <sect1>
    <title>Installation procedure</title>

    <qandaset>
      <qandadiv>
        <qandaentry>
          <question>
            <para><filename>configure</filename> script does not understand
            passed options.</para>
          </question>

          <answer>
            <para>The problem is probably the getopt implementation. Check if
            you are using at least getopt 1.1.3 from util-linux
            package.</para>
          </answer>
        </qandaentry>

        <qandaentry>
          <question>
            <para>Database initialization fails.</para>
          </question>

          <answer>
            <para>Check if you passed good options to
            <filename>initdb-mysql</filename> script - in particular database
            administrator password.</para>
          </answer>
        </qandaentry>
      </qandadiv>
    </qandaset>
  </sect1>

  <sect1>
    <title>Life with Helios qmail</title>

    <qandaset>
      <qandadiv>
        <qandaentry>
          <question>
            <para>I am trying to use some script and I get no output.</para>
          </question>

          <answer>
            <para>First of all, be sure that this script is intended to be
            used by users (eg. it is not a script executed by some system
            services).</para>

            <para>Then, try to comment line containg
            <literal>error_reporting(0);</literal> in this script and see the
            output. If this does not help, try to use
            <literal>error_reporting(E_ALL);</literal>. Also check error
            reporting settings in your <filename>php.ini</filename>
            file.</para>
          </answer>
        </qandaentry>

        <qandaentry>
          <question>
            <para>After starting Helios qmail I get</para>

            <screen>1244 ? &nbsp; &nbsp; &nbsp; &nbsp;S &nbsp; &nbsp; &nbsp;0:00 &nbsp;| &nbsp; \_ supervise qmail-send
2546 ? &nbsp; &nbsp; &nbsp; &nbsp;Z &nbsp; &nbsp; &nbsp;0:00 &nbsp;| &nbsp; | &nbsp; \_ [qmail-send] &lt;defunct&gt;</screen>

            <para>in the proccess list and SMTP service drops connection just
            after connecting to it.</para>
          </question>

          <answer>
            <para>This is caused by no connection between Helios qmail and
            your database. Check if your database is up and running (connect
            to it and try to execute some commands on Helios qmail accounts)
            and if you configured <emphasis>connectionstring</emphasis> and
            <emphasis>popconnectionstring</emphasis> properly in
            <filename>/var/qmail/control/qmailconfig</filename> file.</para>
          </answer>
        </qandaentry>

        <qandaentry>
          <question>
            <para>I get something like</para>

            <screen>Content-type: text/html
X-Powered-By: PHP/5.0.0RC1</screen>

            <para>in mail logs or after connecting to SMTP service.</para>
          </question>

          <answer>
            <para>You have installed PHP in CGI mode, which is wrong.
            Reinstall it as CLI and then check if <command>php
            --version</command> contains "CLI".</para>
          </answer>
        </qandaentry>

        <qandaentry>
          <question>
            <para>New mail notification <emphasis>script</emphasis> is not
            working.</para>
          </question>

          <answer>
            <para>Check if you have installed <emphasis
            role="bold">Mail_Mime</emphasis> library from PEAR
            properly.</para>
          </answer>
        </qandaentry>

        <qandaentry>
          <question>
            <para>I get something like</para>

            <screen>delivery 40: deferral:
status: local 0/10 remote 0/20</screen>

            <para>in mail logs.</para>
          </question>

          <answer>
            <para>You have not installed <emphasis
            role="bold">Mail_Mime</emphasis> library properly. Be sure to do
            it and add path to PEAR libraries in
            <filename>php.ini</filename>`s
            <emphasis>include_path</emphasis>.</para>
          </answer>
        </qandaentry>
      </qandadiv>
    </qandaset>
  </sect1>

  <sect1>
    <title>Other questions</title>

    <qandaset>
      <qandadiv>
        <qandaentry>
          <question>
            <para>Why I am not allowed to make a binary package of Helios
            qmail?</para>
          </question>

          <answer>
            <para>Because it bundles with qmail source code, which is not free
            software (in GNU meaning). Rest of the package is licensed under
            GNU GPL.</para>
          </answer>
        </qandaentry>

        <qandaentry>
          <question>
            <para>I have found an awful english error in documentation!</para>
          </question>

          <answer>
            <para>Please let me know, I know that my English is not best. I am
            just waiting for corrections.</para>
          </answer>
        </qandaentry>

        <qandaentry>
          <question>
            <para>Why "Helios qmail"?</para>
          </question>

          <answer>
            <para>Because it derive from the Helios project.</para>
          </answer>
        </qandaentry>
      </qandadiv>
    </qandaset>
  </sect1>
</article>