home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff225.lzh / AmigaTCP / src / smtp.h < prev    next >
C/C++ Source or Header  |  1989-06-24  |  2KB  |  68 lines

  1. /* Turn off the next line if your system doesn't have a clock */
  2. #define    DATE
  3. /* #define USERNAME "bdale"        /* name of local user */
  4. /* #define SMTPGATE "44.32.0.1"        /* address to punt mail to */
  5. #define SMTP_PORT    25        /* well-known port for smtp */
  6. #define SMTPCLITIME    900        /* 15 minutes between client starts */
  7.  
  8. /* currently, the below definitions are set up to put incoming mail activity
  9.    in \spool\mail, and outgoing mail activity in \spool\mqueue.  Twiddle to
  10.    suit, this is for pseudo-compatibility with 4bsd, since that's what I'm
  11.    most familiar with...    Bdale  */
  12.  
  13. #ifndef    AMIGA
  14. /* Mail box file name template - edit to taste */
  15. #define    MAILSPOOL    "/spool/mail/%s.txt"
  16. /* path for outgoin mail files */
  17. #define MAILQDIR    "/spool/mqueue/"
  18. #else    AMIGA
  19. #define    MAILSPOOL    "INET:mail/%s.txt"
  20. #define    MAILQDIR    "INET:mqueue/"
  21. #endif
  22.  
  23. extern char hostname[];
  24. #define    LINELEN        128
  25. #define SLINELEN    32
  26.  
  27. /* Recipient address entry */
  28. struct addr {
  29.     struct addr *next;
  30.     char *val;
  31. };
  32. #define    NULLADDR    (struct addr *)NULL
  33.  
  34. /* Per-session control block */
  35. struct mail {
  36.     struct tcb *tcb;    /* TCP control block pointer */
  37.     char state;
  38. #define    COMMAND_STATE    0
  39. #define    DATA_STATE    1
  40.  
  41.     char *system;        /* Name of remote system */
  42.     struct addr *to;    /* Linked list of recipients */
  43.     char buf[LINELEN];    /* Input buffer */
  44.     char cnt;        /* Length of input buffer */
  45.     FILE *data;        /* Temporary input file pointer */
  46. };
  47. #define    NULLMAIL    (struct mail *)NULL
  48.  
  49. struct smtp_msg {
  50.     struct tcb *tcb;    /* tcp task control buffer */
  51.     char cts;        /* used as boolean, true if space avail in
  52.                    tcp buffer */
  53.     char state;        /* state machine placeholder */
  54. #define CLI_OPEN_STATE    0
  55. #define CLI_MAIL_STATE    1
  56. #define CLI_RCPT_STATE    2
  57. #define CLI_DATA_STATE    3
  58. #define    CLI_SEND_STATE    4
  59. #define    CLI_UNLK_STATE    5
  60. #define CLI_QUIT_STATE    6
  61.     char    *filename;    /* name of workfile */
  62.     char    toaddr[LINELEN],
  63.         fromaddr[LINELEN];
  64.     char buf[LINELEN];    /* Input buffer */
  65.     char cnt;        /* Length of input buffer */
  66.     FILE *wfile, *tfile;
  67. };
  68.