1. Overview

    Configuring sapes involves two things: (1) setting up config.txt and (2) setting up the file system. config.txt controls how sapes operates and what domains it is responsible for. The file system must be setup so that you have a directory for each domain and a sub-directory under the domain directory for each mailbox.

  2. config.txt

    config.txt is were all of the sapes parameters are stored. mailserv, the sapes program, looks for config.txt in the working directory. If you don't know what the working directory is then simple start sapes from the same directory that config.txt is in. For instance, if config.txt is in /home/doug/sapes then start mailserv like this: cd /home/doug/sapes, ./mailserv. Trying to start mailserv from somewhere else (like cd /home, doug/sapes/mailserv) will result in an error since sapes could not find config.txt.

    There are several parameters in config.txt. Each of them is explained here.

    The port that the SMTP server will listen on. The default is 25.
    The port that the POP3 server will listen on. The default is 115
    The port that the http monitor will listen on. The default is 80
    The directory where mail files temporarily stored before delivery. No default.
    The number of seconds sapes waits between scanning send_dir for mail to send. Default is 1 second.
    The number of threads sapes creates to send e-mails. This allows sapes to communicate with multiple SMTP servers at the same time. Default is 5.
    The number of domains that this configuration file specifies. No default.
    The Nth domain name that this configuration file specifies. The N is a placeholder for the domain number. For instance, if it is the 1st domain name, then it would be domain1. No default.
    The directory were domainN's mailboxes are located. No default.
    Set to 0 to turn the http monitor off, and set to 1 to turn it on. Default is on.
    The directory that contains HTML files that the http monitor uses.

    Here is an example config.txt file.

  3. File System

    1. Domains

      Each domain that is specified in the config.txt file. The config.txt file points to a directory that is created for the domain. For instance, if domain1_mailboxes is /home/doug/, then that directory must be created.

    2. Mailboxes
  4. Domain Setup

    In order to get the e-mail server setup correctly you will have to have a domain that you can configure. You will then need to set the MX records in that domain to point to your machine that you are running sapes on. However, you don't need to do that if you are only going to work on the http monitor. But if you want to setup a complete e-mail server, you will have to do it. In case you don't know, MX stands for mail exchange (I think). It is a DNS record for specifying mail servers for domains.