Simple mail transport agent architecture
For more information about this document, see my notes on a
new sSMTP.
Goals
The goal is to write a very simple mail transport agent. It would not
accept incoming mail, but only deal with outgoing mail. It would deliver mail
locally, support several profiles to make the life of laptop users with
several ISPs easier, and support queuing.
Functions
One should be able to:
- send emails (obviously).
- see the state of the queue.
- send the queued messages.
Gory details
Here is how I think that the program should work:
- Parse the command line.
- Parse the configuration file.
- Store the email being sent in the spool directory, along with a control
file containing the following information:
- current time.
- sender.
- recipients.
- status of the delivery?
- Attempt to deliver the email:
- either deliver the email remotely.
- or do it locally (using Procmail, for example).
- Depending on what happens at that point:
- If the email was successfully delivered, remove the message from the
spool directory.
- If there was a permanent error, notify the user by sending an email
(problem: what if the email has to be delivered remotely and it fails
again)
- If it is a temporary error, exit and let another process go through
the messages queued and try again at a later date.
I do not know yet if the program would/should honor
.forwards.
Hugo Haas <hugo@larve.net>
$Id: design.html 1097 2001-02-17 17:17:34Z hugo $