Index: openacs-4/packages/acs-core-docs/www/install-qmail.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-qmail.html,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/install-qmail.html 31 Oct 2003 15:57:34 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/install-qmail.html 5 Nov 2003 11:48:10 -0000 1.10 @@ -1,7 +1,17 @@ -Install qmail (OPTIONAL)

Install qmail (OPTIONAL)

Qmail is a Mail Transfer Agent. It handles incoming and outgoing mail. Install qmail if you want your OpenACS server to send and receive mail, and you don't want to use an alternate MTA.

  1. Install ucspi.�This program handles incoming tcp connections. - Download ucspi and install it.

    Red Hat 9.0: put

    #include <errno.h>

    as the first line of error.h. More information)

    [root@yourserver root]# cd /usr/local/src
    -[root@yourserver src]# tar xzf /tmp/ucspi-tcp-0.88.tar.gz
    -[root@yourserver src]# cd ucspi-tcp-0.88
    +Install qmail (OPTIONAL)

    Install qmail (OPTIONAL)

    Qmail is a Mail Transfer Agent. It handles incoming and + outgoing mail. Install qmail if you want your OpenACS server to + send and receive mail, and you don't want to use an alternate + MTA.

    Red Hat 9: all djb tools (qmail, daemontools, ucspi) will + fail to compile in Red Hat 9 because of changes to glibc (patches)

    1. Install ucspi.�This program handles incoming tcp connections. + Download ucspi and install it.

      [root@yourserver root]# cd /usr/local/src
      +[root@yourserver src]# wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
      +[root@yourserver src]# tar xzf ucspi-tcp-0.88.tar.gz
      +
      cd /usr/local/src 
      +wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
      +tar xzf ucspi-tcp-0.88.tar.gz 

      Red Hat 9 only

      wget http://moni.csi.hu/pub/glibc-2.3.1/ucspi-tcp-0.88.errno.patch
      +cd ucspi-tcp-0.88
      +patch -p1 <../ucspi-tcp-0.88.errno.patch
      +cd ..

      All platforms continue:

      [root@yourserver src]# cd ucspi-tcp-0.88
       [root@yourserver ucspi-tcp-0.88]# make
       ( cat warn-auto.sh; \
       echo 'main="$1"; shift'; \
      @@ -12,16 +22,15 @@
       ./install
       ./instcheck
       [root@yourserver ucspi-tcp-0.88]#
      -
      cd /usr/local/src 
      -tar xzf /tmp/ucspi-tcp-0.88.tar.gz 
      +
      
       cd ucspi-tcp-0.88 
       make 
       make setup check

      Verify that ucspi-tcp was installed successfully by running the tcpserver program which is part of ucspi-tcp:

      [root@yourserver ucspi-tcp-0.88]# tcpserver
       tcpserver: usage: tcpserver [ -1UXpPhHrRoOdDqQv ] [ -c limit ] [ -x rules.cdb ] [ -B banner ] [ -g gid ] [ -u uid
       ] [ -b backlog ] [ -l localname ] [ -t timeout ] host port program
       [root@yourserver ucspi-tcp-0.88]#
      -

      +

      (I'm not sure if this next step is 100% necessary, but when I skip it I get problems. If you get the error 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) then you need to do this.) AOLServer sends outgoing mail via the ns_sendmail command, which pipes a command to the sendmail executable. Or, in our @@ -35,14 +44,21 @@ send outgoing mail.

      [root@yourserver ucspi-tcp-0.88]# cp /tmp/openacs-5.0.0a4/packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp
       [root@yourserver ucspi-tcp-0.88]# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
       
      cp /tmp/openacs-5.0.0a4/packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp 
      -tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp 
    2. Install Qmail.�

      Download qmail, - set up the standard supporting users and build the binaries:

      Red Hat 9.0: Put -

      #include <errno.h>

      -as the first line of - /usr/local/src/qmail-1.03/error.h. - More - information

      [root@yourserver root]# cd /usr/local/src
      -[root@yourserver src]# tar xzf /tmp/qmail-1.03.tar.gz
      +tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp 
  2. Install Qmail.�

    Download qmail, + set up the standard supporting users and build the binaries:

    [root@yourserver root]# cd /usr/local/src
    +[root@yourserver src]# wget http://www.qmail.org/netqmail-1.04.tar.gz
    +[root@yourserver src]# tar xzf netqmail-1.04.tar.gz
    +--15:04:11--  http://www.qmail.org/netqmail-1.04.tar.gz
    +           => `netqmail-1.04.tar.gz'
    +Resolving www.qmail.org... done.
    +Connecting to www.qmail.org[192.203.178.37]:80... connected.
    +HTTP request sent, awaiting response... 200 OK
    +Length: 242,310 [application/x-gunzip]
    +
    +88% [===============================>     ] 214,620       22.93K/s ETA 00:01
    +
    +15:04:21 (24.04 KB/s) - `netqmail-1.04.tar.gz' saved [242310/242310]
    +
     [root@yourserver src]# mkdir /var/qmail
     [root@yourserver src]# groupadd nofiles
     [root@yourserver src]# useradd -g nofiles -d /var/qmail/alias alias
    @@ -53,16 +69,28 @@
     [root@yourserver src]# useradd -g qmail -d /var/qmail qmailq
     [root@yourserver src]# useradd -g qmail -d /var/qmail qmailr
     [root@yourserver src]# useradd -g qmail -d /var/qmail qmails
    -[root@yourserver src]# cd qmail-1.03
    -[root@yourserver qmail-1.03]# make setup check
    +[root@yourserver src]# cd netqmail-1.04
    +[root@yourserver netqmail-1.04]# ./collate.sh
    +
    +You should see 7 lines of text below.  If you see anything
    +else, then something might be wrong.
    +[1] Extracting qmail-1.03...
    +[2] Patching qmail-1.03 into netqmail-1.04.  Look for errors below:
    +     20
    +[4] The previous line should say 20 if you used GNU patch.
    +[5] Renaming qmail-1.03 to netqmail-1.04...
    +[6] Continue installing qmail using the instructions found at:
    +[7] http://www.lifewithqmail.org/lwq.html#installation
    +[root@yourserver netqmail-1.04]# cd netqmail-1.04
    +[root@yourserver netqmail-1.04]# make setup check
     ( cat warn-auto.sh; \
     echo CC=\'`head -1 conf-cc`\'; \
     (many lines omitted)
     ./install
     ./instcheck
    -[root@yourserver qmail-1.03]#
     
    cd /usr/local/src 
    -tar xzf /tmp/qmail-1.03.tar.gz 
    +wget http://www.qmail.org/netqmail-1.04.tar.gz
    +tar xzf netqmail-1.04.tar.gz
     mkdir /var/qmail 
     groupadd nofiles 
     useradd -g nofiles -d /var/qmail/alias alias 
    @@ -73,8 +101,10 @@
     useradd -g qmail -d /var/qmail qmailq 
     useradd -g qmail -d /var/qmail qmailr 
     useradd -g qmail -d /var/qmail qmails
    -cd qmail-1.03 
    -make setup check

    Replace sendmail with qmail's wrapper.

    [root@yourserver qmail-1.03]# rm -f /usr/bin/sendmail /usr/sbin/sendmail
    +cd netqmail-1.04
    +./collate.sh
    +cd netqmail-1.04
    +make setup check

    Replace sendmail with qmail's wrapper.

    [root@yourserver qmail-1.03]# rm -f /usr/bin/sendmail /usr/sbin/sendmail
     [root@yourserver qmail-1.03]# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
     [root@yourserver qmail-1.03]#
     
    rm -f /usr/bin/sendmail /usr/sbin/sendmail
    @@ -96,7 +126,7 @@
     
    cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root 
     chmod 644 ~alias/.qmail* 
     /var/qmail/bin/maildirmake ~alias/Maildir/ 
    -chown -R alias.nofiles /var/qmail/alias/Maildir

    Configure qmail to use the Maildir delivery format +chown -R alias.nofiles /var/qmail/alias/Maildir

    Configure qmail to use the Maildir delivery format (instead of mbox), and install a version of the qmail startup script modified to use Maildir.

    [root@yourserver alias]# echo "./Maildir" > /var/qmail/bin/.qmail
     [root@yourserver alias]# cp /tmp/openacs-5.0.0a4/packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc
     [root@yourserver alias]# chmod 755 /var/qmail/rc
    @@ -143,7 +173,7 @@
     chmod 755 /var/qmail/supervise/qmail-smtpd/run
     chmod 755 /var/qmail/supervise/qmail-smtpd/log/run
     ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service
    -

    Wait ten seconds or so, and then verify that that the four qmail processes are running. If uptimes are 1 second, this may indicate broken scripts that are continuously restarting. In that case, start debugging by checking permissions.

    [root@yourserver root]# qmailctl stat
    +

    Wait ten seconds or so, and then verify that that the four qmail processes are running. If uptimes don't rise above 1 second, this may indicate broken scripts that are continuously restarting. In that case, start debugging by checking permissions.

    [root@yourserver root]# qmailctl stat
     /service/qmail-send: up (pid 32700) 430 seconds
     /service/qmail-send/log: up (pid 32701) 430 seconds
     /service/qmail-smtpd: up (pid 32704) 430 seconds