
                        FDSMTPOP v. 0.12

At first: Archive FDSMTPOP.ZIP which contain GPL'ed implementation of
SMTP and POP3 mail exchange protocols is accesible at

             http://zipper.paco.net/~yury/freedos.html

filename FDSMTPOP012.ZIP. I'm sure that under DOS name of received file will be
FDSMTPOP.ZIP without 012 suffix. Suffix allow you to select last version ;-).

This implementation uses WATTCP library and have been tested with such
PPP drivers as EtherPPP and DOSPPP.


  ANNOUNCE: In next version (I hope it will be 0.20, not 0.13 :) I plan to
        implement some DNS features from rfc-883 for direct (not via ISP's
        sendmail) mail delivering.

  NEWS: Version 0.12 - now possibility of infinite data waiting is excluded.
        Parameter sock_delay from WATTCP.CFG is maximal waiting time for
        connection, data etc... I don't sure that now code is very beauty, but
        it works, and it seems that this version is usable for BBS'es and other
        automatically controlled environments...
        Also some small changes in error messages and mail boxes handling have
        been made...

        In version 0.11 I've fixed two bugs: pop3 list scanning bug, and
        not very correct protocol switching in some specific cases...
        Now FDSMTPOP more convenient for Pegasus Mail users - thanks to
        Ken Bowley for detailed reports... Now -f argument is have more
        priority then sender address from control file or control header.
        Now FDSMTPOP user can define separate SMTP and POP3 hosts. Except
        -l mode (leave mail on server) there are 2 new modes -n (retrieve
        new mial) and -k (kill old mail). Also everybody may control FDSMTPOP
        verbose level using -v switch.



Sorry - this is a very small description of this program - see sources and
RFC-821 and RFC-1081 for more details. I don't sure that this program is
neccessary for anybody ;-), but I've wrote this program during last weekend
and this is a small gift for myself for my birthday ;-). Also I see some
unsatisfactory features of such programs as POPMAIL for DOS or PMPOP.
Yes, I don't sure that selected program name FDSMTPOP is very good ;-).
This program is implementation of SMTP/POP3 client for DOS and uses WATTCP
library. It supports mail queues styles used by such programs as PMPOP,
FreeEmacs and (still popular in xUSSR with Demos Mail editor:) UUPC (see
remark below). So FDSMTPOP can save inbound messages into separate files in
specified directories or into uucp style mail box, and also understand 3
formats of outbound message:

 1. UUPC sendmail style (default):

          +--------------------------
          |send-mail                   (you may also use name of sender here)
          |user1@domain1               \  Destination address list
          |user2@domain2               /
          |...
          |<<NULL>>                    (literaly:)
          |...Message body...

 2. Pegasus Mail style:

          +--------------------------
          |$$ from_addr
          |T user1@domain1             \  Destination address list
          |T user2@domain2             /
          |...
          |                               Empty line
          |...Message body...

REMARK: before transmitting now FDSMTPOP strip () - comments in from_addr
        field.

 3. FreeEmacs *.wrk file:

          +--------------------------
          |host_addr
          |from_addr
          |user1@domain1               \  Destination address list
          |user2@domain2               /
          |...
          +--------------------------

Command line format and switches:

    FDSMTPOP  <modes> <switches and parameters> +configfile

You may move some or all modes and switches (except -? switch) into
configfile.

    <modes>  - optional - default mode is 'smtp'
               valid modes and combinations: 'smtp', 'pop3', 'smtp pop3'

    <switches>

       -?                     - print help message

       -h host:port:pport     - port and pport are optional decimal SMTP and
                                POP3 TCP ports.
       -H host:port           - define separate POP3 host (and port)

       -d domain              - your domain, will be used in HELO command

       -f from                - from user, will be used in MAIL FROM: command

       -l                     - leave received messages on POP3 server
       -n                     - retrieve new mail
       -k                     - kill old mail

       -qu path               - UUPC outbound queue
       -qp path               - Pegasus Mail outboud queue
       -qe path               - FreeEmacs outbound queue

       -m  path_or_filename   - indound mail directory or mail box

       -p  user:password      - POP3 user and password

       -v  verbose_level      -  0  Silent
                                 1  Logo
                                 2  Error Messages
                                 4  Operation status              <-- default
                                 6  Show commands for server
                                 8  Show server responses
                                10  Show lists and message texts

Some remarks:

  + I recomend to store -p login parameters into configfile.

  + I include only compiled by TC 2.0 (!) WATTCPSM.LIB to this archive, you
    can find same library compiled with BCC 3.11 in Ken Yap's HTGET101.ZIP,
    or simply get sources from ftp://ftp-ns.rutgers.edu/pub/pc/wattcp/ ...

  + Use environment variable FDSMTPOPLOG to enable log and specify log
    filename.

  + Successfully sent outboud messages will be deleted.
  + Undelivered messages will be leaved in outbound queue.
  + Messages delivered to some recepients but undelivered to other will be
    leaved in outbound queue directory but with set attributes Hidden and
    ReadOnly. Error message will be written to logfile.

  + Remark for UUPC users, which want to still use Demos Mail (or other
    UUPC editors) under DOS but using PPP ISP accounts instead uucp:

    At first you must install such driver as EtherPPP or DOSPPP. Then you
    must run 'FDSMTPOP smtp pop3' instead UUCICO. You may still use usual
    editor but you must replace SENDMAIL program (dmail call 'sendmail -l'
    with redirected stdin stream) with your own one which simply save data
    from stdin stream into file located in outbound mail queue directory.
    If you have only one user defined on your system then there are no
    problems: you must specify for FDSMTPOP to receive mail into his mail
    box. Else it is better to receive messages into separate files in
    inbound mail directory, and replace UUXQT with special small tosser which
    will parse headers of incoming messages and append every message to
    correspondent user mail box. Don't forget add to mailbox string
    "From whatever you like...\n" before message body.

Exit codes:

     0                OK
     1                "Hostname is not defined"
     2                "Can't resolve SMTP/POP3 host address"
     3                "TCP error"
     4                "Outbound mail queue directory is not specified"
     5                "Inbound mail directory is not specified"
     6                "Sorry, now direct SMTP access is not implemented"
     7                "POP3 server address is not specified"
    -1                Some as it seems to me impossible cases...

	07/03/97      Yury Semenov   <yury@petre.odessa.ua>
