Implement message queuing
Implement a queue between MTA and schleuder (and back to MTA).
Best idea so far: Use a Maildir-structure and a daemon that monitors the
- The MTA drops the messages into the Maildir (a global one vs. one per list?)
- The monitoring daemon detects a new message and writes the message into STDIN of a newly started schleuder-process.
- schleuder runs the message and sends outgoing messages via sendmail or smtp (like before)
- schleuder runs the message and drops any outgoing message into an outgoing Maildir.
- Another monitoring daemon detects that new message and gives it to the MTA.
The advantage of this setup is a separation of schleuder from the MTA without much responsibility for schleuder to care for MTA-failures. In case of delivery errors the outgoing monitoring daemon simply moves the message back from
new and tries again in a few minutes. Schleuder only needs to care about successfully writing into a directory.