Subject: XTND XMIT mods for qmail-pop3d

From: Steve Simitzis <[email-masked]>
Date: Mon, 12 Jan 1998 18:48:22 -0800 (PST)

XTND XMIT mods for qmail-pop3d

Greetings. I present these mods/patches for review, use, and posting to the
QMail website. The bottom of this message contains a shar archive. To
extract, save this message to a file. Delete everything above the line that
says #!/bin/sh. Finally, make the file executable (chmod +x works nicely),
and execute it. This will make a directory containing the diff to
qmail-pop3d.c, a couple additional files to add to your qmail tree, a piece
of Makefile, and a README. Also, there's a complete, fully patched
qmail-pop3d.c in case you're not up for wrestling with patch(1).

This code was written by me and is being presented on behalf of my company,
Critical Path, Inc. <http://www.criticalpath.net>, the premier email hosting
and outsourcing service on the Internet. Neither Critical Path nor myself
(Steve Simitzis) will provide or guarantee any support or liability for use
of this patch and any associated code. Although this update has been
thoroughly tested and approved by our rough-and-tough QA department, please
note: use at your own risk! Also, feel free to use, modify, or redistribute
any original code, as long as the license (distributed as a commented banner
in the patch file and in the README) is included in unmodified form. The 
license simply reiterates this paragraph.

Any comments or questions can be directed to:
[email-masked] or
[email-masked]

Background:

With all the talk on the qmail list about SMTP relaying and the new anti-spam
RFC draft, I thought it was time to re-visit XTND XMIT as another solution to
the problem. My philosophy has always been that SMTP is *not* and was never
intended to be a client protocol. The lack of user authentication is a  clear
indication of this design. In the old days (in Internet years,  anyway :),
mail clients were UNIX MUA's, which required authentication  via the normal
login mechanisms, and SMTP was only used to transport mail from one server
to another.

The anti-spam draft is available at:
ftp://ds.internic.net/internet-drafts/draft-lindberg-anti-spam-mta-01.txt

With the popularization of POP based mail clients, people essentially
became their own little trusted mail servers. Well, we're at the point
where everyone can't be trusted anymore, and it's time that mail clients
used a *client* protocol that takes advantage of true user-level
authentication. XTND XMIT should be this protocol, as there already
is commercial and freeware support, along with an RFC proposal.

A thorough description of XMIT can be found at:
http://musicm.mcgill.ca/~MSI/HTTP/pop3xtndxmit.html

Patches:

This patch to qmail-pop3d.c takes advantage of a couple patches on
www.qmail.org. These patches have already been built-in and rewritten to
work with qmail-pop3d.c, so there's no reason to download and apply them
(except for qmail-pop3d.diff from Hartgers and Sirl patch). This section
is included to give credit to the original authors.

- message size limits from Michael Shields.
  http://www.qmail.org/smtpmaxsize-patch.1

- \r\n or \n support (in case there are dumb clients out there) from John
  Saunders.
  ftp://ftp.nlc.net.au/pub/linux/mail/qmail/qmail-smtpd-newline.patch

- Status/UIDL headers and cur/new support from Bart Hartgers and Franz Sirl.
  http://homepages.munich.netsurf.de/Franz.Sirl/qmail-pop3d.diff
  This patch should be applied to a clean version of qmail-pop3d.c

Some code features:

- Support for future XTND commands is also available; simply add a new
  function pointer into the xtndcmd array.
- The smtpmaxsize control file (and also env variable) control both
  both SMTP and POP XMIT uniformly.
- Received headers will take on the following form:

  Received: from ppp33.sf.isp.net (HELO steve) (192.168.134.33)
   by pop.domain.com with POP3 XMIT; 29 Dec 1997 04:44:12 -0800

  This looks similar to the Received header produced by qmail-smtpd. Note
  that "HELO" now displays the POP username in the header. Useful for
  tracking which user sent the message from your system. (In case someone
  decides to spam). This also means that you will have to run qmail-popup
  from tcpserver, or wrap it in tcp-env.
- This implementation of XMIT calls qmail-inject to do its dirty work. So
  To:, CC:, and BCC: headers are handled properly.
- Lots of code is reused from qmail-smtpd.c and qmail.c to insure that
  everything works consistently.

The code:

Please extract the following code from this file using the instructions
at the top of this message. Enjoy!

Steve

-- 
Steve Simitzis | [email-masked] || [email-masked] | "Hup!" - R.Crumb
 | simitzis /sim' - i - jees/ (n) an unpronounceable string of random letters |
    |  Critical Path, Inc.  ||  RFC822 or Fight!  ||  saturn5 Productions  |
            | operators are standing by : 415-282-9979 (H/VM->P) |

------------- Cut Here ------- >8 --

#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1998-01-12 00:17 PST by <steve@castro>.
# Source directory was `/home/steve'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#  14533 -r--r--r-- xmit/qmail-pop3d.c
#  72639 -r--r--r-- xmit/Makefile
#   1192 -r--r--r-- xmit/qi_open.c
#    133 -r--r--r-- xmit/qi_open.h
#   5086 -r--r--r-- xmit/README
#   7207 -r--r--r-- xmit/qmail-pop3d-xmit.patch
#   1664 -r--r--r-- xmit/Makefile.patch
#
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
  if test "$gettext_dir" = FAILED && test -f $dir/gettext \
     && ($dir/gettext --version >/dev/null 2>&1)
  then
    set `$dir/gettext --version 2>&1`
    if test "$3" = GNU
    then
      gettext_dir=$dir
    fi
  fi
  if test "$locale_dir" = FAILED && test -f $dir/shar \
     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
  then
    locale_dir=`$dir/shar --print-text-domain-dir`
  fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
  echo=echo
else
  TEXTDOMAINDIR=$locale_dir
  export TEXTDOMAINDIR
  TEXTDOMAIN=sharutils
  export TEXTDOMAIN
  echo="$gettext_dir/gettext -s"
fi
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
else
  shar_touch=:
  echo
  $echo 'WARNING: not restoring timestamps.  Consider getting and'
  $echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 1231235999 $$.touch
#
if mkdir _sh25856; then
  $echo 'x -' 'creating lock directory'
else
  $echo 'failed to create lock directory'
  exit 1
fi
# ============= xmit/qmail-pop3d.c ==============
if test ! -d 'xmit'; then
  $echo 'x -' 'creating directory' 'xmit'
  mkdir 'xmit'
fi
if test -f 'xmit/qmail-pop3d.c' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'xmit/qmail-pop3d.c' '(file already exists)'
else
  $echo 'x -' extracting 'xmit/qmail-pop3d.c' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmit/qmail-pop3d.c' &&
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <unistd.h>
#include "direntry.h"
#include "sig.h"
#include "getln.h"
#include "stralloc.h"
#include "substdio.h"
#include "alloc.h"
#include "datetime.h"
#include "prot.h"
#include "open.h"
#include "prioq.h"
#include "scan.h"
#include "fmt.h"
#include "error.h"
#include "str.h"
#include "exit.h"
#include "now.h"
#include "readwrite.h"
#include "qmail.h"
#include "qi_open.h"
#include "env.h"
#include "received.h"
X
/* 
X  XTND XMIT support by Steve Simitzis 12/29/1997
X  Portions of this code: (c) 1997-1998 Critical Path, Inc.
X  http://www.criticalpath.net
X
X  Neither Critical Path nor myself (Steve Simitzis) will provide or 
X  guarantee any support or liability for use of this patch and any 
X  associated code. Although this update has been thoroughly tested and 
X  approved by our rough-and-tough QA department, please note: use at 
X  your own risk! Also, feel free to use, modify, or redistribute any 
X  original code, as long as this license is included in unmodified form.
X
X  If you find any of this useful, please drop me a line:
X  [email-masked] / [email-masked]
*/
X
struct qmail qqt;
X
/*
X * Define to include a "Status: " header in the mail that reflects whether
X * the mail has been read.
X */
X
#define USE_STATUS_HEADER
X
/*
X * Define to include a "X-UIDL: " header to help some clients.
X */
X
#define USE_XUIDL_HEADER
X
int timeout = 1200;
unsigned long maxsize = (unsigned long) -1;
X
char ssoutbuf[1024];
substdio ssout = SUBSTDIO_FDBUF(write,1,ssoutbuf,sizeof(ssoutbuf));
X
int timeoutread(fd,buf,n) int fd; char *buf; int n;
{
X int r; int saveerrno;
X alarm(timeout);
X r = read(fd,buf,n); saveerrno = errno;
X alarm(0);
X errno = saveerrno; return r;
}
X
char ssinbuf[128];
substdio ssin = SUBSTDIO_FDBUF(timeoutread,0,ssinbuf,sizeof(ssinbuf));
X
X
void die() { _exit(0); }
void puts(s) char *s;
{
X if (substdio_puts(&ssout,s) == -1) die();
}
void flush()
{
X if (substdio_flush(&ssout) == -1) die();
}
void err(s) char *s;
{
X puts("-ERR ");
X puts(s);
X puts("\r\n");
X if (substdio_flush(&ssout) == -1) die();
}
void die_nomem() { err("out of memory"); die(); }
void die_prot() { err("protection problem"); die(); }
void die_nomaildir() { err("this user has no $HOME/Maildir"); die(); }
void die_xmit() { err("bad message format from client"); die(); }
X
void err_syntax() { err("syntax error"); }
void err_unimpl() { err("unimplemented"); }
void err_deleted() { err("already deleted"); }
void err_nozero() { err("messages are counted from 1"); }
void err_toobig() { err("not that many messages"); }
void err_nosuch() { err("unable to open that message"); }
void err_nounlink() { err("unable to unlink all deleted messages"); }
void err_rename() { err("unable to move message from new/ to cur/"); }
void err_qqt() { err("unable to send message"); }
void err_maxsize() { err("message exceeds maximum size"); }
X
void okay() { puts("+OK \r\n"); flush(); }
void okay_xmitready() { puts("+OK start sending message now\r\n"); flush(); }
void okay_xmitsent() { puts("+OK message sent\r\n"); flush(); }
void pop3_last() { puts("+OK 0\r\n"); flush(); }
X
X
stralloc dataline = {0};
X
stralloc filenames = {0};
prioq pq = {0};
stralloc newname = {0};
X
char *remoteip;
char *remotehost;
char *remoteinfo;
char *local;
char *mailuser;
X
struct message
X {
X  int flagdeleted;
X  int flagread;
X  unsigned long size;
X  char *fn;
X }
*m;
int numm;
X
substdio ssmsg; char ssmsgbuf[1024];
X
void getcontrols()
{
X if (control_init() == -1) die();
X if (control_readint(&maxsize,"control/smtpmaxsize") == -1) die();
}
X
void getenvs()
{
X char *maxsize_env;
X
X if (maxsize_env = env_get("MAXSIZE")) scan_ulong(maxsize_env,&maxsize);
X remoteip = env_get("TCPREMOTEIP");
X if (!remoteip) remoteip = "unknown";
X local = env_get("TCPLOCALHOST");
X if (!local) local = env_get("TCPLOCALIP");
X if (!local) local = "unknown";
X remotehost = env_get("TCPREMOTEHOST");
X if (!remotehost) remotehost = "unknown";
X remoteinfo = env_get("TCPREMOTEINFO");
X mailuser = env_get("QMAILUSER");
X if (!mailuser) mailuser = env_get("MAILUSER");
X if (!mailuser) mailuser = env_get("USER");
X if (!mailuser) mailuser = env_get("LOGNAME");
}
X
void retr_blast(ssfrom,limit,i)
substdio *ssfrom;
unsigned long limit;
int i;
{
X int match;
X int inheaders = 1;
X
X for (;;)
X  {
X   if (getln(ssfrom,&dataline,&match,'\n') != 0) die();
X   if (!match && !dataline.len) break;
X   if (match) --dataline.len; /* no way to pass this info over POP */
X   if (limit) if (!inheaders) if (!--limit) break;
X   if (!dataline.len)
X    {
X     /* add our status notification here... */
#ifdef USE_STATUS_HEADER
X     if (inheaders)
X      {
X       if (m[i].flagread)
X         substdio_put(&ssout,"Status: RO\r\n",12);
X       else
X         substdio_put(&ssout,"Status:  U\r\n",12);
X      }
#endif
#ifdef USE_XUIDL_HEADER
X     if (inheaders)
X      {
X       substdio_put(&ssout,"X-UIDL: ",8);
X       substdio_put(&ssout,m[i].fn+4,str_chr(m[i].fn+4,':') ? str_chr(m[i].fn+4,':') : str_chr(m[i].fn+4,0));
X       substdio_put(&ssout,"\r\n",2);
X      }
#endif
X     inheaders = 0;
X    }	
X   else
X     if (dataline.s[0] == '.')
X       substdio_put(&ssout,".",1);
X   if (substdio_put(&ssout,dataline.s,dataline.len) == -1) die();
X   if (substdio_put(&ssout,"\r\n",2) == -1) die();
X   if (!match) break;
X  }
X if (substdio_put(&ssout,"\r\n.\r\n",5) == -1) die();
X if (substdio_flush(&ssout) == -1) die();
}
X
void xmit_blast(ssfrom,maxsize)
substdio *ssfrom;
int *maxsize;
{
X char ch;
X int state;
X int seencr;
X
X state = 1;
X
X for (;;)
X  {
X   if (substdio_get(ssfrom,&ch,1) <= 0) die();
X   if (ch == '\n')
X    {
X     if (seencr == 0)
X      {
X       substdio_seek(ssfrom,-1);
X       ch = '\r';
X      }
X    }
X   if (ch == '\r') seencr = 1;
X   else seencr = 0;
X
X   switch(state)
X    {
X     case 0:
X       if (ch == '\n') die_xmit();
X       if (ch == '\r') { state = 4; continue; }
X       break;
X     case 1: /* \r\n */
X       if (ch == '\n') die_xmit();
X       if (ch == '.') { state = 2; continue; }
X       if (ch == '\r') { state = 4; continue; }
X       state = 0;
X       break;
X     case 2: /* \r\n + . */
X       if (ch == '\n') die_xmit();
X       if (ch == '\r') { state = 3; continue; }
X       state = 0;
X       break;
X     case 3: /* \r\n + .\r */
X       if (ch == '\n') return;
X       qmail_put(&qqt,".\r",2);
X       if (ch == '\r') { state = 4; continue; }
X       state = 0;
X       break;
X     case 4: /* + \r */
X       if (ch == '\n') { state = 1; break; }
X       if (ch != '\r') { qmail_put(&qqt,"\r",1); state = 0; }
X    }
X   switch (*maxsize)
X    {
X     case 0: /* already full */
X       break;
X     default:
X       (*maxsize)--;
X       /* fall through */
X     case (unsigned long) -1: /* no limit */
X       qmail_put(&qqt,&ch,1);
X    }
X  }
}
X
void getlist()
{
X unsigned long pos;
X datetime_sec time;
X DIR *dir;
X direntry *d;
X struct prioq_elt pe;
X struct stat st;
X int i;
X
X numm = 0;
X
X time = now();
X
X if (dir = opendir("tmp"))
X  {
X   while (d = readdir(dir))
X    {
X     if (str_equal(d->d_name,".")) continue;
X     if (str_equal(d->d_name,"..")) continue;
X     if (!stralloc_copys(&newname,"tmp/")) die_nomem();
X     if (!stralloc_cats(&newname,d->d_name)) die_nomem();
X     if (!stralloc_0(&newname)) die_nomem();
X     if (stat(newname.s,&st) == 0)
X       if (time > st.st_atime + 129600)
X	 unlink(newname.s);
X    }
X   closedir(dir);
X  }
X
X if (!stralloc_copys(&filenames,"")) die_nomem();
X
X if (dir = opendir("new"))
X  {
X   while (d = readdir(dir))
X    {
X     if (str_equal(d->d_name,".")) continue;
X     if (str_equal(d->d_name,"..")) continue;
X     pos = filenames.len;
X     if (!stralloc_cats(&filenames,"new/")) die_nomem();
X     if (!stralloc_cats(&filenames,d->d_name)) die_nomem();
X     if (!stralloc_0(&filenames)) die_nomem();
X     if (stat(filenames.s + pos,&st) == 0)
X      {
X       pe.dt = st.st_mtime;
X       pe.id = pos;
X       if (!prioq_insert(&pq,&pe)) die_nomem();
X       ++numm;
X      }
X    }
X   closedir(dir);
X  }
X
X if (dir = opendir("cur"))
X  {
X   while (d = readdir(dir))
X    {
X     if (str_equal(d->d_name,".")) continue;
X     if (str_equal(d->d_name,"..")) continue;
X     pos = filenames.len;
X     if (!stralloc_cats(&filenames,"cur/")) die_nomem();
X     if (!stralloc_cats(&filenames,d->d_name)) die_nomem();
X     if (!stralloc_0(&filenames)) die_nomem();
X     if (stat(filenames.s + pos,&st) == 0)
X      {
X       pe.dt = st.st_mtime;
X       pe.id = pos;
X       if (!prioq_insert(&pq,&pe)) die_nomem();
X       ++numm;
X      }
X    }
X   closedir(dir);
X  }
X
X m = (struct message *) alloc(numm * sizeof(struct message));
X if (!m) die_nomem();
X
X for (i = 0;i < numm;++i)
X  {
X   if (!prioq_min(&pq,&pe)) { numm = i; break; }
X   prioq_delmin(&pq);
X   m[i].fn = filenames.s + pe.id;
X   m[i].flagdeleted = 0;
X   m[i].flagread = (m[i].fn[0]=='c');
X   if (stat(m[i].fn,&st) == -1)
X     m[i].size = 0;
X   else
X    {
#ifdef USE_STATUS_HEADER
X     m[i].size = st.st_size + 12; /* account for the 'NEW' status header */
#else
X     m[i].size = st.st_size ;
#endif
#ifdef USE_XUIDL_HEADER
X     /* account for the 'X-UIDL' status header */
X     m[i].size += (str_chr(m[i].fn,':') ? str_chr(m[i].fn,':') : str_chr(m[i].fn,0) ) + 6;
#endif
X    }
X  }
}
X
char foo[FMT_ULONG];
X
void printint(u) unsigned int u;
{
X foo[fmt_uint(foo,u)] = 0;
X puts(foo);
X puts(" ");
}
X
void printlong(u) unsigned long u;
{
X foo[fmt_uint(foo,u)] = 0;
X puts(foo);
X puts("\r\n");
}
X
void printfn(fn) char *fn;
{
X int cpos;
X char csave;
X cpos = str_chr(fn, ':');
X csave = fn[cpos];
X fn[cpos] = 0;
X puts(fn + 4);
X puts("\r\n");
X fn[cpos] = csave;
}
X
void pop3_stat()
{
X int i;
X unsigned long total;
X
X total = 0;
X for (i = 0;i < numm;++i) if (!m[i].flagdeleted) total += m[i].size;
X puts("+OK ");
X printint(numm);
X printlong(total);
X flush();
}
X
void pop3_rset()
{
X int i;
X for (i = 0;i < numm;++i) m[i].flagdeleted = 0;
X okay();
}
X
void pop3_quit()
{
X int i;
X for (i = 0;i < numm;++i)
X  {
X   if (m[i].flagdeleted)
X    {
X     if (unlink(m[i].fn) == -1) err_nounlink();
X    }
X   else
X    {
X     if ((m[i].flagread) && (m[i].fn[0]!='c'))
X      {
X       if (!stralloc_copys(&newname,"cur/")) die_nomem();
X       if (!stralloc_cats(&newname,m[i].fn+4)) die_nomem();
X       if (!stralloc_cats(&newname,":2,S")) die_nomem();
X       if (!stralloc_0(&newname)) die_nomem();
X       if (rename( m[i].fn, newname.s )==-1) err_rename();
X      }
X    }
X  }
X okay();
X die();
}
X
int msgno(arg) char *arg;
{
X unsigned long u;
X if (!arg) { err_syntax(); return -1; }
X if (!scan_ulong(arg,&u)) { err_syntax(); return -1; }
X if (!u) { err_nozero(); return -1; }
X --u;
X if (u >= numm) { err_toobig(); return -1; }
X if (m[u].flagdeleted) { err_deleted(); return -1; }
X return u;
}
X
void pop3_dele(arg) char *arg;
{
X int i;
X
X i = msgno(arg);
X if (i == -1) return;
X m[i].flagdeleted = 1;
X okay();
}
X
void dolisting(arg,flaguidl) char *arg; int flaguidl;
{
X unsigned int i;
X
X if (arg)
X  {
X   i = msgno(arg);
X   if (i == -1) return;
X   puts("+OK ");
X   printint(i + 1);
X   if (flaguidl) printfn(m[i].fn); else printlong(m[i].size);
X  }
X else
X  {
X   okay();
X
X   for (i = 0;i < numm;++i)
X     if (!m[i].flagdeleted)
X      {
X       printint(i + 1);
X       if (flaguidl) printfn(m[i].fn); else printlong(m[i].size);
X      }
X   puts(".\r\n");
X  }
X flush();
}
X
void pop3_uidl(arg) char *arg; { dolisting(arg,1); }
void pop3_list(arg) char *arg; { dolisting(arg,0); }
X
void do_send(arg,updateread) 
char *arg;
int updateread;
{
X int i;
X unsigned long limit;
X int fd;
X
X i = msgno(arg);
X if (i == -1) return;
X
X arg += scan_ulong(arg,&limit);
X while (*arg == ' ') ++arg;
X if (scan_ulong(arg,&limit)) ++limit; else limit = 0;
X
X fd = open_read(m[i].fn);
X if (fd == -1) { err_nosuch(); return; }
X okay();
X substdio_fdbuf(&ssmsg,read,fd,ssmsgbuf,sizeof(ssmsgbuf));
X retr_blast(&ssmsg,limit,i);
X close(fd);
X if (updateread) m[i].flagread=1;
}
X
void pop3_top( arg ) char *arg; { do_send(arg,0); }
void pop3_retr( arg ) char *arg; { do_send(arg,1); }
X
void xtnd_doit();
X
void pop3_xtnd( arg ) 
char *arg; 
{ 
X if(!arg) { err_unimpl(); return; }
X xtnd_doit(arg);
}
X
void xtnd_xmit()
{
X unsigned long maxsize2 = maxsize;
X int r;
X
X if (qi_open(&qqt) == -1) { err_qqt(); return; }
X okay_xmitready();
X
X received(&qqt,"POP3 XMIT", local,remoteip,remotehost,remoteinfo,mailuser);
X xmit_blast(&ssin,&maxsize2);
X
X if (!maxsize2) qmail_fail(&qqt);
X r = qi_close(&qqt);
X if (!r) { okay_xmitsent(); return; }
X if (!maxsize2) { err_maxsize(); return; }
X
X switch(r)
X  {
X   case QMAIL_WAITPID: err("qi waitpid surprise (#4.3.0)"); return;
X   case QMAIL_CRASHED: err("qi crashed (#4.3.0)"); return;
X   case QI_TEMP: err("qi system error (#4.3.0)"); return;
X   case QI_PERM: err("qi system error (#5.5.1)"); return;
X   default: err("qi internal error (#4.3.0)"); return;
X  }
}
X
static struct { void (*fun)(); char *text; } pop3cmd[] = {
X  { pop3_quit, "quit" }
, { pop3_stat, "stat" }
, { pop3_list, "list" }
, { pop3_uidl, "uidl" }
, { pop3_dele, "dele" }
, { pop3_retr, "retr" }
, { pop3_rset, "rset" }
, { pop3_last, "last" }
, { pop3_top, "top" }
, { pop3_xtnd, "xtnd" }
, { okay, "noop" }
, { 0, 0 }
};
X
static struct { void (*fun)(); char *text; } xtndcmd[] = {
X  { xtnd_xmit, "xmit" }
, { 0, 0 }
};
X
void pop3_doit(cmd)
char *cmd;
{
X int i;
X int j;
X char ch;
X
X for (i = 0;pop3cmd[i].fun;++i)
X  {
X   for (j = 0;ch = pop3cmd[i].text[j];++j)
X     if ((cmd[j] != ch) && (cmd[j] != ch - 32))
X       break;
X   if (!ch)
X     if (!cmd[j] || (cmd[j] == ' '))
X      {
X       while (cmd[j] == ' ') ++j;
X       if (!cmd[j])
X         pop3cmd[i].fun((char *) 0);
X       else
X         pop3cmd[i].fun(cmd + j);
X       return;
X      }
X  }
X err_unimpl();
}
X
void xtnd_doit(cmd)
char *cmd;
{
X int i;
X int j;
X char ch;
X
X for (i = 0;xtndcmd[i].fun;++i)
X  {
X   for (j = 0;ch = xtndcmd[i].text[j];++j)
X     if ((cmd[j] != ch) && (cmd[j] != ch - 32))
X       break;
X   if (!ch)
X     if (!cmd[j] || (cmd[j] == ' '))
X      {
X       while (cmd[j] == ' ') ++j;
X       if (!cmd[j])
X         xtndcmd[i].fun((char *) 0);
X       else
X         xtndcmd[i].fun(cmd + j);
X       return;
X      }
X  }
X err_unimpl();
}
X
void main(argc,argv)
int argc;
char **argv;
{
X static stralloc cmd = {0};
X int match;
X
X sig_alarmcatch(die);
X sig_pipeignore();
X
X if (!argv[1]) die_nomaildir();
X if (chdir(argv[1]) == -1) die_nomaildir();
X
X getenvs();
X getcontrols();
X
X getlist();
X
X okay();
X
X for (;;)
X  {
X   if (getln(&ssin,&cmd,&match,'\n') == -1) die();
X   if (!match) die();
X   if (cmd.len == 0) die();
X   if (cmd.s[--cmd.len] != '\n') die();
X   if ((cmd.len > 0) && (cmd.s[cmd.len - 1] == '\r')) --cmd.len;
X   cmd.s[cmd.len++] = 0;
X   pop3_doit(cmd.s);
X  }
}
SHAR_EOF
  $shar_touch -am 0111232598 'xmit/qmail-pop3d.c' &&
  chmod 0444 'xmit/qmail-pop3d.c' ||
  $echo 'restore of' 'xmit/qmail-pop3d.c' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'xmit/qmail-pop3d.c:' 'MD5 check failed'
3905d38fd68820960068ec5cf1b7205b  xmit/qmail-pop3d.c
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'xmit/qmail-pop3d.c'`"
    test 14533 -eq "$shar_count" ||
    $echo 'xmit/qmail-pop3d.c:' 'original size' '14533,' 'current size' "$shar_count!"
  fi
fi
# ============= xmit/Makefile ==============
if test -f 'xmit/Makefile' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'xmit/Makefile' '(file already exists)'
else
  $echo 'x -' extracting 'xmit/Makefile' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmit/Makefile' &&
SHELL=/bin/sh
X
default: it
X
addresses.0: \
addresses.5
X	nroff -man addresses.5 > addresses.0
X
alloc.a: \
makelib alloc.o alloc_re.o
X	./makelib alloc.a alloc.o alloc_re.o
X
alloc.o: \
compile alloc.c alloc.h alloc.c error.h alloc.c
X	./compile alloc.c
X
alloc_re.o: \
compile alloc_re.c alloc.h alloc_re.c byte.h alloc_re.c
X	./compile alloc_re.c
X
auto-ccld.sh: \
conf-cc conf-ld warn-auto.sh
X	( cat warn-auto.sh; \
X	echo CC=\'`head -1 conf-cc`\'; \
X	echo LD=\'`head -1 conf-ld`\' \
X	) > auto-ccld.sh
X
auto-gid: \
load auto-gid.o substdio.a error.a str.a fs.a
X	./load auto-gid substdio.a error.a str.a fs.a 
X
auto-gid.o: \
compile auto-gid.c auto-gid.c auto-gid.c subfd.h substdio.h subfd.h \
auto-gid.c substdio.h substdio.h auto-gid.c readwrite.h auto-gid.c \
exit.h auto-gid.c scan.h auto-gid.c fmt.h auto-gid.c
X	./compile auto-gid.c
X
auto-int: \
load auto-int.o substdio.a error.a str.a fs.a
X	./load auto-int substdio.a error.a str.a fs.a 
X
auto-int.o: \
compile auto-int.c substdio.h auto-int.c readwrite.h auto-int.c \
exit.h auto-int.c scan.h auto-int.c fmt.h auto-int.c
X	./compile auto-int.c
X
auto-int8: \
load auto-int8.o substdio.a error.a str.a fs.a
X	./load auto-int8 substdio.a error.a str.a fs.a 
X
auto-int8.o: \
compile auto-int8.c substdio.h auto-int8.c readwrite.h auto-int8.c \
exit.h auto-int8.c scan.h auto-int8.c fmt.h auto-int8.c
X	./compile auto-int8.c
X
auto-str: \
load auto-str.o substdio.a error.a str.a
X	./load auto-str substdio.a error.a str.a 
X
auto-str.o: \
compile auto-str.c substdio.h auto-str.c readwrite.h auto-str.c \
exit.h auto-str.c
X	./compile auto-str.c
X
auto-uid: \
load auto-uid.o substdio.a error.a str.a fs.a
X	./load auto-uid substdio.a error.a str.a fs.a 
X
auto-uid.o: \
compile auto-uid.c auto-uid.c auto-uid.c subfd.h substdio.h subfd.h \
auto-uid.c substdio.h substdio.h auto-uid.c readwrite.h auto-uid.c \
exit.h auto-uid.c scan.h auto-uid.c fmt.h auto-uid.c
X	./compile auto-uid.c
X
auto_break.c: \
auto-str conf-break
X	./auto-str auto_break \
X	"`head -1 conf-break`" > auto_break.c
X
auto_break.o: \
compile auto_break.c
X	./compile auto_break.c
X
auto_patrn.c: \
auto-int8 conf-patrn
X	./auto-int8 auto_patrn `head -1 conf-patrn` > auto_patrn.c
X
auto_patrn.o: \
compile auto_patrn.c
X	./compile auto_patrn.c
X
auto_qmail.c: \
auto-str conf-qmail
X	./auto-str auto_qmail `head -1 conf-qmail` > auto_qmail.c
X
auto_qmail.o: \
compile auto_qmail.c
X	./compile auto_qmail.c
X
auto_spawn.c: \
auto-int conf-spawn
X	./auto-int auto_spawn `head -1 conf-spawn` > auto_spawn.c
X
auto_spawn.o: \
compile auto_spawn.c
X	./compile auto_spawn.c
X
auto_split.c: \
auto-int conf-split
X	./auto-int auto_split `head -1 conf-split` > auto_split.c
X
auto_split.o: \
compile auto_split.c
X	./compile auto_split.c
X
auto_uids.c: \
auto-uid auto-gid conf-users conf-groups
X	( ./auto-uid auto_uida `head -1 conf-users` \
X	&&./auto-uid auto_uidd `head -2 conf-users | tail -1` \
X	&&./auto-uid auto_uidl `head -3 conf-users | tail -1` \
X	&&./auto-uid auto_uido `head -4 conf-users | tail -1` \
X	&&./auto-uid auto_uidp `head -5 conf-users | tail -1` \
X	&&./auto-uid auto_uidq `head -6 conf-users | tail -1` \
X	&&./auto-uid auto_uidr `head -7 conf-users | tail -1` \
X	&&./auto-uid auto_uids `head -8 conf-users | tail -1` \
X	&&./auto-gid auto_gidq `head -1 conf-groups` \
X	&&./auto-gid auto_gidn `head -2 conf-groups | tail -1` \
X	) > auto_uids.c
X
auto_uids.o: \
compile auto_uids.c
X	./compile auto_uids.c
X
auto_usera.c: \
auto-str conf-users
X	./auto-str auto_usera `head -1 conf-users` > auto_usera.c
X
auto_usera.o: \
compile auto_usera.c
X	./compile auto_usera.c
X
byte_chr.o: \
compile byte_chr.c byte.h byte_chr.c
X	./compile byte_chr.c
X
byte_copy.o: \
compile byte_copy.c byte.h byte_copy.c
X	./compile byte_copy.c
X
byte_cr.o: \
compile byte_cr.c byte.h byte_cr.c
X	./compile byte_cr.c
X
byte_diff.o: \
compile byte_diff.c byte.h byte_diff.c
X	./compile byte_diff.c
X
byte_rchr.o: \
compile byte_rchr.c byte.h byte_rchr.c
X	./compile byte_rchr.c
X
byte_zero.o: \
compile byte_zero.c byte.h byte_zero.c
X	./compile byte_zero.c
X
case.a: \
makelib case_diffb.o case_diffs.o case_lowerb.o case_lowers.o \
case_starts.o
X	./makelib case.a case_diffb.o case_diffs.o case_lowerb.o \
X	case_lowers.o case_starts.o
X
case_diffb.o: \
compile case_diffb.c case.h case_diffb.c
X	./compile case_diffb.c
X
case_diffs.o: \
compile case_diffs.c case.h case_diffs.c
X	./compile case_diffs.c
X
case_lowerb.o: \
compile case_lowerb.c case.h case_lowerb.c
X	./compile case_lowerb.c
X
case_lowers.o: \
compile case_lowers.c case.h case_lowers.c
X	./compile case_lowers.c
X
case_starts.o: \
compile case_starts.c case.h case_starts.c
X	./compile case_starts.c
X
cdb.a: \
makelib cdb_hash.o cdb_unpack.o cdb_seek.o
X	./makelib cdb.a cdb_hash.o cdb_unpack.o cdb_seek.o
X
cdb_hash.o: \
compile cdb_hash.c cdb.h uint32.h cdb.h cdb_hash.c
X	./compile cdb_hash.c
X
cdb_seek.o: \
compile cdb_seek.c cdb_seek.c cdb_seek.c cdb.h uint32.h cdb.h \
cdb_seek.c
X	./compile cdb_seek.c
X
cdb_unpack.o: \
compile cdb_unpack.c cdb.h uint32.h cdb.h cdb_unpack.c
X	./compile cdb_unpack.c
X
cdbmake.a: \
makelib cdbmake_pack.o cdbmake_hash.o cdbmake_add.o
X	./makelib cdbmake.a cdbmake_pack.o cdbmake_hash.o \
X	cdbmake_add.o
X
cdbmake_add.o: \
compile cdbmake_add.c cdbmake.h uint32.h cdbmake.h cdbmake_add.c
X	./compile cdbmake_add.c
X
cdbmake_hash.o: \
compile cdbmake_hash.c cdbmake.h uint32.h cdbmake.h cdbmake_hash.c
X	./compile cdbmake_hash.c
X
cdbmake_pack.o: \
compile cdbmake_pack.c cdbmake.h uint32.h cdbmake.h cdbmake_pack.c
X	./compile cdbmake_pack.c
X
cdbmss.o: \
compile cdbmss.c readwrite.h cdbmss.c seek.h cdbmss.c alloc.h \
cdbmss.c cdbmss.h cdbmake.h uint32.h cdbmake.h cdbmss.h substdio.h \
cdbmss.h cdbmss.c
X	./compile cdbmss.c
X
check: \
it man conf-qmail
X	./qmail-hier | ./instcheck `head -1 conf-qmail`
X
chkshsgr: \
load chkshsgr.o
X	./load chkshsgr 
X
chkshsgr.o: \
compile chkshsgr.c exit.h chkshsgr.c
X	./compile chkshsgr.c
X
chkspawn: \
load chkspawn.o substdio.a error.a str.a fs.a auto_spawn.o
X	./load chkspawn substdio.a error.a str.a fs.a auto_spawn.o 
X
chkspawn.o: \
compile chkspawn.c substdio.h chkspawn.c subfd.h substdio.h \
substdio.h subfd.h chkspawn.c fmt.h chkspawn.c select.h select.h \
select.h select.h chkspawn.c exit.h chkspawn.c auto_spawn.h \
chkspawn.c
X	./compile chkspawn.c
X
clean: \
TARGETS
X	rm -f `cat TARGETS`
X
coe.o: \
compile coe.c coe.c coe.h coe.c
X	./compile coe.c
X
compile: \
make-compile warn-auto.sh systype
X	( cat warn-auto.sh; ./make-compile "`cat systype`" ) > \
X	compile
X	chmod 755 compile
X
condredirect: \
load condredirect.o qmail.o fd.a sig.a wait.a seek.a env.a alloc.a \
substdio.a error.a str.a auto_qmail.o
X	./load condredirect qmail.o fd.a sig.a wait.a seek.a env.a \
X	alloc.a substdio.a error.a str.a auto_qmail.o 
X
condredirect.0: \
condredirect.1
X	nroff -man condredirect.1 > condredirect.0
X
condredirect.o: \
compile condredirect.c sig.h condredirect.c readwrite.h \
condredirect.c exit.h condredirect.c env.h condredirect.c error.h \
condredirect.c fork.h condredirect.c wait.h condredirect.c seek.h \
condredirect.c qmail.h substdio.h qmail.h condredirect.c stralloc.h \
gen_alloc.h stralloc.h condredirect.c subfd.h substdio.h substdio.h \
subfd.h condredirect.c substdio.h substdio.h condredirect.c
X	./compile condredirect.c
X
constmap.o: \
compile constmap.c constmap.h constmap.c alloc.h constmap.c case.h \
constmap.c
X	./compile constmap.c
X
control.o: \
compile control.c readwrite.h control.c open.h control.c getln.h \
control.c stralloc.h gen_alloc.h stralloc.h control.c substdio.h \
control.c error.h control.c control.h control.c alloc.h control.c \
scan.h control.c
X	./compile control.c
X
date822fmt.o: \
compile date822fmt.c datetime.h date822fmt.c fmt.h date822fmt.c \
date822fmt.h date822fmt.c
X	./compile date822fmt.c
X
datemail: \
warn-auto.sh datemail.sh conf-qmail conf-break conf-split
X	cat warn-auto.sh datemail.sh \
X	| sed s}QMAIL}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPLIT}"`head -1 conf-split`"}g \
X	> datemail
X	chmod 755 datemail
X
datetime.a: \
makelib datetime.o datetime_un.o
X	./makelib datetime.a datetime.o datetime_un.o
X
datetime.o: \
compile datetime.c datetime.h datetime.c
X	./compile datetime.c
X
datetime_un.o: \
compile datetime_un.c datetime.h datetime_un.c
X	./compile datetime_un.c
X
direntry.h: \
compile trydrent.c direntry.h1 direntry.h2
X	( ./compile trydrent.c >/dev/null 2>&1 \
X	&& cat direntry.h2 || cat direntry.h1 ) > direntry.h
X	rm -f trydrent.o
X
dns.lib: \
tryrsolv.c compile load socket.lib dns.o ipalloc.o ip.o stralloc.a \
alloc.a error.a fs.a str.a
X	( ( ./compile tryrsolv.c && ./load tryrsolv dns.o \
X	ipalloc.o ip.o stralloc.a alloc.a error.a fs.a str.a \
X	-lresolv `cat socket.lib` ) >/dev/null 2>&1 \
X	&& echo -lresolv || exit 0 ) > dns.lib
X	rm -f tryrsolv.o tryrsolv
X
dns.o: \
compile dns.c dns.c dns.c dns.c dns.c dns.c dns.c dns.c ip.h dns.c \
ipalloc.h ip.h ip.h ipalloc.h gen_alloc.h ipalloc.h dns.c fmt.h dns.c \
alloc.h dns.c str.h dns.c stralloc.h gen_alloc.h stralloc.h dns.c \
dns.h dns.c case.h dns.c
X	./compile dns.c
X
dnscname: \
load dnscname.o dns.o dnsdoe.o ip.o ipalloc.o stralloc.a alloc.a \
substdio.a error.a str.a fs.a dns.lib socket.lib
X	./load dnscname dns.o dnsdoe.o ip.o ipalloc.o stralloc.a \
X	alloc.a substdio.a error.a str.a fs.a  `cat dns.lib` `cat \
X	socket.lib`
X
dnscname.o: \
compile dnscname.c substdio.h dnscname.c subfd.h substdio.h \
substdio.h subfd.h dnscname.c stralloc.h gen_alloc.h stralloc.h \
dnscname.c dns.h dnscname.c dnsdoe.h dnscname.c readwrite.h \
dnscname.c exit.h dnscname.c
X	./compile dnscname.c
X
dnsdoe.o: \
compile dnsdoe.c substdio.h dnsdoe.c subfd.h substdio.h substdio.h \
subfd.h dnsdoe.c exit.h dnsdoe.c dns.h dnsdoe.c dnsdoe.h dnsdoe.c
X	./compile dnsdoe.c
X
dnsfq: \
load dnsfq.o dns.o dnsdoe.o ip.o ipalloc.o stralloc.a alloc.a \
substdio.a error.a str.a fs.a dns.lib socket.lib
X	./load dnsfq dns.o dnsdoe.o ip.o ipalloc.o stralloc.a \
X	alloc.a substdio.a error.a str.a fs.a  `cat dns.lib` `cat \
X	socket.lib`
X
dnsfq.o: \
compile dnsfq.c substdio.h dnsfq.c subfd.h substdio.h substdio.h \
subfd.h dnsfq.c stralloc.h gen_alloc.h stralloc.h dnsfq.c dns.h \
dnsfq.c dnsdoe.h dnsfq.c ip.h dnsfq.c ipalloc.h ip.h ip.h ipalloc.h \
gen_alloc.h ipalloc.h dnsfq.c exit.h dnsfq.c
X	./compile dnsfq.c
X
dnsip: \
load dnsip.o dns.o dnsdoe.o ip.o ipalloc.o stralloc.a alloc.a \
substdio.a error.a str.a fs.a dns.lib socket.lib
X	./load dnsip dns.o dnsdoe.o ip.o ipalloc.o stralloc.a \
X	alloc.a substdio.a error.a str.a fs.a  `cat dns.lib` `cat \
X	socket.lib`
X
dnsip.o: \
compile dnsip.c substdio.h dnsip.c subfd.h substdio.h substdio.h \
subfd.h dnsip.c stralloc.h gen_alloc.h stralloc.h dnsip.c dns.h \
dnsip.c dnsdoe.h dnsip.c ip.h dnsip.c ipalloc.h ip.h ip.h ipalloc.h \
gen_alloc.h ipalloc.h dnsip.c exit.h dnsip.c
X	./compile dnsip.c
X
dnsmxip: \
load dnsmxip.o dns.o dnsdoe.o ip.o ipalloc.o now.o stralloc.a alloc.a \
substdio.a error.a str.a fs.a dns.lib socket.lib
X	./load dnsmxip dns.o dnsdoe.o ip.o ipalloc.o now.o \
X	stralloc.a alloc.a substdio.a error.a str.a fs.a  `cat \
X	dns.lib` `cat socket.lib`
X
dnsmxip.o: \
compile dnsmxip.c substdio.h dnsmxip.c subfd.h substdio.h substdio.h \
subfd.h dnsmxip.c stralloc.h gen_alloc.h stralloc.h dnsmxip.c fmt.h \
dnsmxip.c dns.h dnsmxip.c dnsdoe.h dnsmxip.c ip.h dnsmxip.c ipalloc.h \
ip.h ip.h ipalloc.h gen_alloc.h ipalloc.h dnsmxip.c now.h datetime.h \
now.h dnsmxip.c exit.h dnsmxip.c
X	./compile dnsmxip.c
X
dnsptr: \
load dnsptr.o dns.o dnsdoe.o ip.o ipalloc.o stralloc.a alloc.a \
substdio.a error.a str.a fs.a dns.lib socket.lib
X	./load dnsptr dns.o dnsdoe.o ip.o ipalloc.o stralloc.a \
X	alloc.a substdio.a error.a str.a fs.a  `cat dns.lib` `cat \
X	socket.lib`
X
dnsptr.o: \
compile dnsptr.c substdio.h dnsptr.c subfd.h substdio.h substdio.h \
subfd.h dnsptr.c stralloc.h gen_alloc.h stralloc.h dnsptr.c str.h \
dnsptr.c scan.h dnsptr.c dns.h dnsptr.c dnsdoe.h dnsptr.c ip.h \
dnsptr.c exit.h dnsptr.c
X	./compile dnsptr.c
X
dot-qmail.0: \
dot-qmail.5
X	nroff -man dot-qmail.5 > dot-qmail.0
X
dot-qmail.5: \
dot-qmail.9 conf-break conf-spawn
X	cat dot-qmail.9 \
X	| sed s}QMAILHOME}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPAWN}"`head -1 conf-spawn`"}g \
X	> dot-qmail.5
X
elq: \
warn-auto.sh elq.sh conf-qmail conf-break conf-split
X	cat warn-auto.sh elq.sh \
X	| sed s}QMAIL}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPLIT}"`head -1 conf-split`"}g \
X	> elq
X	chmod 755 elq
X
env.a: \
makelib env.o envread.o
X	./makelib env.a env.o envread.o
X
env.o: \
compile env.c str.h env.c alloc.h env.c env.h env.c
X	./compile env.c
X
envelopes.0: \
envelopes.5
X	nroff -man envelopes.5 > envelopes.0
X
envread.o: \
compile envread.c env.h envread.c str.h envread.c
X	./compile envread.c
X
error.a: \
makelib error.o error_str.o error_temp.o
X	./makelib error.a error.o error_str.o error_temp.o
X
error.o: \
compile error.c error.c error.h error.c
X	./compile error.c
X
error_str.o: \
compile error_str.c error_str.c error.h error_str.c
X	./compile error_str.c
X
error_temp.o: \
compile error_temp.c error_temp.c error.h error_temp.c
X	./compile error_temp.c
X
fd.a: \
makelib fd_copy.o fd_move.o
X	./makelib fd.a fd_copy.o fd_move.o
X
fd_copy.o: \
compile fd_copy.c fd_copy.c fd.h fd_copy.c
X	./compile fd_copy.c
X
fd_move.o: \
compile fd_move.c fd.h fd_move.c
X	./compile fd_move.c
X
fifo.o: \
compile fifo.c fifo.c fifo.c hasmkffo.h fifo.c fifo.h fifo.c
X	./compile fifo.c
X
find-systype: \
find-systype.sh auto-ccld.sh
X	cat auto-ccld.sh find-systype.sh > find-systype
X	chmod 755 find-systype
X
fmt_str.o: \
compile fmt_str.c fmt.h fmt_str.c
X	./compile fmt_str.c
X
fmt_strn.o: \
compile fmt_strn.c fmt.h fmt_strn.c
X	./compile fmt_strn.c
X
fmt_uint.o: \
compile fmt_uint.c fmt.h fmt_uint.c
X	./compile fmt_uint.c
X
fmt_uint0.o: \
compile fmt_uint0.c fmt.h fmt_uint0.c
X	./compile fmt_uint0.c
X
fmt_ulong.o: \
compile fmt_ulong.c fmt.h fmt_ulong.c
X	./compile fmt_ulong.c
X
fmtqfn.o: \
compile fmtqfn.c fmtqfn.h fmtqfn.c fmt.h fmtqfn.c auto_split.h \
fmtqfn.c
X	./compile fmtqfn.c
X
forgeries.0: \
forgeries.7
X	nroff -man forgeries.7 > forgeries.0
X
fork.h: \
compile load tryvfork.c fork.h1 fork.h2
X	( ( ./compile tryvfork.c && ./load tryvfork ) >/dev/null \
X	2>&1 \
X	&& cat fork.h2 || cat fork.h1 ) > fork.h
X	rm -f tryvfork.o tryvfork
X
forward: \
load forward.o stralloc.a alloc.a qmail.o fd.a wait.a sig.a env.a \
substdio.a error.a str.a auto_qmail.o
X	./load forward stralloc.a alloc.a qmail.o fd.a wait.a \
X	sig.a env.a substdio.a error.a str.a auto_qmail.o 
X
forward.0: \
forward.1
X	nroff -man forward.1 > forward.0
X
forward.o: \
compile forward.c sig.h forward.c readwrite.h forward.c exit.h \
forward.c env.h forward.c qmail.h substdio.h qmail.h forward.c \
stralloc.h gen_alloc.h stralloc.h forward.c subfd.h substdio.h \
substdio.h subfd.h forward.c substdio.h substdio.h forward.c
X	./compile forward.c
X
fs.a: \
makelib fmt_str.o fmt_strn.o fmt_uint.o fmt_uint0.o fmt_ulong.o \
scan_ulong.o scan_8long.o scan_nbblong.o
X	./makelib fs.a fmt_str.o fmt_strn.o fmt_uint.o fmt_uint0.o \
X	fmt_ulong.o scan_ulong.o scan_8long.o scan_nbblong.o
X
getln.a: \
makelib getln.o getln2.o
X	./makelib getln.a getln.o getln2.o
X
getln.o: \
compile getln.c substdio.h getln.c byte.h getln.c stralloc.h \
gen_alloc.h stralloc.h getln.c getln.h getln.c
X	./compile getln.c
X
getln2.o: \
compile getln2.c substdio.h getln2.c stralloc.h gen_alloc.h \
stralloc.h getln2.c byte.h getln2.c getln.h getln2.c
X	./compile getln2.c
X
getopt.a: \
makelib subgetopt.o sgetopt.o
X	./makelib getopt.a subgetopt.o sgetopt.o
X
gfrom.o: \
compile gfrom.c str.h gfrom.c gfrom.h gfrom.c
X	./compile gfrom.c
X
hasflock.h: \
tryflock.c compile load
X	( ( ./compile tryflock.c && ./load tryflock ) >/dev/null \
X	2>&1 \
X	&& echo \#define HASFLOCK 1 || exit 0 ) > hasflock.h
X	rm -f tryflock.o tryflock
X
hasmkffo.h: \
trymkffo.c compile load
X	( ( ./compile trymkffo.c && ./load trymkffo ) >/dev/null \
X	2>&1 \
X	&& echo \#define HASMKFIFO 1 || exit 0 ) > hasmkffo.h
X	rm -f trymkffo.o trymkffo
X
hasnpbg1.h: \
trynpbg1.c compile load open.h open.a fifo.h fifo.o select.h
X	( ( ./compile trynpbg1.c \
X	&& ./load trynpbg1 fifo.o open.a && ./trynpbg1 ) \
X	>/dev/null 2>&1 \
X	&& echo \#define HASNAMEDPIPEBUG1 1 || exit 0 ) > \
X	hasnpbg1.h
X	rm -f trynpbg1.o trynpbg1
X
hassalen.h: \
trysalen.c compile
X	( ./compile trysalen.c >/dev/null 2>&1 \
X	&& echo \#define HASSALEN 1 || exit 0 ) > hassalen.h
X	rm -f trysalen.o
X
hassgact.h: \
trysgact.c compile load
X	( ( ./compile trysgact.c && ./load trysgact ) >/dev/null \
X	2>&1 \
X	&& echo \#define HASSIGACTION 1 || exit 0 ) > hassgact.h
X	rm -f trysgact.o trysgact
X
hassgprm.h: \
trysgprm.c compile load
X	( ( ./compile trysgprm.c && ./load trysgprm ) >/dev/null \
X	2>&1 \
X	&& echo \#define HASSIGPROCMASK 1 || exit 0 ) > hassgprm.h
X	rm -f trysgprm.o trysgprm
X
hasshsgr.h: \
chkshsgr warn-shsgr tryshsgr.c compile load
X	./chkshsgr || ( cat warn-shsgr; exit 1 )
X	( ( ./compile tryshsgr.c \
X	&& ./load tryshsgr && ./tryshsgr ) >/dev/null 2>&1 \
X	&& echo \#define HASSHORTSETGROUPS 1 || exit 0 ) > \
X	hasshsgr.h
X	rm -f tryshsgr.o tryshsgr
X
haswaitp.h: \
trywaitp.c compile load
X	( ( ./compile trywaitp.c && ./load trywaitp ) >/dev/null \
X	2>&1 \
X	&& echo \#define HASWAITPID 1 || exit 0 ) > haswaitp.h
X	rm -f trywaitp.o trywaitp
X
headerbody.o: \
compile headerbody.c stralloc.h gen_alloc.h stralloc.h headerbody.c \
substdio.h headerbody.c getln.h headerbody.c hfield.h headerbody.c \
headerbody.h headerbody.c
X	./compile headerbody.c
X
hfield.o: \
compile hfield.c hfield.h hfield.c
X	./compile hfield.c
X
hostname: \
load hostname.o substdio.a error.a str.a dns.lib socket.lib
X	./load hostname substdio.a error.a str.a  `cat dns.lib` \
X	`cat socket.lib`
X
hostname.o: \
compile hostname.c substdio.h hostname.c subfd.h substdio.h \
substdio.h subfd.h hostname.c readwrite.h hostname.c exit.h \
hostname.c
X	./compile hostname.c
X
install: \
load install.o fifo.o getln.a strerr.a substdio.a stralloc.a alloc.a \
open.a error.a str.a fs.a
X	./load install fifo.o getln.a strerr.a substdio.a \
X	stralloc.a alloc.a open.a error.a str.a fs.a 
X
install.o: \
compile install.c substdio.h install.c stralloc.h gen_alloc.h \
stralloc.h install.c getln.h install.c readwrite.h install.c exit.h \
install.c open.h install.c error.h install.c strerr.h install.c \
byte.h install.c fifo.h install.c
X	./compile install.c
X
instcheck: \
load instcheck.o getln.a strerr.a substdio.a stralloc.a alloc.a \
error.a str.a fs.a
X	./load instcheck getln.a strerr.a substdio.a stralloc.a \
X	alloc.a error.a str.a fs.a 
X
instcheck.o: \
compile instcheck.c instcheck.c instcheck.c substdio.h instcheck.c \
stralloc.h gen_alloc.h stralloc.h instcheck.c getln.h instcheck.c \
readwrite.h instcheck.c exit.h instcheck.c error.h instcheck.c \
strerr.h instcheck.c byte.h instcheck.c
X	./compile instcheck.c
X
ip.o: \
compile ip.c fmt.h ip.c scan.h ip.c ip.h ip.c
X	./compile ip.c
X
ipalloc.o: \
compile ipalloc.c alloc.h ipalloc.c gen_allocdefs.h gen_allocdefs.h \
gen_allocdefs.h ipalloc.c ip.h ipalloc.c ipalloc.h ip.h ip.h \
ipalloc.h gen_alloc.h ipalloc.h ipalloc.c
X	./compile ipalloc.c
X
ipme.o: \
compile ipme.c ipme.c ipme.c ipme.c ipme.c ipme.c ipme.c ipme.c \
hassalen.h ipme.c byte.h ipme.c ip.h ipme.c ipalloc.h ip.h ip.h \
ipalloc.h gen_alloc.h ipalloc.h ipme.c stralloc.h gen_alloc.h \
stralloc.h ipme.c ipme.h ip.h ip.h ipme.h ipalloc.h ipalloc.h ipme.h \
ipme.c ipme.c
X	./compile ipme.c
X
ipmeprint: \
load ipmeprint.o ipme.o ip.o ipalloc.o stralloc.a alloc.a substdio.a \
error.a str.a fs.a socket.lib
X	./load ipmeprint ipme.o ip.o ipalloc.o stralloc.a alloc.a \
X	substdio.a error.a str.a fs.a  `cat socket.lib`
X
ipmeprint.o: \
compile ipmeprint.c subfd.h substdio.h subfd.h ipmeprint.c substdio.h \
substdio.h ipmeprint.c ip.h ipmeprint.c ipme.h ip.h ip.h ipme.h \
ipalloc.h ip.h ip.h ipalloc.h gen_alloc.h ipalloc.h ipme.h \
ipmeprint.c exit.h ipmeprint.c
X	./compile ipmeprint.c
X
it: \
qmail-local qmail-lspawn qmail-getpw qmail-remote qmail-rspawn \
qmail-clean qmail-send qmail-start splogger qmail-queue qmail-inject \
predate datemail mailsubj qmail-upq qmail-config qmail-showctl \
qmail-newu qmail-pw2u qmail-qread qmail-qstat qmail-tcpto qmail-pop3d \
qmail-popup qmail-qmtpd qmail-smtpd sendmail tcp-env dnscname dnsptr \
dnsip dnsmxip dnsfq hostname ipmeprint qlist qlist2 qreceipt qsmhook \
qbiff forward preline condredirect maildirmake maildir2mbox \
maildirwatch qail elq pinq qmail-hier install instcheck
X
load: \
make-load warn-auto.sh systype
X	( cat warn-auto.sh; ./make-load "`cat systype`" ) > load
X	chmod 755 load
X
lock.a: \
makelib lock_ex.o lock_exnb.o lock_un.o
X	./makelib lock.a lock_ex.o lock_exnb.o lock_un.o
X
lock_ex.o: \
compile lock_ex.c lock_ex.c lock_ex.c lock_ex.c hasflock.h lock_ex.c \
lock.h lock_ex.c
X	./compile lock_ex.c
X
lock_exnb.o: \
compile lock_exnb.c lock_exnb.c lock_exnb.c lock_exnb.c hasflock.h \
lock_exnb.c lock.h lock_exnb.c
X	./compile lock_exnb.c
X
lock_un.o: \
compile lock_un.c lock_un.c lock_un.c lock_un.c hasflock.h lock_un.c \
lock.h lock_un.c
X	./compile lock_un.c
X
maildir.0: \
maildir.5
X	nroff -man maildir.5 > maildir.0
X
maildir.o: \
compile maildir.c maildir.c maildir.c prioq.h datetime.h prioq.h \
gen_alloc.h prioq.h maildir.c env.h maildir.c stralloc.h gen_alloc.h \
stralloc.h maildir.c direntry.h direntry.h direntry.h maildir.c \
datetime.h datetime.h maildir.c now.h datetime.h datetime.h now.h \
maildir.c str.h maildir.c maildir.h strerr.h maildir.h maildir.c
X	./compile maildir.c
X
maildir2mbox: \
load maildir2mbox.o maildir.o prioq.o now.o myctime.o gfrom.o lock.a \
getln.a env.a open.a strerr.a stralloc.a alloc.a substdio.a error.a \
str.a fs.a datetime.a
X	./load maildir2mbox maildir.o prioq.o now.o myctime.o \
X	gfrom.o lock.a getln.a env.a open.a strerr.a stralloc.a \
X	alloc.a substdio.a error.a str.a fs.a datetime.a 
X
maildir2mbox.0: \
maildir2mbox.1
X	nroff -man maildir2mbox.1 > maildir2mbox.0
X
maildir2mbox.o: \
compile maildir2mbox.c readwrite.h maildir2mbox.c prioq.h datetime.h \
prioq.h gen_alloc.h prioq.h maildir2mbox.c env.h maildir2mbox.c \
stralloc.h gen_alloc.h stralloc.h maildir2mbox.c subfd.h substdio.h \
subfd.h maildir2mbox.c substdio.h substdio.h maildir2mbox.c getln.h \
maildir2mbox.c error.h maildir2mbox.c open.h maildir2mbox.c lock.h \
maildir2mbox.c gfrom.h maildir2mbox.c str.h maildir2mbox.c exit.h \
maildir2mbox.c myctime.h maildir2mbox.c maildir.h strerr.h maildir.h \
maildir2mbox.c
X	./compile maildir2mbox.c
X
maildirmake: \
load maildirmake.o substdio.a error.a str.a
X	./load maildirmake substdio.a error.a str.a 
X
maildirmake.0: \
maildirmake.1
X	nroff -man maildirmake.1 > maildirmake.0
X
maildirmake.o: \
compile maildirmake.c subfd.h substdio.h subfd.h maildirmake.c \
substdio.h substdio.h maildirmake.c error.h maildirmake.c exit.h \
maildirmake.c
X	./compile maildirmake.c
X
maildirwatch: \
load maildirwatch.o hfield.o headerbody.o maildir.o prioq.o now.o \
getln.a env.a open.a strerr.a stralloc.a alloc.a substdio.a error.a \
str.a
X	./load maildirwatch hfield.o headerbody.o maildir.o \
X	prioq.o now.o getln.a env.a open.a strerr.a stralloc.a \
X	alloc.a substdio.a error.a str.a 
X
maildirwatch.0: \
maildirwatch.1
X	nroff -man maildirwatch.1 > maildirwatch.0
X
maildirwatch.o: \
compile maildirwatch.c getln.h maildirwatch.c substdio.h \
maildirwatch.c subfd.h substdio.h substdio.h subfd.h maildirwatch.c \
prioq.h datetime.h prioq.h gen_alloc.h prioq.h maildirwatch.c \
stralloc.h gen_alloc.h stralloc.h maildirwatch.c str.h maildirwatch.c \
exit.h maildirwatch.c hfield.h maildirwatch.c readwrite.h \
maildirwatch.c open.h maildirwatch.c headerbody.h maildirwatch.c \
maildir.h strerr.h maildir.h maildirwatch.c
X	./compile maildirwatch.c
X
mailsubj: \
warn-auto.sh mailsubj.sh conf-qmail conf-break conf-split
X	cat warn-auto.sh mailsubj.sh \
X	| sed s}QMAIL}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPLIT}"`head -1 conf-split`"}g \
X	> mailsubj
X	chmod 755 mailsubj
X
mailsubj.0: \
mailsubj.1
X	nroff -man mailsubj.1 > mailsubj.0
X
make-compile: \
make-compile.sh auto-ccld.sh
X	cat auto-ccld.sh make-compile.sh > make-compile
X	chmod 755 make-compile
X
make-load: \
make-load.sh auto-ccld.sh
X	cat auto-ccld.sh make-load.sh > make-load
X	chmod 755 make-load
X
make-makelib: \
make-makelib.sh auto-ccld.sh
X	cat auto-ccld.sh make-makelib.sh > make-makelib
X	chmod 755 make-makelib
X
makelib: \
make-makelib warn-auto.sh systype
X	( cat warn-auto.sh; ./make-makelib "`cat systype`" ) > \
X	makelib
X	chmod 755 makelib
X
man: \
qmail-local.0 qmail-lspawn.0 qmail-getpw.0 qmail-remote.0 \
qmail-rspawn.0 qmail-clean.0 qmail-send.0 qmail-start.0 splogger.0 \
qmail-queue.0 qmail-inject.0 mailsubj.0 qmail-showctl.0 qmail-newu.0 \
qmail-pw2u.0 qmail-qread.0 qmail-qstat.0 qmail-tcpto.0 qmail-pop3d.0 \
qmail-popup.0 qmail-qmtpd.0 qmail-smtpd.0 tcp-env.0 qlist.0 \
qreceipt.0 qbiff.0 forward.0 preline.0 condredirect.0 maildirmake.0 \
maildir2mbox.0 maildirwatch.0 qmail.0 qmail-upgrade.0 qmail-limits.0 \
qmail-log.0 qmail-control.0 qmail-header.0 qmail-users.0 dot-qmail.0 \
qmail-command.0 tcp-environ.0 maildir.0 mbox.0 addresses.0 \
envelopes.0 forgeries.0
X
mbox.0: \
mbox.5
X	nroff -man mbox.5 > mbox.0
X
myctime.o: \
compile myctime.c datetime.h myctime.c fmt.h myctime.c myctime.h \
myctime.c
X	./compile myctime.c
X
ndelay.a: \
makelib ndelay.o ndelay_off.o
X	./makelib ndelay.a ndelay.o ndelay_off.o
X
ndelay.o: \
compile ndelay.c ndelay.c ndelay.c ndelay.h ndelay.c
X	./compile ndelay.c
X
ndelay_off.o: \
compile ndelay_off.c ndelay_off.c ndelay_off.c ndelay.h ndelay_off.c
X	./compile ndelay_off.c
X
newfield.o: \
compile newfield.c fmt.h newfield.c datetime.h newfield.c stralloc.h \
gen_alloc.h stralloc.h newfield.c date822fmt.h newfield.c newfield.h \
stralloc.h stralloc.h newfield.h newfield.c
X	./compile newfield.c
X
now.o: \
compile now.c now.c datetime.h now.c now.h datetime.h datetime.h \
now.h now.c
X	./compile now.c
X
open.a: \
makelib open_append.o open_excl.o open_read.o open_trunc.o \
open_write.o
X	./makelib open.a open_append.o open_excl.o open_read.o \
X	open_trunc.o open_write.o
X
open_append.o: \
compile open_append.c open_append.c open_append.c open.h \
open_append.c
X	./compile open_append.c
X
open_excl.o: \
compile open_excl.c open_excl.c open_excl.c open.h open_excl.c
X	./compile open_excl.c
X
open_read.o: \
compile open_read.c open_read.c open_read.c open.h open_read.c
X	./compile open_read.c
X
open_trunc.o: \
compile open_trunc.c open_trunc.c open_trunc.c open.h open_trunc.c
X	./compile open_trunc.c
X
open_write.o: \
compile open_write.c open_write.c open_write.c open.h open_write.c
X	./compile open_write.c
X
pinq: \
warn-auto.sh pinq.sh conf-qmail conf-break conf-split
X	cat warn-auto.sh pinq.sh \
X	| sed s}QMAIL}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPLIT}"`head -1 conf-split`"}g \
X	> pinq
X	chmod 755 pinq
X
predate: \
load predate.o datetime.a sig.a fd.a wait.a substdio.a error.a str.a \
fs.a
X	./load predate datetime.a sig.a fd.a wait.a substdio.a \
X	error.a str.a fs.a 
X
predate.o: \
compile predate.c predate.c predate.c datetime.h predate.c fork.h \
predate.c wait.h predate.c fd.h predate.c fmt.h predate.c substdio.h \
predate.c subfd.h substdio.h substdio.h subfd.h predate.c readwrite.h \
predate.c exit.h predate.c
X	./compile predate.c
X
preline: \
load preline.o fd.a wait.a sig.a env.a getopt.a substdio.a error.a \
str.a
X	./load preline fd.a wait.a sig.a env.a getopt.a substdio.a \
X	error.a str.a 
X
preline.0: \
preline.1
X	nroff -man preline.1 > preline.0
X
preline.o: \
compile preline.c fd.h preline.c sgetopt.h subgetopt.h sgetopt.h \
preline.c readwrite.h preline.c subfd.h substdio.h subfd.h preline.c \
substdio.h substdio.h preline.c exit.h preline.c fork.h preline.c \
wait.h preline.c env.h preline.c sig.h preline.c error.h preline.c
X	./compile preline.c
X
prioq.o: \
compile prioq.c alloc.h prioq.c gen_allocdefs.h gen_allocdefs.h \
gen_allocdefs.h prioq.c prioq.h datetime.h prioq.h gen_alloc.h \
prioq.h prioq.c
X	./compile prioq.c
X
prot.o: \
compile prot.c hasshsgr.h prot.c prot.h prot.c
X	./compile prot.c
X
qail: \
warn-auto.sh qail.sh conf-qmail conf-break conf-split
X	cat warn-auto.sh qail.sh \
X	| sed s}QMAIL}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPLIT}"`head -1 conf-split`"}g \
X	> qail
X	chmod 755 qail
X
qbiff: \
load qbiff.o headerbody.o hfield.o getln.a env.a open.a stralloc.a \
alloc.a substdio.a error.a str.a
X	./load qbiff headerbody.o hfield.o getln.a env.a open.a \
X	stralloc.a alloc.a substdio.a error.a str.a 
X
qbiff.0: \
qbiff.1
X	nroff -man qbiff.1 > qbiff.0
X
qbiff.o: \
compile qbiff.c qbiff.c qbiff.c qbiff.c readwrite.h qbiff.c \
stralloc.h gen_alloc.h stralloc.h qbiff.c substdio.h qbiff.c subfd.h \
substdio.h substdio.h subfd.h qbiff.c open.h qbiff.c byte.h qbiff.c \
str.h qbiff.c headerbody.h qbiff.c hfield.h qbiff.c env.h qbiff.c \
exit.h qbiff.c
X	./compile qbiff.c
X
qi_open.o: \
compile qi_open.c substdio.h qi_open.c readwrite.h qi_open.c wait.h qi_open.c \
exit.h qi_open.c fork.h qi_open.c fd.h qi_open.c qi_open.h substdio.h \
substdio.h qi_open.h qi_open.c auto_qmail.h qi_open.c
X	./compile qi_open.c
X
qlist: \
load qlist.o headerbody.o hfield.o token822.o qmail.o getln.a env.a \
case.a sig.a fd.a wait.a open.a lock.a stralloc.a alloc.a substdio.a \
error.a str.a auto_qmail.o
X	./load qlist headerbody.o hfield.o token822.o qmail.o \
X	getln.a env.a case.a sig.a fd.a wait.a open.a lock.a \
X	stralloc.a alloc.a substdio.a error.a str.a auto_qmail.o 
X
qlist.0: \
qlist.1
X	nroff -man qlist.1 > qlist.0
X
qlist.o: \
compile qlist.c sig.h qlist.c readwrite.h qlist.c substdio.h qlist.c \
stralloc.h gen_alloc.h stralloc.h qlist.c subfd.h substdio.h \
substdio.h subfd.h qlist.c getln.h qlist.c alloc.h qlist.c str.h \
qlist.c env.h qlist.c hfield.h qlist.c case.h qlist.c token822.h \
gen_alloc.h token822.h qlist.c error.h qlist.c gen_alloc.h qlist.c \
gen_allocdefs.h gen_allocdefs.h gen_allocdefs.h qlist.c headerbody.h \
qlist.c exit.h qlist.c open.h qlist.c lock.h qlist.c qmail.h \
substdio.h substdio.h qmail.h qlist.c qlist.c
X	./compile qlist.c
X
qlist2: \
warn-auto.sh qlist2.sh conf-qmail conf-break conf-split
X	cat warn-auto.sh qlist2.sh \
X	| sed s}QMAIL}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPLIT}"`head -1 conf-split`"}g \
X	> qlist2
X	chmod 755 qlist2
X
qmail-clean: \
load qmail-clean.o fmtqfn.o now.o getln.a sig.a stralloc.a alloc.a \
substdio.a error.a str.a fs.a auto_qmail.o auto_split.o
X	./load qmail-clean fmtqfn.o now.o getln.a sig.a stralloc.a \
X	alloc.a substdio.a error.a str.a fs.a auto_qmail.o \
X	auto_split.o 
X
qmail-clean.0: \
qmail-clean.8
X	nroff -man qmail-clean.8 > qmail-clean.0
X
qmail-clean.o: \
compile qmail-clean.c qmail-clean.c qmail-clean.c readwrite.h \
qmail-clean.c sig.h qmail-clean.c now.h datetime.h now.h \
qmail-clean.c str.h qmail-clean.c direntry.h direntry.h direntry.h \
qmail-clean.c getln.h qmail-clean.c stralloc.h gen_alloc.h stralloc.h \
qmail-clean.c substdio.h qmail-clean.c subfd.h substdio.h substdio.h \
subfd.h qmail-clean.c byte.h qmail-clean.c scan.h qmail-clean.c fmt.h \
qmail-clean.c error.h qmail-clean.c exit.h qmail-clean.c fmtqfn.h \
qmail-clean.c auto_qmail.h qmail-clean.c
X	./compile qmail-clean.c
X
qmail-command.0: \
qmail-command.8
X	nroff -man qmail-command.8 > qmail-command.0
X
qmail-config: \
warn-auto.sh qmail-config.sh conf-qmail conf-break conf-split
X	cat warn-auto.sh qmail-config.sh \
X	| sed s}QMAIL}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPLIT}"`head -1 conf-split`"}g \
X	> qmail-config
X	chmod 755 qmail-config
X
qmail-control.0: \
qmail-control.5
X	nroff -man qmail-control.5 > qmail-control.0
X
qmail-control.5: \
qmail-control.9 conf-break conf-spawn
X	cat qmail-control.9 \
X	| sed s}QMAILHOME}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPAWN}"`head -1 conf-spawn`"}g \
X	> qmail-control.5
X
qmail-getpw: \
load qmail-getpw.o case.a substdio.a error.a str.a fs.a auto_break.o \
auto_usera.o
X	./load qmail-getpw case.a substdio.a error.a str.a fs.a \
X	auto_break.o auto_usera.o 
X
qmail-getpw.0: \
qmail-getpw.8
X	nroff -man qmail-getpw.8 > qmail-getpw.0
X
qmail-getpw.8: \
qmail-getpw.9 conf-break conf-spawn
X	cat qmail-getpw.9 \
X	| sed s}QMAILHOME}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPAWN}"`head -1 conf-spawn`"}g \
X	> qmail-getpw.8
X
qmail-getpw.o: \
compile qmail-getpw.c qmail-getpw.c qmail-getpw.c qmail-getpw.c \
readwrite.h qmail-getpw.c substdio.h qmail-getpw.c subfd.h substdio.h \
substdio.h subfd.h qmail-getpw.c error.h qmail-getpw.c exit.h \
qmail-getpw.c byte.h qmail-getpw.c str.h qmail-getpw.c case.h \
qmail-getpw.c fmt.h qmail-getpw.c auto_usera.h qmail-getpw.c \
auto_break.h qmail-getpw.c qlx.h qmail-getpw.c
X	./compile qmail-getpw.c
X
qmail-header.0: \
qmail-header.5
X	nroff -man qmail-header.5 > qmail-header.0
X
qmail-hier: \
load qmail-hier.o substdio.a error.a str.a fs.a auto_split.o \
auto_uids.o
X	./load qmail-hier substdio.a error.a str.a fs.a \
X	auto_split.o auto_uids.o 
X
qmail-hier.o: \
compile qmail-hier.c subfd.h substdio.h subfd.h qmail-hier.c \
substdio.h substdio.h qmail-hier.c auto_split.h qmail-hier.c \
auto_uids.h qmail-hier.c fmt.h qmail-hier.c
X	./compile qmail-hier.c
X
qmail-inject: \
load qmail-inject.o headerbody.o hfield.o newfield.o quote.o now.o \
control.o date822fmt.o qmail.o fd.a wait.a open.a getln.a sig.a \
getopt.a datetime.a token822.o env.a stralloc.a alloc.a substdio.a \
error.a str.a fs.a auto_qmail.o
X	./load qmail-inject headerbody.o hfield.o newfield.o \
X	quote.o now.o control.o date822fmt.o qmail.o fd.a wait.a \
X	open.a getln.a sig.a getopt.a datetime.a token822.o env.a \
X	stralloc.a alloc.a substdio.a error.a str.a fs.a \
X	auto_qmail.o 
X
qmail-inject.0: \
qmail-inject.8
X	nroff -man qmail-inject.8 > qmail-inject.0
X
qmail-inject.o: \
compile qmail-inject.c sig.h qmail-inject.c substdio.h qmail-inject.c \
stralloc.h gen_alloc.h stralloc.h qmail-inject.c subfd.h substdio.h \
substdio.h subfd.h qmail-inject.c sgetopt.h subgetopt.h sgetopt.h \
qmail-inject.c getln.h qmail-inject.c alloc.h qmail-inject.c str.h \
qmail-inject.c fmt.h qmail-inject.c hfield.h qmail-inject.c \
token822.h gen_alloc.h token822.h qmail-inject.c control.h \
qmail-inject.c env.h qmail-inject.c gen_alloc.h qmail-inject.c \
gen_allocdefs.h gen_allocdefs.h gen_allocdefs.h qmail-inject.c \
error.h qmail-inject.c qmail.h substdio.h substdio.h qmail.h \
qmail-inject.c now.h datetime.h now.h qmail-inject.c exit.h \
qmail-inject.c quote.h qmail-inject.c headerbody.h qmail-inject.c \
auto_qmail.h qmail-inject.c newfield.h stralloc.h stralloc.h \
newfield.h qmail-inject.c
X	./compile qmail-inject.c
X
qmail-limits.0: \
qmail-limits.7
X	nroff -man qmail-limits.7 > qmail-limits.0
X
qmail-limits.7: \
qmail-limits.9 conf-break conf-spawn
X	cat qmail-limits.9 \
X	| sed s}QMAILHOME}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPAWN}"`head -1 conf-spawn`"}g \
X	> qmail-limits.7
X
qmail-local: \
load qmail-local.o qmail.o quote.o now.o gfrom.o myctime.o \
slurpclose.o case.a getln.a getopt.a sig.a open.a seek.a lock.a fd.a \
wait.a env.a stralloc.a alloc.a substdio.a error.a str.a fs.a \
datetime.a auto_qmail.o auto_patrn.o socket.lib
X	./load qmail-local qmail.o quote.o now.o gfrom.o myctime.o \
X	slurpclose.o case.a getln.a getopt.a sig.a open.a seek.a \
X	lock.a fd.a wait.a env.a stralloc.a alloc.a substdio.a \
X	error.a str.a fs.a datetime.a auto_qmail.o auto_patrn.o  \
X	`cat socket.lib`
X
qmail-local.0: \
qmail-local.8
X	nroff -man qmail-local.8 > qmail-local.0
X
qmail-local.o: \
compile qmail-local.c qmail-local.c qmail-local.c readwrite.h \
qmail-local.c sig.h qmail-local.c env.h qmail-local.c byte.h \
qmail-local.c exit.h qmail-local.c fork.h qmail-local.c open.h \
qmail-local.c wait.h qmail-local.c lock.h qmail-local.c seek.h \
qmail-local.c substdio.h qmail-local.c getln.h qmail-local.c subfd.h \
substdio.h substdio.h subfd.h qmail-local.c sgetopt.h subgetopt.h \
sgetopt.h qmail-local.c alloc.h qmail-local.c error.h qmail-local.c \
stralloc.h gen_alloc.h stralloc.h qmail-local.c fmt.h qmail-local.c \
str.h qmail-local.c now.h datetime.h now.h qmail-local.c case.h \
qmail-local.c quote.h qmail-local.c qmail.h substdio.h substdio.h \
qmail.h qmail-local.c slurpclose.h qmail-local.c myctime.h \
qmail-local.c gfrom.h qmail-local.c auto_patrn.h qmail-local.c
X	./compile qmail-local.c
X
qmail-log.0: \
qmail-log.5
X	nroff -man qmail-log.5 > qmail-log.0
X
qmail-lspawn: \
load qmail-lspawn.o spawn.o prot.o slurpclose.o coe.o sig.a wait.a \
case.a cdb.a fd.a open.a stralloc.a alloc.a substdio.a error.a str.a \
fs.a auto_qmail.o auto_uids.o auto_spawn.o
X	./load qmail-lspawn spawn.o prot.o slurpclose.o coe.o \
X	sig.a wait.a case.a cdb.a fd.a open.a stralloc.a alloc.a \
X	substdio.a error.a str.a fs.a auto_qmail.o auto_uids.o \
X	auto_spawn.o 
X
qmail-lspawn.0: \
qmail-lspawn.8
X	nroff -man qmail-lspawn.8 > qmail-lspawn.0
X
qmail-lspawn.o: \
compile qmail-lspawn.c fd.h qmail-lspawn.c wait.h qmail-lspawn.c \
prot.h qmail-lspawn.c substdio.h qmail-lspawn.c stralloc.h \
gen_alloc.h stralloc.h qmail-lspawn.c scan.h qmail-lspawn.c exit.h \
qmail-lspawn.c fork.h qmail-lspawn.c error.h qmail-lspawn.c cdb.h \
uint32.h cdb.h qmail-lspawn.c case.h qmail-lspawn.c slurpclose.h \
qmail-lspawn.c auto_qmail.h qmail-lspawn.c auto_uids.h qmail-lspawn.c \
qlx.h qmail-lspawn.c
X	./compile qmail-lspawn.c
X
qmail-newu: \
load qmail-newu.o cdbmss.o getln.a open.a seek.a cdbmake.a case.a \
stralloc.a alloc.a substdio.a error.a str.a auto_qmail.o
X	./load qmail-newu cdbmss.o getln.a open.a seek.a cdbmake.a \
X	case.a stralloc.a alloc.a substdio.a error.a str.a \
X	auto_qmail.o 
X
qmail-newu.0: \
qmail-newu.8
X	nroff -man qmail-newu.8 > qmail-newu.0
X
qmail-newu.8: \
qmail-newu.9 conf-break conf-spawn
X	cat qmail-newu.9 \
X	| sed s}QMAILHOME}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPAWN}"`head -1 conf-spawn`"}g \
X	> qmail-newu.8
X
qmail-newu.o: \
compile qmail-newu.c stralloc.h gen_alloc.h stralloc.h qmail-newu.c \
subfd.h substdio.h subfd.h qmail-newu.c getln.h qmail-newu.c \
substdio.h substdio.h qmail-newu.c cdbmss.h cdbmake.h uint32.h \
cdbmake.h cdbmss.h substdio.h substdio.h cdbmss.h qmail-newu.c exit.h \
qmail-newu.c readwrite.h qmail-newu.c open.h qmail-newu.c error.h \
qmail-newu.c case.h qmail-newu.c auto_qmail.h qmail-newu.c
X	./compile qmail-newu.c
X
qmail-pop3d: \
load qmail-pop3d.o prioq.o now.o auto_qmail.o qmail.o qi_open.o sig.a open.a \
getln.a stralloc.a alloc.a substdio.a error.a str.a fs.a fd.a wait.a env.a \
control.o received.o date822fmt.o datetime.a
X	./load qmail-pop3d prioq.o now.o auto_qmail.o qmail.o qi_open.o \
X	control.o received.o date822fmt.o datetime.a sig.a \
X	open.a getln.a stralloc.a alloc.a substdio.a error.a env.a fs.a \
X	fd.a wait.a str.a
X
qmail-pop3d.0: \
qmail-pop3d.8
X	nroff -man qmail-pop3d.8 > qmail-pop3d.0
X
qmail-pop3d.o: \
compile qmail-pop3d.c qmail-pop3d.c qmail-pop3d.c direntry.h \
direntry.h direntry.h qmail-pop3d.c sig.h qmail-pop3d.c getln.h \
qmail-pop3d.c stralloc.h gen_alloc.h stralloc.h qmail-pop3d.c \
substdio.h qmail-pop3d.c alloc.h qmail-pop3d.c datetime.h \
qmail-pop3d.c prot.h qmail-pop3d.c open.h qmail-pop3d.c prioq.h \
datetime.h datetime.h prioq.h gen_alloc.h prioq.h qmail-pop3d.c \
scan.h qmail-pop3d.c fmt.h qmail-pop3d.c error.h qmail-pop3d.c str.h \
qmail-pop3d.c exit.h qmail-pop3d.c now.h datetime.h datetime.h now.h \
qmail-pop3d.c readwrite.h qmail-pop3d.c received.h control.h qi_open.h
X	./compile qmail-pop3d.c
X
qmail-popup: \
load qmail-popup.o now.o fd.a sig.a wait.a getln.a stralloc.a alloc.a \
substdio.a error.a str.a fs.a
X	./load qmail-popup now.o fd.a sig.a wait.a getln.a \
X	stralloc.a alloc.a substdio.a error.a str.a fs.a 
X
qmail-popup.0: \
qmail-popup.8
X	nroff -man qmail-popup.8 > qmail-popup.0
X
qmail-popup.o: \
compile qmail-popup.c qmail-popup.c qmail-popup.c fd.h qmail-popup.c \
sig.h qmail-popup.c getln.h qmail-popup.c stralloc.h gen_alloc.h \
stralloc.h qmail-popup.c substdio.h qmail-popup.c subfd.h substdio.h \
substdio.h subfd.h qmail-popup.c alloc.h qmail-popup.c datetime.h \
qmail-popup.c error.h qmail-popup.c wait.h qmail-popup.c str.h \
qmail-popup.c now.h datetime.h datetime.h now.h qmail-popup.c fmt.h \
qmail-popup.c exit.h qmail-popup.c readwrite.h qmail-popup.c
X	./compile qmail-popup.c
X
qmail-pw2u: \
load qmail-pw2u.o constmap.o control.o open.a getln.a case.a getopt.a \
stralloc.a alloc.a substdio.a error.a str.a fs.a auto_usera.o \
auto_break.o auto_qmail.o
X	./load qmail-pw2u constmap.o control.o open.a getln.a \
X	case.a getopt.a stralloc.a alloc.a substdio.a error.a str.a \
X	fs.a auto_usera.o auto_break.o auto_qmail.o 
X
qmail-pw2u.0: \
qmail-pw2u.8
X	nroff -man qmail-pw2u.8 > qmail-pw2u.0
X
qmail-pw2u.8: \
qmail-pw2u.9 conf-break conf-spawn
X	cat qmail-pw2u.9 \
X	| sed s}QMAILHOME}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPAWN}"`head -1 conf-spawn`"}g \
X	> qmail-pw2u.8
X
qmail-pw2u.o: \
compile qmail-pw2u.c qmail-pw2u.c qmail-pw2u.c substdio.h \
qmail-pw2u.c readwrite.h qmail-pw2u.c subfd.h substdio.h substdio.h \
subfd.h qmail-pw2u.c sgetopt.h subgetopt.h sgetopt.h qmail-pw2u.c \
control.h qmail-pw2u.c constmap.h qmail-pw2u.c stralloc.h gen_alloc.h \
stralloc.h qmail-pw2u.c fmt.h qmail-pw2u.c str.h qmail-pw2u.c scan.h \
qmail-pw2u.c open.h qmail-pw2u.c error.h qmail-pw2u.c getln.h \
qmail-pw2u.c auto_break.h qmail-pw2u.c auto_qmail.h qmail-pw2u.c \
auto_usera.h qmail-pw2u.c
X	./compile qmail-pw2u.c
X
qmail-qmtpd: \
load qmail-qmtpd.o control.o constmap.o received.o date822fmt.o now.o \
qmail.o fd.a wait.a datetime.a open.a getln.a sig.a case.a env.a \
stralloc.a alloc.a substdio.a error.a str.a fs.a auto_qmail.o
X	./load qmail-qmtpd control.o constmap.o received.o \
X	date822fmt.o now.o qmail.o fd.a wait.a datetime.a open.a \
X	getln.a sig.a case.a env.a stralloc.a alloc.a substdio.a \
X	error.a str.a fs.a auto_qmail.o 
X
qmail-qmtpd.0: \
qmail-qmtpd.8
X	nroff -man qmail-qmtpd.8 > qmail-qmtpd.0
X
qmail-qmtpd.o: \
compile qmail-qmtpd.c stralloc.h gen_alloc.h stralloc.h qmail-qmtpd.c \
substdio.h qmail-qmtpd.c subfd.h substdio.h substdio.h subfd.h \
qmail-qmtpd.c qmail.h substdio.h substdio.h qmail.h qmail-qmtpd.c \
now.h datetime.h now.h qmail-qmtpd.c str.h qmail-qmtpd.c fmt.h \
qmail-qmtpd.c env.h qmail-qmtpd.c sig.h qmail-qmtpd.c auto_qmail.h \
qmail-qmtpd.c now.h qmail-qmtpd.c datetime.h datetime.h qmail-qmtpd.c \
date822fmt.h qmail-qmtpd.c readwrite.h qmail-qmtpd.c control.h \
qmail-qmtpd.c constmap.h qmail-qmtpd.c received.h qmail-qmtpd.c
X	./compile qmail-qmtpd.c
X
qmail-qread: \
load qmail-qread.o fmtqfn.o readsubdir.o date822fmt.o datetime.a \
open.a getln.a stralloc.a alloc.a substdio.a error.a str.a fs.a \
auto_qmail.o auto_split.o
X	./load qmail-qread fmtqfn.o readsubdir.o date822fmt.o \
X	datetime.a open.a getln.a stralloc.a alloc.a substdio.a \
X	error.a str.a fs.a auto_qmail.o auto_split.o 
X
qmail-qread.0: \
qmail-qread.8
X	nroff -man qmail-qread.8 > qmail-qread.0
X
qmail-qread.o: \
compile qmail-qread.c qmail-qread.c qmail-qread.c stralloc.h \
gen_alloc.h stralloc.h qmail-qread.c substdio.h qmail-qread.c subfd.h \
substdio.h substdio.h subfd.h qmail-qread.c fmt.h qmail-qread.c str.h \
qmail-qread.c getln.h qmail-qread.c fmtqfn.h qmail-qread.c \
readsubdir.h direntry.h direntry.h direntry.h readsubdir.h \
qmail-qread.c auto_qmail.h qmail-qread.c open.h qmail-qread.c \
datetime.h qmail-qread.c date822fmt.h qmail-qread.c readwrite.h \
qmail-qread.c error.h qmail-qread.c exit.h qmail-qread.c
X	./compile qmail-qread.c
X
qmail-qstat: \
warn-auto.sh qmail-qstat.sh conf-qmail conf-break conf-split
X	cat warn-auto.sh qmail-qstat.sh \
X	| sed s}QMAIL}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPLIT}"`head -1 conf-split`"}g \
X	> qmail-qstat
X	chmod 755 qmail-qstat
X
qmail-qstat.0: \
qmail-qstat.8
X	nroff -man qmail-qstat.8 > qmail-qstat.0
X
qmail-queue: \
load qmail-queue.o triggerpull.o fmtqfn.o now.o date822fmt.o \
datetime.a seek.a ndelay.a open.a sig.a alloc.a substdio.a error.a \
str.a fs.a auto_qmail.o auto_split.o auto_uids.o
X	./load qmail-queue triggerpull.o fmtqfn.o now.o \
X	date822fmt.o datetime.a seek.a ndelay.a open.a sig.a \
X	alloc.a substdio.a error.a str.a fs.a auto_qmail.o \
X	auto_split.o auto_uids.o 
X
qmail-queue.0: \
qmail-queue.8
X	nroff -man qmail-queue.8 > qmail-queue.0
X
qmail-queue.o: \
compile qmail-queue.c qmail-queue.c qmail-queue.c readwrite.h \
qmail-queue.c sig.h qmail-queue.c exit.h qmail-queue.c open.h \
qmail-queue.c seek.h qmail-queue.c fmt.h qmail-queue.c alloc.h \
qmail-queue.c substdio.h qmail-queue.c datetime.h qmail-queue.c now.h \
datetime.h datetime.h now.h qmail-queue.c triggerpull.h qmail-queue.c \
extra.h qmail-queue.c auto_qmail.h qmail-queue.c auto_uids.h \
qmail-queue.c date822fmt.h qmail-queue.c fmtqfn.h qmail-queue.c
X	./compile qmail-queue.c
X
qmail-remote: \
load qmail-remote.o control.o constmap.o timeoutread.o timeoutwrite.o \
timeoutconn.o tcpto.o now.o dns.o ip.o ipalloc.o ipme.o quote.o \
ndelay.a case.a sig.a open.a lock.a seek.a getln.a stralloc.a alloc.a \
substdio.a error.a str.a fs.a auto_qmail.o dns.lib socket.lib
X	./load qmail-remote control.o constmap.o timeoutread.o \
X	timeoutwrite.o timeoutconn.o tcpto.o now.o dns.o ip.o \
X	ipalloc.o ipme.o quote.o ndelay.a case.a sig.a open.a \
X	lock.a seek.a getln.a stralloc.a alloc.a substdio.a error.a \
X	str.a fs.a auto_qmail.o  `cat dns.lib` `cat socket.lib`
X
qmail-remote.0: \
qmail-remote.8
X	nroff -man qmail-remote.8 > qmail-remote.0
X
qmail-remote.o: \
compile qmail-remote.c qmail-remote.c qmail-remote.c qmail-remote.c \
qmail-remote.c sig.h qmail-remote.c getln.h qmail-remote.c stralloc.h \
gen_alloc.h stralloc.h qmail-remote.c substdio.h qmail-remote.c \
subfd.h substdio.h substdio.h subfd.h qmail-remote.c scan.h \
qmail-remote.c case.h qmail-remote.c error.h qmail-remote.c \
auto_qmail.h qmail-remote.c control.h qmail-remote.c dns.h \
qmail-remote.c alloc.h qmail-remote.c quote.h qmail-remote.c ip.h \
qmail-remote.c ipalloc.h ip.h ip.h ipalloc.h gen_alloc.h ipalloc.h \
qmail-remote.c ipme.h ip.h ip.h ipme.h ipalloc.h ipalloc.h ipme.h \
qmail-remote.c gen_alloc.h qmail-remote.c gen_allocdefs.h \
gen_allocdefs.h gen_allocdefs.h qmail-remote.c str.h qmail-remote.c \
now.h datetime.h now.h qmail-remote.c exit.h qmail-remote.c \
constmap.h qmail-remote.c tcpto.h qmail-remote.c timeoutconn.h \
qmail-remote.c timeoutread.h qmail-remote.c timeoutwrite.h \
qmail-remote.c
X	./compile qmail-remote.c
X
qmail-rspawn: \
load qmail-rspawn.o spawn.o tcpto_clean.o now.o coe.o sig.a open.a \
seek.a lock.a wait.a fd.a stralloc.a alloc.a substdio.a error.a str.a \
auto_qmail.o auto_uids.o auto_spawn.o
X	./load qmail-rspawn spawn.o tcpto_clean.o now.o coe.o \
X	sig.a open.a seek.a lock.a wait.a fd.a stralloc.a alloc.a \
X	substdio.a error.a str.a auto_qmail.o auto_uids.o \
X	auto_spawn.o 
X
qmail-rspawn.0: \
qmail-rspawn.8
X	nroff -man qmail-rspawn.8 > qmail-rspawn.0
X
qmail-rspawn.o: \
compile qmail-rspawn.c fd.h qmail-rspawn.c wait.h qmail-rspawn.c \
substdio.h qmail-rspawn.c exit.h qmail-rspawn.c fork.h qmail-rspawn.c \
error.h qmail-rspawn.c tcpto.h qmail-rspawn.c
X	./compile qmail-rspawn.c
X
qmail-send: \
load qmail-send.o qsutil.o control.o constmap.o newfield.o prioq.o \
trigger.o fmtqfn.o quote.o now.o readsubdir.o qmail.o date822fmt.o \
datetime.a case.a ndelay.a getln.a wait.a seek.a fd.a sig.a open.a \
lock.a stralloc.a alloc.a substdio.a error.a str.a fs.a auto_qmail.o \
auto_split.o
X	./load qmail-send qsutil.o control.o constmap.o newfield.o \
X	prioq.o trigger.o fmtqfn.o quote.o now.o readsubdir.o \
X	qmail.o date822fmt.o datetime.a case.a ndelay.a getln.a \
X	wait.a seek.a fd.a sig.a open.a lock.a stralloc.a alloc.a \
X	substdio.a error.a str.a fs.a auto_qmail.o auto_split.o 
X
qmail-send.0: \
qmail-send.8
X	nroff -man qmail-send.8 > qmail-send.0
X
qmail-send.8: \
qmail-send.9 conf-break conf-spawn
X	cat qmail-send.9 \
X	| sed s}QMAILHOME}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPAWN}"`head -1 conf-spawn`"}g \
X	> qmail-send.8
X
qmail-send.o: \
compile qmail-send.c qmail-send.c qmail-send.c readwrite.h \
qmail-send.c sig.h qmail-send.c direntry.h direntry.h direntry.h \
qmail-send.c control.h qmail-send.c select.h select.h select.h \
select.h qmail-send.c open.h qmail-send.c seek.h qmail-send.c exit.h \
qmail-send.c lock.h qmail-send.c ndelay.h qmail-send.c now.h \
datetime.h now.h qmail-send.c getln.h qmail-send.c substdio.h \
qmail-send.c alloc.h qmail-send.c error.h qmail-send.c stralloc.h \
gen_alloc.h stralloc.h qmail-send.c str.h qmail-send.c byte.h \
qmail-send.c fmt.h qmail-send.c scan.h qmail-send.c case.h \
qmail-send.c auto_qmail.h qmail-send.c trigger.h qmail-send.c \
newfield.h stralloc.h stralloc.h newfield.h qmail-send.c quote.h \
qmail-send.c qmail.h substdio.h substdio.h qmail.h qmail-send.c \
qsutil.h qmail-send.c prioq.h datetime.h datetime.h prioq.h \
gen_alloc.h prioq.h qmail-send.c constmap.h qmail-send.c fmtqfn.h \
qmail-send.c readsubdir.h direntry.h readsubdir.h qmail-send.c
X	./compile qmail-send.c
X
qmail-showctl: \
load qmail-showctl.o control.o open.a getln.a stralloc.a alloc.a \
substdio.a error.a str.a fs.a auto_qmail.o
X	./load qmail-showctl control.o open.a getln.a stralloc.a \
X	alloc.a substdio.a error.a str.a fs.a auto_qmail.o 
X
qmail-showctl.0: \
qmail-showctl.8
X	nroff -man qmail-showctl.8 > qmail-showctl.0
X
qmail-showctl.o: \
compile qmail-showctl.c substdio.h qmail-showctl.c subfd.h substdio.h \
substdio.h subfd.h qmail-showctl.c exit.h qmail-showctl.c fmt.h \
qmail-showctl.c str.h qmail-showctl.c control.h qmail-showctl.c \
constmap.h qmail-showctl.c stralloc.h gen_alloc.h stralloc.h \
qmail-showctl.c direntry.h direntry.h direntry.h qmail-showctl.c \
auto_qmail.h qmail-showctl.c
X	./compile qmail-showctl.c
X
qmail-smtpd: \
load qmail-smtpd.o ip.o ipme.o ipalloc.o control.o constmap.o \
received.o date822fmt.o now.o qmail.o fd.a wait.a datetime.a open.a \
getln.a sig.a case.a env.a stralloc.a alloc.a substdio.a error.a \
str.a fs.a auto_qmail.o socket.lib
X	./load qmail-smtpd ip.o ipme.o ipalloc.o control.o \
X	constmap.o received.o date822fmt.o now.o qmail.o fd.a \
X	wait.a datetime.a open.a getln.a sig.a case.a env.a \
X	stralloc.a alloc.a substdio.a error.a str.a fs.a \
X	auto_qmail.o  `cat socket.lib`
X
qmail-smtpd.0: \
qmail-smtpd.8
X	nroff -man qmail-smtpd.8 > qmail-smtpd.0
X
qmail-smtpd.o: \
compile qmail-smtpd.c sig.h qmail-smtpd.c readwrite.h qmail-smtpd.c \
getln.h qmail-smtpd.c stralloc.h gen_alloc.h stralloc.h qmail-smtpd.c \
substdio.h qmail-smtpd.c alloc.h qmail-smtpd.c auto_qmail.h \
qmail-smtpd.c control.h qmail-smtpd.c received.h qmail-smtpd.c \
constmap.h qmail-smtpd.c error.h qmail-smtpd.c ipme.h ip.h ipme.h \
ipalloc.h ip.h ip.h ipalloc.h gen_alloc.h ipalloc.h ipme.h \
qmail-smtpd.c ip.h ip.h qmail-smtpd.c qmail.h substdio.h substdio.h \
qmail.h qmail-smtpd.c str.h qmail-smtpd.c fmt.h qmail-smtpd.c byte.h \
qmail-smtpd.c case.h qmail-smtpd.c env.h qmail-smtpd.c now.h \
datetime.h now.h qmail-smtpd.c exit.h qmail-smtpd.c
X	./compile qmail-smtpd.c
X
qmail-start: \
load qmail-start.o prot.o fd.a auto_uids.o
X	./load qmail-start prot.o fd.a auto_uids.o 
X
qmail-start.0: \
qmail-start.8
X	nroff -man qmail-start.8 > qmail-start.0
X
qmail-start.8: \
qmail-start.9 conf-break conf-spawn
X	cat qmail-start.9 \
X	| sed s}QMAILHOME}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPAWN}"`head -1 conf-spawn`"}g \
X	> qmail-start.8
X
qmail-start.o: \
compile qmail-start.c fd.h qmail-start.c prot.h qmail-start.c exit.h \
qmail-start.c fork.h qmail-start.c auto_uids.h qmail-start.c
X	./compile qmail-start.c
X
qmail-tcpto: \
load qmail-tcpto.o ip.o now.o open.a lock.a substdio.a error.a str.a \
fs.a auto_qmail.o
X	./load qmail-tcpto ip.o now.o open.a lock.a substdio.a \
X	error.a str.a fs.a auto_qmail.o 
X
qmail-tcpto.0: \
qmail-tcpto.8
X	nroff -man qmail-tcpto.8 > qmail-tcpto.0
X
qmail-tcpto.o: \
compile qmail-tcpto.c substdio.h qmail-tcpto.c subfd.h substdio.h \
substdio.h subfd.h qmail-tcpto.c auto_qmail.h qmail-tcpto.c fmt.h \
qmail-tcpto.c ip.h qmail-tcpto.c lock.h qmail-tcpto.c error.h \
qmail-tcpto.c exit.h qmail-tcpto.c datetime.h qmail-tcpto.c now.h \
datetime.h datetime.h now.h qmail-tcpto.c
X	./compile qmail-tcpto.c
X
qmail-upgrade.0: \
qmail-upgrade.7
X	nroff -man qmail-upgrade.7 > qmail-upgrade.0
X
qmail-upgrade.7: \
qmail-upgrade.9 conf-break conf-spawn
X	cat qmail-upgrade.9 \
X	| sed s}QMAILHOME}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPAWN}"`head -1 conf-spawn`"}g \
X	> qmail-upgrade.7
X
qmail-upq: \
warn-auto.sh qmail-upq.sh conf-qmail conf-break conf-split
X	cat warn-auto.sh qmail-upq.sh \
X	| sed s}QMAIL}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPLIT}"`head -1 conf-split`"}g \
X	> qmail-upq
X	chmod 755 qmail-upq
X
qmail-users.0: \
qmail-users.5
X	nroff -man qmail-users.5 > qmail-users.0
X
qmail-users.5: \
qmail-users.9 conf-break conf-spawn
X	cat qmail-users.9 \
X	| sed s}QMAILHOME}"`head -1 conf-qmail`"}g \
X	| sed s}BREAK}"`head -1 conf-break`"}g \
X	| sed s}SPAWN}"`head -1 conf-spawn`"}g \
X	> qmail-users.5
X
qmail.0: \
qmail.7
X	nroff -man qmail.7 > qmail.0
X
qmail.o: \
compile qmail.c substdio.h qmail.c readwrite.h qmail.c wait.h qmail.c \
exit.h qmail.c fork.h qmail.c fd.h qmail.c qmail.h substdio.h \
substdio.h qmail.h qmail.c auto_qmail.h qmail.c
X	./compile qmail.c
X
qreceipt: \
load qreceipt.o headerbody.o hfield.o quote.o token822.o qmail.o \
getln.a fd.a wait.a sig.a env.a stralloc.a alloc.a substdio.a error.a \
str.a auto_qmail.o
X	./load qreceipt headerbody.o hfield.o quote.o token822.o \
X	qmail.o getln.a fd.a wait.a sig.a env.a stralloc.a alloc.a \
X	substdio.a error.a str.a auto_qmail.o 
X
qreceipt.0: \
qreceipt.1
X	nroff -man qreceipt.1 > qreceipt.0
X
qreceipt.o: \
compile qreceipt.c sig.h qreceipt.c env.h qreceipt.c substdio.h \
qreceipt.c stralloc.h gen_alloc.h stralloc.h qreceipt.c subfd.h \
substdio.h substdio.h subfd.h qreceipt.c getln.h qreceipt.c alloc.h \
qreceipt.c str.h qreceipt.c hfield.h qreceipt.c token822.h \
gen_alloc.h token822.h qreceipt.c error.h qreceipt.c gen_alloc.h \
qreceipt.c gen_allocdefs.h gen_allocdefs.h gen_allocdefs.h qreceipt.c \
headerbody.h qreceipt.c exit.h qreceipt.c open.h qreceipt.c quote.h \
qreceipt.c qmail.h substdio.h substdio.h qmail.h qreceipt.c
X	./compile qreceipt.c
X
qsmhook: \
load qsmhook.o sig.a case.a fd.a wait.a getopt.a env.a stralloc.a \
alloc.a substdio.a error.a str.a
X	./load qsmhook sig.a case.a fd.a wait.a getopt.a env.a \
X	stralloc.a alloc.a substdio.a error.a str.a 
X
qsmhook.o: \
compile qsmhook.c fd.h qsmhook.c stralloc.h gen_alloc.h stralloc.h \
qsmhook.c readwrite.h qsmhook.c sgetopt.h subgetopt.h sgetopt.h \
qsmhook.c wait.h qsmhook.c env.h qsmhook.c byte.h qsmhook.c str.h \
qsmhook.c alloc.h qsmhook.c exit.h qsmhook.c fork.h qsmhook.c case.h \
qsmhook.c subfd.h substdio.h subfd.h qsmhook.c error.h qsmhook.c \
substdio.h substdio.h qsmhook.c sig.h qsmhook.c
X	./compile qsmhook.c
X
qsutil.o: \
compile qsutil.c stralloc.h gen_alloc.h stralloc.h qsutil.c \
readwrite.h qsutil.c substdio.h qsutil.c qsutil.h qsutil.c
X	./compile qsutil.c
X
quote.o: \
compile quote.c stralloc.h gen_alloc.h stralloc.h quote.c str.h \
quote.c quote.h quote.c
X	./compile quote.c
X
readsubdir.o: \
compile readsubdir.c readsubdir.h direntry.h direntry.h direntry.h \
readsubdir.h readsubdir.c fmt.h readsubdir.c scan.h readsubdir.c \
str.h readsubdir.c auto_split.h readsubdir.c
X	./compile readsubdir.c
X
received.o: \
compile received.c fmt.h received.c qmail.h substdio.h qmail.h \
received.c now.h datetime.h now.h received.c datetime.h datetime.h \
received.c date822fmt.h received.c received.h received.c
X	./compile received.c
X
remoteinfo.o: \
compile remoteinfo.c remoteinfo.c remoteinfo.c remoteinfo.c \
remoteinfo.c byte.h remoteinfo.c substdio.h remoteinfo.c ip.h \
remoteinfo.c fmt.h remoteinfo.c timeoutconn.h remoteinfo.c \
timeoutread.h remoteinfo.c timeoutwrite.h remoteinfo.c remoteinfo.h \
remoteinfo.c
X	./compile remoteinfo.c
X
scan_8long.o: \
compile scan_8long.c scan.h scan_8long.c
X	./compile scan_8long.c
X
scan_nbblong.o: \
compile scan_nbblong.c scan.h scan_nbblong.c
X	./compile scan_nbblong.c
X
scan_ulong.o: \
compile scan_ulong.c scan.h scan_ulong.c
X	./compile scan_ulong.c
X
seek.a: \
makelib seek_cur.o seek_end.o seek_set.o seek_trunc.o
X	./makelib seek.a seek_cur.o seek_end.o seek_set.o \
X	seek_trunc.o
X
seek_cur.o: \
compile seek_cur.c seek_cur.c seek.h seek_cur.c
X	./compile seek_cur.c
X
seek_end.o: \
compile seek_end.c seek_end.c seek.h seek_end.c
X	./compile seek_end.c
X
seek_set.o: \
compile seek_set.c seek_set.c seek.h seek_set.c
X	./compile seek_set.c
X
seek_trunc.o: \
compile seek_trunc.c seek_trunc.c seek.h seek_trunc.c
X	./compile seek_trunc.c
X
select.h: \
compile trysysel.c select.h1 select.h2
X	( ./compile trysysel.c >/dev/null 2>&1 \
X	&& cat select.h2 || cat select.h1 ) > select.h
X	rm -f trysysel.o trysysel
X
sendmail: \
load sendmail.o env.a getopt.a alloc.a substdio.a error.a str.a \
auto_qmail.o
X	./load sendmail env.a getopt.a alloc.a substdio.a error.a \
X	str.a auto_qmail.o 
X
sendmail.o: \
compile sendmail.c sgetopt.h subgetopt.h sgetopt.h sendmail.c \
substdio.h sendmail.c subfd.h substdio.h substdio.h subfd.h \
sendmail.c alloc.h sendmail.c auto_qmail.h sendmail.c exit.h \
sendmail.c env.h sendmail.c str.h sendmail.c
X	./compile sendmail.c
X
setup: \
it man conf-qmail
X	./qmail-hier | ./install `head -1 conf-qmail`
X
sgetopt.o: \
compile sgetopt.c substdio.h sgetopt.c subfd.h substdio.h substdio.h \
subfd.h sgetopt.c sgetopt.h sgetopt.h subgetopt.h sgetopt.h sgetopt.c \
subgetopt.h subgetopt.h sgetopt.c
X	./compile sgetopt.c
X
shar: \
FILES BLURB BLURB2 BLURB3 BLURB4 README FAQ INSTALL INSTALL.alias \
INSTALL.boot INSTALL.ctl INSTALL.ids INSTALL.mbox INSTALL.qsmhook \
UPGRADE THOUGHTS TODO THANKS CHANGES RFCHCSC RFCLOOPS RFCMXPS \
RFCNETSTR RFCNRUDT RFCQMTP RFCQSBMF RFCVERP SECURITY INTERNALS FILES \
VERSION SYSDEPS TARGETS Makefile conf-break auto_break.h conf-spawn \
auto_spawn.h chkspawn.c conf-split auto_split.h conf-patrn \
auto_patrn.h conf-users conf-groups auto_uids.h auto_usera.h extra.h \
addresses.5 condredirect.1 dot-qmail.9 envelopes.5 forgeries.7 \
forward.1 maildir2mbox.1 maildirmake.1 maildirwatch.1 mailsubj.1 \
mbox.5 preline.1 qbiff.1 qlist.1 qmail-clean.8 qmail-command.8 \
qmail-control.5 qmail-getpw.9 qmail-header.5 qmail-inject.8 \
qmail-limits.9 qmail-local.8 qmail-log.5 qmail-lspawn.8 qmail-newu.8 \
qmail-pop3d.8 qmail-popup.8 qmail-pw2u.9 qmail-qmtpd.8 qmail-qread.8 \
qmail-qstat.8 qmail-queue.8 qmail-remote.8 qmail-rspawn.8 \
qmail-send.9 qmail-showctl.8 qmail-smtpd.8 qmail-start.8 \
qmail-tcpto.8 qmail-upgrade.9 qmail-users.5 qmail.7 qreceipt.1 \
splogger.8 tcp-env.1 qmail-clean.c qmail-config.sh qmail-getpw.c \
qmail-hier.c qmail-inject.c qmail-local.c qmail-lspawn.c qmail-newu.c \
qmail-pop3d.c qmail-popup.c qmail-pw2u.c qmail-qmtpd.c qmail-qread.c \
qmail-qstat.sh qmail-queue.c qmail-remote.c qmail-rspawn.c \
qmail-send.c qmail-showctl.c qmail-smtpd.c qmail-start.c \
qmail-tcpto.c spawn.c dnscname.c dnsfq.c dnsip.c dnsmxip.c dnsptr.c \
hostname.c ipmeprint.c tcp-env.c sendmail.c qlist.c qreceipt.c \
qsmhook.c qbiff.c forward.c preline.c predate.c condredirect.c \
maildirmake.c maildir2mbox.c maildirwatch.c splogger.c qail.sh elq.sh \
pinq.sh qlist2.sh qmail-upq.sh datemail.sh mailsubj.sh qlx.h \
constmap.h constmap.c dnsdoe.h dnsdoe.c fmtqfn.h fmtqfn.c gfrom.h \
gfrom.c myctime.h myctime.c newfield.h newfield.c qsutil.h qsutil.c \
readsubdir.h readsubdir.c received.h received.c tcpto.h tcpto.c \
tcpto_clean.c trigger.h trigger.c triggerpull.h triggerpull.c \
trynpbg1.c trysyslog.c conf-cc conf-ld find-systype.sh \
make-compile.sh make-load.sh make-makelib.sh trycpp.c warn-auto.sh \
auto-str.c auto-int.c auto-int8.c auto-gid.c auto-uid.c install.c \
instcheck.c alloc.3 alloc.h alloc.c alloc_re.c case.3 case.h \
case_diffb.c case_diffs.c case_lowerb.c case_lowers.c case_starts.c \
cdb.3 cdb.h cdb_hash.c cdb_seek.c cdb_unpack.c cdbmake.h \
cdbmake_add.c cdbmake_hash.c cdbmake_pack.c cdbmss.h cdbmss.c coe.3 \
coe.h coe.c fd.h fd_copy.3 fd_copy.c fd_move.3 fd_move.c fifo_make.3 \
fifo.h fifo.c trymkffo.c fork.h1 fork.h2 tryvfork.c now.3 now.h now.c \
open.h open_append.c open_excl.c open_read.c open_trunc.c \
open_write.c seek.h seek_cur.c seek_end.c seek_set.c seek_trunc.c \
conf-qmail auto_qmail.h qmail.h qmail.c gen_alloc.h gen_allocdefs.h \
stralloc.3 stralloc.h stralloc_eady.c stralloc_pend.c stralloc_copy.c \
stralloc_opyb.c stralloc_opys.c stralloc_cat.c stralloc_catb.c \
stralloc_cats.c stralloc_arts.c strerr.h strerr_sys.c strerr_die.c \
substdio.h substdio.c substdi.c substdo.c substdio_copy.c subfd.h \
subfderr.c subfdouts.c subfdout.c subfdins.c subfdin.c readwrite.h \
exit.h timeoutconn.h timeoutconn.c timeoutread.h timeoutread.c \
timeoutwrite.h timeoutwrite.c remoteinfo.h remoteinfo.c uint32.h1 \
uint32.h2 tryulong32.c wait.3 wait.h wait_pid.c wait_nohang.c \
trywaitp.c sig.h sig_alarm.c sig_block.c sig_catch.c sig_pause.c \
sig_pipe.c sig_child.c sig_term.c sig_hup.c sig_misc.c sig_bug.c \
trysgact.c trysgprm.c env.3 env.h env.c envread.c byte.h byte_chr.c \
byte_copy.c byte_cr.c byte_diff.c byte_rchr.c byte_zero.c str.h \
str_chr.c str_cpy.c str_diff.c str_diffn.c str_len.c str_rchr.c \
str_start.c lock.h lock_ex.c lock_exnb.c lock_un.c tryflock.c getln.3 \
getln.h getln.c getln2.3 getln2.c sgetopt.3 sgetopt.h sgetopt.c \
subgetopt.3 subgetopt.h subgetopt.c error.3 error_str.3 error_temp.3 \
error.h error.c error_str.c error_temp.c fmt.h fmt_str.c fmt_strn.c \
fmt_uint.c fmt_uint0.c fmt_ulong.c scan.h scan_ulong.c scan_8long.c \
scan_nbblong.c slurpclose.h slurpclose.c quote.h quote.c hfield.h \
hfield.c headerbody.h headerbody.c token822.h token822.c control.h \
control.c datetime.3 datetime.h datetime.c datetime_un.c prioq.h \
prioq.c date822fmt.h date822fmt.c dns.h dns.c trylsock.c tryrsolv.c \
ip.h ip.c ipalloc.h ipalloc.c select.h1 select.h2 trysysel.c ndelay.h \
ndelay.c ndelay_off.c direntry.3 direntry.h1 direntry.h2 trydrent.c \
prot.h prot.c chkshsgr.c warn-shsgr tryshsgr.c ipme.h ipme.c \
trysalen.c maildir.5 maildir.h maildir.c tcp-environ.5
X	shar -m `cat FILES` > shar
X	chmod 400 shar
X
sig.a: \
makelib sig_alarm.o sig_block.o sig_catch.o sig_pause.o sig_pipe.o \
sig_child.o sig_hup.o sig_term.o sig_bug.o sig_misc.o
X	./makelib sig.a sig_alarm.o sig_block.o sig_catch.o \
X	sig_pause.o sig_pipe.o sig_child.o sig_hup.o sig_term.o \
X	sig_bug.o sig_misc.o
X
sig_alarm.o: \
compile sig_alarm.c sig_alarm.c sig.h sig_alarm.c
X	./compile sig_alarm.c
X
sig_block.o: \
compile sig_block.c sig_block.c sig.h sig_block.c hassgprm.h \
sig_block.c
X	./compile sig_block.c
X
sig_bug.o: \
compile sig_bug.c sig_bug.c sig.h sig_bug.c
X	./compile sig_bug.c
X
sig_catch.o: \
compile sig_catch.c sig_catch.c sig.h sig_catch.c hassgact.h \
sig_catch.c
X	./compile sig_catch.c
X
sig_child.o: \
compile sig_child.c sig_child.c sig.h sig_child.c
X	./compile sig_child.c
X
sig_hup.o: \
compile sig_hup.c sig_hup.c sig.h sig_hup.c
X	./compile sig_hup.c
X
sig_misc.o: \
compile sig_misc.c sig_misc.c sig.h sig_misc.c
X	./compile sig_misc.c
X
sig_pause.o: \
compile sig_pause.c sig_pause.c sig.h sig_pause.c hassgprm.h \
sig_pause.c
X	./compile sig_pause.c
X
sig_pipe.o: \
compile sig_pipe.c sig_pipe.c sig.h sig_pipe.c
X	./compile sig_pipe.c
X
sig_term.o: \
compile sig_term.c sig_term.c sig.h sig_term.c
X	./compile sig_term.c
X
slurpclose.o: \
compile slurpclose.c stralloc.h gen_alloc.h stralloc.h slurpclose.c \
readwrite.h slurpclose.c slurpclose.h slurpclose.c
X	./compile slurpclose.c
X
socket.lib: \
trylsock.c compile load
X	( ( ./compile trylsock.c && \
X	./load trylsock -lsocket -lnsl ) >/dev/null 2>&1 \
X	&& echo -lsocket -lnsl || exit 0 ) > socket.lib
X	rm -f trylsock.o trylsock
X
spawn.o: \
compile chkspawn spawn.c spawn.c spawn.c sig.h spawn.c wait.h spawn.c \
substdio.h spawn.c byte.h spawn.c str.h spawn.c stralloc.h \
gen_alloc.h stralloc.h spawn.c select.h select.h select.h select.h \
spawn.c exit.h spawn.c coe.h spawn.c open.h spawn.c error.h spawn.c \
auto_qmail.h spawn.c auto_uids.h spawn.c auto_spawn.h spawn.c
X	./chkspawn
X	./compile spawn.c
X
splogger: \
load splogger.o substdio.a error.a str.a fs.a syslog.lib
X	./load splogger substdio.a error.a str.a fs.a  `cat \
X	syslog.lib`
X
splogger.0: \
splogger.8
X	nroff -man splogger.8 > splogger.0
X
splogger.o: \
compile splogger.c splogger.c splogger.c splogger.c error.h \
splogger.c substdio.h splogger.c subfd.h substdio.h substdio.h \
subfd.h splogger.c exit.h splogger.c str.h splogger.c scan.h \
splogger.c fmt.h splogger.c
X	./compile splogger.c
X
str.a: \
makelib str_len.o str_diff.o str_diffn.o str_cpy.o str_chr.o \
str_rchr.o str_start.o byte_chr.o byte_rchr.o byte_diff.o byte_copy.o \
byte_cr.o byte_zero.o
X	./makelib str.a str_len.o str_diff.o str_diffn.o str_cpy.o \
X	str_chr.o str_rchr.o str_start.o byte_chr.o byte_rchr.o \
X	byte_diff.o byte_copy.o byte_cr.o byte_zero.o
X
str_chr.o: \
compile str_chr.c str.h str_chr.c
X	./compile str_chr.c
X
str_cpy.o: \
compile str_cpy.c str.h str_cpy.c
X	./compile str_cpy.c
X
str_diff.o: \
compile str_diff.c str.h str_diff.c
X	./compile str_diff.c
X
str_diffn.o: \
compile str_diffn.c str.h str_diffn.c
X	./compile str_diffn.c
X
str_len.o: \
compile str_len.c str.h str_len.c
X	./compile str_len.c
X
str_rchr.o: \
compile str_rchr.c str.h str_rchr.c
X	./compile str_rchr.c
X
str_start.o: \
compile str_start.c str.h str_start.c
X	./compile str_start.c
X
stralloc.a: \
makelib stralloc_eady.o stralloc_pend.o stralloc_copy.o \
stralloc_opys.o stralloc_opyb.o stralloc_cat.o stralloc_cats.o \
stralloc_catb.o stralloc_arts.o
X	./makelib stralloc.a stralloc_eady.o stralloc_pend.o \
X	stralloc_copy.o stralloc_opys.o stralloc_opyb.o \
X	stralloc_cat.o stralloc_cats.o stralloc_catb.o \
X	stralloc_arts.o
X
stralloc_arts.o: \
compile stralloc_arts.c byte.h stralloc_arts.c str.h stralloc_arts.c \
stralloc.h gen_alloc.h stralloc.h stralloc_arts.c
X	./compile stralloc_arts.c
X
stralloc_cat.o: \
compile stralloc_cat.c byte.h stralloc_cat.c stralloc.h gen_alloc.h \
stralloc.h stralloc_cat.c
X	./compile stralloc_cat.c
X
stralloc_catb.o: \
compile stralloc_catb.c stralloc.h gen_alloc.h stralloc.h \
stralloc_catb.c byte.h stralloc_catb.c
X	./compile stralloc_catb.c
X
stralloc_cats.o: \
compile stralloc_cats.c byte.h stralloc_cats.c str.h stralloc_cats.c \
stralloc.h gen_alloc.h stralloc.h stralloc_cats.c
X	./compile stralloc_cats.c
X
stralloc_copy.o: \
compile stralloc_copy.c byte.h stralloc_copy.c stralloc.h gen_alloc.h \
stralloc.h stralloc_copy.c
X	./compile stralloc_copy.c
X
stralloc_eady.o: \
compile stralloc_eady.c alloc.h stralloc_eady.c stralloc.h \
gen_alloc.h stralloc.h stralloc_eady.c gen_allocdefs.h \
gen_allocdefs.h gen_allocdefs.h stralloc_eady.c
X	./compile stralloc_eady.c
X
stralloc_opyb.o: \
compile stralloc_opyb.c stralloc.h gen_alloc.h stralloc.h \
stralloc_opyb.c byte.h stralloc_opyb.c
X	./compile stralloc_opyb.c
X
stralloc_opys.o: \
compile stralloc_opys.c byte.h stralloc_opys.c str.h stralloc_opys.c \
stralloc.h gen_alloc.h stralloc.h stralloc_opys.c
X	./compile stralloc_opys.c
X
stralloc_pend.o: \
compile stralloc_pend.c alloc.h stralloc_pend.c stralloc.h \
gen_alloc.h stralloc.h stralloc_pend.c gen_allocdefs.h \
gen_allocdefs.h gen_allocdefs.h stralloc_pend.c
X	./compile stralloc_pend.c
X
strerr.a: \
makelib strerr_sys.o strerr_die.o
X	./makelib strerr.a strerr_sys.o strerr_die.o
X
strerr_die.o: \
compile strerr_die.c substdio.h strerr_die.c subfd.h substdio.h \
substdio.h subfd.h strerr_die.c exit.h strerr_die.c strerr.h \
strerr_die.c
X	./compile strerr_die.c
X
strerr_sys.o: \
compile strerr_sys.c error.h strerr_sys.c strerr.h strerr_sys.c
X	./compile strerr_sys.c
X
subfderr.o: \
compile subfderr.c readwrite.h subfderr.c substdio.h subfderr.c \
subfd.h substdio.h substdio.h subfd.h subfderr.c
X	./compile subfderr.c
X
subfdin.o: \
compile subfdin.c readwrite.h subfdin.c substdio.h subfdin.c subfd.h \
substdio.h substdio.h subfd.h subfdin.c
X	./compile subfdin.c
X
subfdins.o: \
compile subfdins.c readwrite.h subfdins.c substdio.h subfdins.c \
subfd.h substdio.h substdio.h subfd.h subfdins.c
X	./compile subfdins.c
X
subfdout.o: \
compile subfdout.c readwrite.h subfdout.c substdio.h subfdout.c \
subfd.h substdio.h substdio.h subfd.h subfdout.c
X	./compile subfdout.c
X
subfdouts.o: \
compile subfdouts.c readwrite.h subfdouts.c substdio.h subfdouts.c \
subfd.h substdio.h substdio.h subfd.h subfdouts.c
X	./compile subfdouts.c
X
subgetopt.o: \
compile subgetopt.c subgetopt.h subgetopt.h subgetopt.c
X	./compile subgetopt.c
X
substdi.o: \
compile substdi.c substdio.h substdi.c byte.h substdi.c error.h \
substdi.c
X	./compile substdi.c
X
substdio.a: \
makelib substdio.o substdi.o substdo.o subfderr.o subfdout.o \
subfdouts.o subfdin.o subfdins.o substdio_copy.o
X	./makelib substdio.a substdio.o substdi.o substdo.o \
X	subfderr.o subfdout.o subfdouts.o subfdin.o subfdins.o \
X	substdio_copy.o
X
substdio.o: \
compile substdio.c substdio.h substdio.c
X	./compile substdio.c
X
substdio_copy.o: \
compile substdio_copy.c substdio.h substdio_copy.c
X	./compile substdio_copy.c
X
substdo.o: \
compile substdo.c substdio.h substdo.c str.h substdo.c byte.h \
substdo.c error.h substdo.c
X	./compile substdo.c
X
syslog.lib: \
trysyslog.c compile load
X	( ( ./compile trysyslog.c && \
X	./load trysyslog -lgen ) >/dev/null 2>&1 \
X	&& echo -lgen || exit 0 ) > syslog.lib
X	rm -f trysyslog.o trysyslog
X
systype: \
find-systype trycpp.c
X	./find-systype > systype
X
tcp-env: \
load tcp-env.o dns.o remoteinfo.o timeoutread.o timeoutwrite.o \
timeoutconn.o ip.o ipalloc.o case.a ndelay.a sig.a env.a getopt.a \
stralloc.a alloc.a substdio.a error.a str.a fs.a dns.lib socket.lib
X	./load tcp-env dns.o remoteinfo.o timeoutread.o \
X	timeoutwrite.o timeoutconn.o ip.o ipalloc.o case.a ndelay.a \
X	sig.a env.a getopt.a stralloc.a alloc.a substdio.a error.a \
X	str.a fs.a  `cat dns.lib` `cat socket.lib`
X
tcp-env.0: \
tcp-env.1
X	nroff -man tcp-env.1 > tcp-env.0
X
tcp-env.o: \
compile tcp-env.c tcp-env.c tcp-env.c tcp-env.c tcp-env.c sig.h \
tcp-env.c stralloc.h gen_alloc.h stralloc.h tcp-env.c str.h tcp-env.c \
env.h tcp-env.c fmt.h tcp-env.c scan.h tcp-env.c subgetopt.h \
tcp-env.c ip.h tcp-env.c dns.h tcp-env.c byte.h tcp-env.c \
remoteinfo.h tcp-env.c exit.h tcp-env.c case.h tcp-env.c
X	./compile tcp-env.c
X
tcp-environ.0: \
tcp-environ.5
X	nroff -man tcp-environ.5 > tcp-environ.0
X
tcpto.o: \
compile tcpto.c tcpto.h tcpto.c open.h tcpto.c lock.h tcpto.c seek.h \
tcpto.c now.h datetime.h now.h tcpto.c ip.h tcpto.c byte.h tcpto.c \
datetime.h datetime.h tcpto.c readwrite.h tcpto.c
X	./compile tcpto.c
X
tcpto_clean.o: \
compile tcpto_clean.c tcpto.h tcpto_clean.c open.h tcpto_clean.c \
substdio.h tcpto_clean.c readwrite.h tcpto_clean.c
X	./compile tcpto_clean.c
X
timeoutconn.o: \
compile timeoutconn.c timeoutconn.c timeoutconn.c timeoutconn.c \
timeoutconn.c ndelay.h timeoutconn.c select.h select.h select.h \
select.h timeoutconn.c error.h timeoutconn.c readwrite.h \
timeoutconn.c ip.h timeoutconn.c byte.h timeoutconn.c timeoutconn.h \
timeoutconn.c
X	./compile timeoutconn.c
X
timeoutread.o: \
compile timeoutread.c timeoutread.h timeoutread.c select.h select.h \
select.h select.h timeoutread.c error.h timeoutread.c readwrite.h \
timeoutread.c
X	./compile timeoutread.c
X
timeoutwrite.o: \
compile timeoutwrite.c timeoutwrite.h timeoutwrite.c select.h \
select.h select.h select.h timeoutwrite.c error.h timeoutwrite.c \
readwrite.h timeoutwrite.c
X	./compile timeoutwrite.c
X
token822.o: \
compile token822.c stralloc.h gen_alloc.h stralloc.h token822.c \
alloc.h token822.c str.h token822.c token822.h gen_alloc.h token822.h \
token822.c gen_allocdefs.h gen_allocdefs.h gen_allocdefs.h token822.c
X	./compile token822.c
X
trigger.o: \
compile trigger.c select.h select.h select.h select.h trigger.c \
open.h trigger.c trigger.h trigger.c hasnpbg1.h trigger.c
X	./compile trigger.c
X
triggerpull.o: \
compile triggerpull.c ndelay.h triggerpull.c open.h triggerpull.c \
triggerpull.h triggerpull.c
X	./compile triggerpull.c
X
uint32.h: \
tryulong32.c compile load uint32.h1 uint32.h2
X	( ( ./compile tryulong32.c && ./load tryulong32 && \
X	./tryulong32 ) >/dev/null 2>&1 \
X	&& cat uint32.h2 || cat uint32.h1 ) > uint32.h
X	rm -f tryulong32.o tryulong32
X
wait.a: \
makelib wait_pid.o wait_nohang.o
X	./makelib wait.a wait_pid.o wait_nohang.o
X
wait_nohang.o: \
compile wait_nohang.c wait_nohang.c wait_nohang.c haswaitp.h \
wait_nohang.c
X	./compile wait_nohang.c
X
wait_pid.o: \
compile wait_pid.c wait_pid.c wait_pid.c error.h wait_pid.c
X	./compile wait_pid.c
SHAR_EOF
  $shar_touch -am 0109113498 'xmit/Makefile' &&
  chmod 0444 'xmit/Makefile' ||
  $echo 'restore of' 'xmit/Makefile' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'xmit/Makefile:' 'MD5 check failed'
cc106c042ad088e3e6b896c646477e53  xmit/Makefile
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'xmit/Makefile'`"
    test 72639 -eq "$shar_count" ||
    $echo 'xmit/Makefile:' 'original size' '72639,' 'current size' "$shar_count!"
  fi
fi
# ============= xmit/qi_open.c ==============
if test -f 'xmit/qi_open.c' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'xmit/qi_open.c' '(file already exists)'
else
  $echo 'x -' extracting 'xmit/qi_open.c' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmit/qi_open.c' &&
#include "substdio.h"
#include "readwrite.h"
#include "wait.h"
#include "exit.h"
#include "fork.h"
#include "fd.h"
#include "qmail.h"
#include "qi_open.h"
#include "auto_qmail.h"
X
static char *binqiargs[2] = { "bin/qmail-inject", 0 } ;
X
int qi_open(qq)
struct qmail *qq;
{
X  int pim[2];
X
X  if (pipe(pim) == -1) return -1;
X 
X  switch(qq->pid = vfork()) {
X    case -1:
X      close(pim[0]); close(pim[1]);
X      return -1;
X    case 0:
X      close(pim[1]);
X      if (fd_move(0,pim[0]) == -1) _exit(120);
X      if (chdir(auto_qmail) == -1) _exit(120);
X      execv(*binqiargs,binqiargs);
X      _exit(120);
X  }
X
X  qq->fdm = qq->fde = pim[1]; close(pim[0]);
X  substdio_fdbuf(&qq->ss,write,qq->fdm,qq->buf,sizeof(qq->buf));
X  qq->flagerr = 0;
X  return 0;
}
X
int qi_close(qq)
struct qmail *qq;
{
X  int wstat;
X
X  if (!qq->flagerr) if (substdio_flush(&qq->ss) == -1) qq->flagerr = 1;
X  close(qq->fdm);
X
X  if (wait_pid(&wstat,qq->pid) != qq->pid) return QMAIL_WAITPID;
X  if (wait_crashed(wstat)) return QMAIL_CRASHED;
X  switch(wait_exitcode(wstat)) {
X    case 0: if (qq->flagerr) return QMAIL_BUG; return 0;
X    case 100: return QI_PERM;
X    case 111: return QI_TEMP;
X    default: return QMAIL_BUG;
X  }
}
SHAR_EOF
  $shar_touch -am 0108111098 'xmit/qi_open.c' &&
  chmod 0444 'xmit/qi_open.c' ||
  $echo 'restore of' 'xmit/qi_open.c' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'xmit/qi_open.c:' 'MD5 check failed'
a371b4d69b061a737f7dd02f0f80401a  xmit/qi_open.c
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'xmit/qi_open.c'`"
    test 1192 -eq "$shar_count" ||
    $echo 'xmit/qi_open.c:' 'original size' '1192,' 'current size' "$shar_count!"
  fi
fi
# ============= xmit/qi_open.h ==============
if test -f 'xmit/qi_open.h' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'xmit/qi_open.h' '(file already exists)'
else
  $echo 'x -' extracting 'xmit/qi_open.h' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmit/qi_open.h' &&
#ifndef QI_OPEN_H
#define QI_OPEN_H
X
extern int qi_open();
extern int qi_close();
X
#define QI_TEMP -102
#define QI_PERM -103
X
#endif
SHAR_EOF
  $shar_touch -am 0108111098 'xmit/qi_open.h' &&
  chmod 0444 'xmit/qi_open.h' ||
  $echo 'restore of' 'xmit/qi_open.h' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'xmit/qi_open.h:' 'MD5 check failed'
7491924740627a0d810304876ad2395c  xmit/qi_open.h
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'xmit/qi_open.h'`"
    test 133 -eq "$shar_count" ||
    $echo 'xmit/qi_open.h:' 'original size' '133,' 'current size' "$shar_count!"
  fi
fi
# ============= xmit/README ==============
if test -f 'xmit/README' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'xmit/README' '(file already exists)'
else
  $echo 'x -' extracting 'xmit/README' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmit/README' &&
XXTND XMIT support for qmail
Steve Simitzis - (c) 1997-1998 Critical Path, Inc.
http://www.criticalpath.net
[email-masked] - [email-masked]
X
Installation:
X
This archive should contain the following files:
Makefile
Makefile.patch
qi_open.c
qi_open.h
qmail-pop3d.c
qmail-pop3d-xmit.patch
X
You can choose two installation routes, quick'n'easy install, and
hard install. Easy install:
X
1) cp Makefile qi_open.c qi_open.h qmail-pop3d.c /usr/local/src/qmail-1.01/
2) make qmail-pop3d
3) cp qmail-pop3d /var/qmail/bin
X
Adjust /usr/local/src/qmail-1.01 and /var/qmail/bin to fit the location
of your source and qmail trees. Also, be careful with just blindly copying
over a new Makefile; other patches on the qmail website may have made
changes to the Makefile.
X
Hard install:
X
1) Get status/UIDL headers and cur/new support patch:
X   http://homepages.munich.netsurf.de/Franz.Sirl/qmail-pop3d.diff
2) Apply this patch to a clean version of qmail-pop3d.c:
X   patch < qmail-pop3d.diff
3) Apply xmit patch to this patched version of qmail-pop3d.c:
X   patch < qmail-pop3d-xmit.patch
4) Apply Makefile patch:
X   patch < Makefile.patch
5) Copy qi_open files to the qmail source tree:
X   cp qi_open.c qi_open.h /usr/local/src/qmail-1.01/
6) make qmail-pop3d
7) cp qmail-pop3d /var/qmail/bin
X
If you have any other mods or patches applied to qmail-pop3d or your
Makefile, you may have to manually resolve some conflicts.
X
----------
X
Background:
X
With all the talk on the qmail list about SMTP relaying and the new anti-spam 
RFC draft, I thought it was time to re-visit XTND XMIT as another solution to 
the problem. My philosophy has always been that SMTP is *not* and was never 
intended to be a client protocol. The lack of user authentication is a  clear 
indication of this design. In the old days (in Internet years,  anyway :), 
mail clients were UNIX MUA's, which required authentication  via the normal 
login mechanisms, and SMTP was only used to transport mail from one server 
to another.
X
The anti-spam draft is available at:
ftp://ds.internic.net/internet-drafts/draft-lindberg-anti-spam-mta-01.txt
X
With the popularization of POP based mail clients, people essentially
became their own little trusted mail servers. Well, we're at the point
where everyone can't be trusted anymore, and it's time that mail clients 
used a *client* protocol that takes advantage of true user-level 
authentication. XTND XMIT should be this protocol, as there already 
is commercial and freeware support, along with an RFC proposal.
X
A thorough description of XMIT can be found at:
http://musicm.mcgill.ca/~MSI/HTTP/pop3xtndxmit.html
X
Patches:
X
This patch to qmail-pop3d.c takes advantage of a couple patches on
www.qmail.org. These patches have already been built-in and rewritten to
work with qmail-pop3d.c, so there's no reason to download and apply them
(except for qmail-pop3d.diff from Hartgers and Sirl patch). This section 
is included to give credit to the original authors.
X
- message size limits from Michael Shields.
X  http://www.qmail.org/smtpmaxsize-patch.1
X
- \r\n or \n support (in case there are dumb clients out there) from John
X  Saunders.
X  ftp://ftp.nlc.net.au/pub/linux/mail/qmail/qmail-smtpd-newline.patch
X
- Status/UIDL headers and cur/new support from Bart Hartgers and Franz Sirl.
X  http://homepages.munich.netsurf.de/Franz.Sirl/qmail-pop3d.diff
X  This patch should be applied to a clean version of qmail-pop3d.c
X
Some code features:
X
- Support for future XTND commands is also available; simply add a new
X  function pointer into the xtndcmd array.
- The smtpmaxsize control file (and also env variable) control both
X  both SMTP and POP XMIT uniformly.
- Received headers will take on the following form:
X
X  Received: from ppp33.sf.isp.net (HELO steve) (192.168.134.33)
X   by pop.domain.com with POP3 XMIT; 29 Dec 1997 04:44:12 -0800
X
X  This looks similar to the Received header produced by qmail-smtpd. Note
X  that "HELO" now displays the POP username in the header. Useful for 
X  tracking which user sent the message from your system. (In case someone
X  decides to spam). This also means that you will have to run qmail-popup 
X  from tcpserver, or wrap it in tcp-env.
- This implementation of XMIT calls qmail-inject to do its dirty work. So
X  To:, CC:, and BCC: headers are handled properly.
- Lots of code is reused from qmail-smtpd.c and qmail.c to insure that
X  everything works consistently.
X
License:
X
X  XTND XMIT support by Steve Simitzis 12/29/1997
X  Portions of this code: (c) 1997-1998 Critical Path, Inc.
X  http://www.criticalpath.net
X
X  Neither Critical Path nor myself (Steve Simitzis) will provide or
X  guarantee any support or liability for use of this patch and any
X  associated code. Although this update has been thoroughly tested and
X  approved by our rough-and-tough QA department, please note: use at
X  your own risk! Also, feel free to use, modify, or redistribute any
X  original code, as long as this license is included in unmodified form.
X
X  If you find any of this useful, please drop me a line:
X  [email-masked] / [email-masked]
X
SHAR_EOF
  $shar_touch -am 0111232798 'xmit/README' &&
  chmod 0444 'xmit/README' ||
  $echo 'restore of' 'xmit/README' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'xmit/README:' 'MD5 check failed'
a11c64e3dd5befd227c11135e67ae48c  xmit/README
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'xmit/README'`"
    test 5086 -eq "$shar_count" ||
    $echo 'xmit/README:' 'original size' '5086,' 'current size' "$shar_count!"
  fi
fi
# ============= xmit/qmail-pop3d-xmit.patch ==============
if test -f 'xmit/qmail-pop3d-xmit.patch' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'xmit/qmail-pop3d-xmit.patch' '(file already exists)'
else
  $echo 'x -' extracting 'xmit/qmail-pop3d-xmit.patch' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmit/qmail-pop3d-xmit.patch' &&
--- qmail-pop3d.c.orig	Thu Jan  8 14:22:42 1998
+++ qmail-pop3d.c	Fri Jan  9 11:21:23 1998
@@ -1,5 +1,7 @@
X #include <sys/types.h>
X #include <sys/stat.h>
+#include <stdlib.h>
+#include <unistd.h>
X #include "direntry.h"
X #include "sig.h"
X #include "getln.h"
@@ -17,6 +19,24 @@
X #include "exit.h"
X #include "now.h"
X #include "readwrite.h"
+#include "qmail.h"
+#include "qi_open.h"
+#include "env.h"
+#include "received.h"
+
+/* 
+  XTND XMIT support by Steve Simitzis 12/29/1997
+  Portions of this code: (c) 1997-1998 Critical Path, Inc.
+  http://www.criticalpath.net
+
+  This XTND XMIT patch may be used, modified, and redistributed 
+  freely so long as this message appears. If you find any of this
+  useful, please drop me a line:
+
+  [email-masked] / [email-masked]
+*/
+
+struct qmail qqt;
X 
X /*
X  * Define to include a "Status: " header in the mail that reflects whether
@@ -32,6 +52,7 @@
X #define USE_XUIDL_HEADER
X 
X int timeout = 1200;
+unsigned long maxsize = (unsigned long) -1;
X 
X char ssoutbuf[1024];
X substdio ssout = SUBSTDIO_FDBUF(write,1,ssoutbuf,sizeof(ssoutbuf));
@@ -68,6 +89,7 @@
X void die_nomem() { err("out of memory"); die(); }
X void die_prot() { err("protection problem"); die(); }
X void die_nomaildir() { err("this user has no $HOME/Maildir"); die(); }
+void die_xmit() { err("bad message format from client"); die(); }
X 
X void err_syntax() { err("syntax error"); }
X void err_unimpl() { err("unimplemented"); }
@@ -77,8 +99,12 @@
X void err_nosuch() { err("unable to open that message"); }
X void err_nounlink() { err("unable to unlink all deleted messages"); }
X void err_rename() { err("unable to move message from new/ to cur/"); }
+void err_qqt() { err("unable to send message"); }
+void err_maxsize() { err("message exceeds maximum size"); }
X 
X void okay() { puts("+OK \r\n"); flush(); }
+void okay_xmitready() { puts("+OK start sending message now\r\n"); flush(); }
+void okay_xmitsent() { puts("+OK message sent\r\n"); flush(); }
X void pop3_last() { puts("+OK 0\r\n"); flush(); }
X 
X 
@@ -88,6 +114,12 @@
X prioq pq = {0};
X stralloc newname = {0};
X 
+char *remoteip;
+char *remotehost;
+char *remoteinfo;
+char *local;
+char *mailuser;
+
X struct message
X  {
X   int flagdeleted;
@@ -100,8 +132,32 @@
X 
X substdio ssmsg; char ssmsgbuf[1024];
X 
+void getcontrols()
+{
+ if (control_init() == -1) die();
+ if (control_readint(&maxsize,"control/smtpmaxsize") == -1) die();
+}
+
+void getenvs()
+{
+ char *maxsize_env;
+
+ if (maxsize_env = env_get("MAXSIZE")) scan_ulong(maxsize_env,&maxsize);
+ remoteip = env_get("TCPREMOTEIP");
+ if (!remoteip) remoteip = "unknown";
+ local = env_get("TCPLOCALHOST");
+ if (!local) local = env_get("TCPLOCALIP");
+ if (!local) local = "unknown";
+ remotehost = env_get("TCPREMOTEHOST");
+ if (!remotehost) remotehost = "unknown";
+ remoteinfo = env_get("TCPREMOTEINFO");
+ mailuser = env_get("QMAILUSER");
+ if (!mailuser) mailuser = env_get("MAILUSER");
+ if (!mailuser) mailuser = env_get("USER");
+ if (!mailuser) mailuser = env_get("LOGNAME");
+}
X 
-void blast(ssfrom,limit,i)
+void retr_blast(ssfrom,limit,i)
X substdio *ssfrom;
X unsigned long limit;
X int i;
@@ -148,6 +204,70 @@
X  if (substdio_flush(&ssout) == -1) die();
X }
X 
+void xmit_blast(ssfrom,maxsize)
+substdio *ssfrom;
+int *maxsize;
+{
+ char ch;
+ int state;
+ int seencr;
+
+ state = 1;
+
+ for (;;)
+  {
+   if (substdio_get(ssfrom,&ch,1) <= 0) die();
+   if (ch == '\n')
+    {
+     if (seencr == 0)
+      {
+       substdio_seek(ssfrom,-1);
+       ch = '\r';
+      }
+    }
+   if (ch == '\r') seencr = 1;
+   else seencr = 0;
+
+   switch(state)
+    {
+     case 0:
+       if (ch == '\n') die_xmit();
+       if (ch == '\r') { state = 4; continue; }
+       break;
+     case 1: /* \r\n */
+       if (ch == '\n') die_xmit();
+       if (ch == '.') { state = 2; continue; }
+       if (ch == '\r') { state = 4; continue; }
+       state = 0;
+       break;
+     case 2: /* \r\n + . */
+       if (ch == '\n') die_xmit();
+       if (ch == '\r') { state = 3; continue; }
+       state = 0;
+       break;
+     case 3: /* \r\n + .\r */
+       if (ch == '\n') return;
+       qmail_put(&qqt,".\r",2);
+       if (ch == '\r') { state = 4; continue; }
+       state = 0;
+       break;
+     case 4: /* + \r */
+       if (ch == '\n') { state = 1; break; }
+       if (ch != '\r') { qmail_put(&qqt,"\r",1); state = 0; }
+    }
+   switch (*maxsize)
+    {
+     case 0: /* already full */
+       break;
+     default:
+       (*maxsize)--;
+       /* fall through */
+     case (unsigned long) -1: /* no limit */
+       qmail_put(&qqt,&ch,1);
+    }
+  }
+}
+
X void getlist()
X {
X  unsigned long pos;
@@ -393,7 +513,7 @@
X  if (fd == -1) { err_nosuch(); return; }
X  okay();
X  substdio_fdbuf(&ssmsg,read,fd,ssmsgbuf,sizeof(ssmsgbuf));
- blast(&ssmsg,limit,i);
+ retr_blast(&ssmsg,limit,i);
X  close(fd);
X  if (updateread) m[i].flagread=1;
X }
@@ -401,6 +521,41 @@
X void pop3_top( arg ) char *arg; { do_send(arg,0); }
X void pop3_retr( arg ) char *arg; { do_send(arg,1); }
X 
+void xtnd_doit();
+
+void pop3_xtnd( arg ) 
+char *arg; 
+{ 
+ if(!arg) { err_unimpl(); return; }
+ xtnd_doit(arg);
+}
+
+void xtnd_xmit()
+{
+ unsigned long maxsize2 = maxsize;
+ int r;
+
+ if (qi_open(&qqt) == -1) { err_qqt(); return; }
+ okay_xmitready();
+
+ received(&qqt,"POP3 XMIT", local,remoteip,remotehost,remoteinfo,mailuser);
+ xmit_blast(&ssin,&maxsize2);
+
+ if (!maxsize2) qmail_fail(&qqt);
+ r = qi_close(&qqt);
+ if (!r) { okay_xmitsent(); return; }
+ if (!maxsize2) { err_maxsize(); return; }
+
+ switch(r)
+  {
+   case QMAIL_WAITPID: err("qi waitpid surprise (#4.3.0)"); return;
+   case QMAIL_CRASHED: err("qi crashed (#4.3.0)"); return;
+   case QI_TEMP: err("qi system error (#4.3.0)"); return;
+   case QI_PERM: err("qi system error (#5.5.1)"); return;
+   default: err("qi internal error (#4.3.0)"); return;
+  }
+}
+
X static struct { void (*fun)(); char *text; } pop3cmd[] = {
X   { pop3_quit, "quit" }
X , { pop3_stat, "stat" }
@@ -411,11 +566,17 @@
X , { pop3_rset, "rset" }
X , { pop3_last, "last" }
X , { pop3_top, "top" }
+, { pop3_xtnd, "xtnd" }
X , { okay, "noop" }
X , { 0, 0 }
X };
X 
-void doit(cmd)
+static struct { void (*fun)(); char *text; } xtndcmd[] = {
+  { xtnd_xmit, "xmit" }
+, { 0, 0 }
+};
+
+void pop3_doit(cmd)
X char *cmd;
X {
X  int i;
@@ -441,6 +602,32 @@
X  err_unimpl();
X }
X 
+void xtnd_doit(cmd)
+char *cmd;
+{
+ int i;
+ int j;
+ char ch;
+
+ for (i = 0;xtndcmd[i].fun;++i)
+  {
+   for (j = 0;ch = xtndcmd[i].text[j];++j)
+     if ((cmd[j] != ch) && (cmd[j] != ch - 32))
+       break;
+   if (!ch)
+     if (!cmd[j] || (cmd[j] == ' '))
+      {
+       while (cmd[j] == ' ') ++j;
+       if (!cmd[j])
+         xtndcmd[i].fun((char *) 0);
+       else
+         xtndcmd[i].fun(cmd + j);
+       return;
+      }
+  }
+ err_unimpl();
+}
+
X void main(argc,argv)
X int argc;
X char **argv;
@@ -454,6 +641,9 @@
X  if (!argv[1]) die_nomaildir();
X  if (chdir(argv[1]) == -1) die_nomaildir();
X 
+ getenvs();
+ getcontrols();
+
X  getlist();
X 
X  okay();
@@ -466,6 +656,6 @@
X    if (cmd.s[--cmd.len] != '\n') die();
X    if ((cmd.len > 0) && (cmd.s[cmd.len - 1] == '\r')) --cmd.len;
X    cmd.s[cmd.len++] = 0;
-   doit(cmd.s);
+   pop3_doit(cmd.s);
X   }
X }
SHAR_EOF
  $shar_touch -am 0111232698 'xmit/qmail-pop3d-xmit.patch' &&
  chmod 0444 'xmit/qmail-pop3d-xmit.patch' ||
  $echo 'restore of' 'xmit/qmail-pop3d-xmit.patch' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'xmit/qmail-pop3d-xmit.patch:' 'MD5 check failed'
d66fdd22e10dd44585e21b9ee4370b64  xmit/qmail-pop3d-xmit.patch
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'xmit/qmail-pop3d-xmit.patch'`"
    test 7207 -eq "$shar_count" ||
    $echo 'xmit/qmail-pop3d-xmit.patch:' 'original size' '7207,' 'current size' "$shar_count!"
  fi
fi
# ============= xmit/Makefile.patch ==============
if test -f 'xmit/Makefile.patch' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'xmit/Makefile.patch' '(file already exists)'
else
  $echo 'x -' extracting 'xmit/Makefile.patch' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'xmit/Makefile.patch' &&
--- Makefile.orig	Fri Jan  9 11:32:13 1998
+++ Makefile	Fri Jan  9 11:34:22 1998
@@ -999,6 +999,12 @@
X exit.h qbiff.c
X 	./compile qbiff.c
X 
+qi_open.o: \
+compile qi_open.c substdio.h qi_open.c readwrite.h qi_open.c wait.h qi_open.c \
+exit.h qi_open.c fork.h qi_open.c fd.h qi_open.c qi_open.h substdio.h \
+substdio.h qi_open.h qi_open.c auto_qmail.h qi_open.c
+	./compile qi_open.c
+
X qlist: \
X load qlist.o headerbody.o hfield.o token822.o qmail.o getln.a env.a \
X case.a sig.a fd.a wait.a open.a lock.a stralloc.a alloc.a substdio.a \
@@ -1250,10 +1256,13 @@
X 	./compile qmail-newu.c
X 
X qmail-pop3d: \
-load qmail-pop3d.o prioq.o now.o sig.a open.a getln.a stralloc.a \
-alloc.a substdio.a error.a str.a fs.a
-	./load qmail-pop3d prioq.o now.o sig.a open.a getln.a \
-	stralloc.a alloc.a substdio.a error.a str.a fs.a 
+load qmail-pop3d.o prioq.o now.o auto_qmail.o qmail.o qi_open.o sig.a open.a \
+getln.a stralloc.a alloc.a substdio.a error.a str.a fs.a fd.a wait.a env.a \
+control.o received.o date822fmt.o datetime.a
+	./load qmail-pop3d prioq.o now.o auto_qmail.o qmail.o qi_open.o \
+	control.o received.o date822fmt.o datetime.a sig.a \
+	open.a getln.a stralloc.a alloc.a substdio.a error.a env.a fs.a \
+	fd.a wait.a str.a
X 
X qmail-pop3d.0: \
X qmail-pop3d.8
@@ -1268,7 +1277,7 @@
X datetime.h datetime.h prioq.h gen_alloc.h prioq.h qmail-pop3d.c \
X scan.h qmail-pop3d.c fmt.h qmail-pop3d.c error.h qmail-pop3d.c str.h \
X qmail-pop3d.c exit.h qmail-pop3d.c now.h datetime.h datetime.h now.h \
-qmail-pop3d.c readwrite.h qmail-pop3d.c
+qmail-pop3d.c readwrite.h qmail-pop3d.c received.h control.h qi_open.h
X 	./compile qmail-pop3d.c
X 
X qmail-popup: \
SHAR_EOF
  $shar_touch -am 0109113598 'xmit/Makefile.patch' &&
  chmod 0444 'xmit/Makefile.patch' ||
  $echo 'restore of' 'xmit/Makefile.patch' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'xmit/Makefile.patch:' 'MD5 check failed'
dbc1beebdfb67a9e6f9d04987b557735  xmit/Makefile.patch
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'xmit/Makefile.patch'`"
    test 1664 -eq "$shar_count" ||
    $echo 'xmit/Makefile.patch:' 'original size' '1664,' 'current size' "$shar_count!"
  fi
fi
rm -fr _sh25856
exit 0