ArchiveSMTP is a milter - an e-mail filtering program that uses the milter API and protocol to interface with your mail server.

Current versions of Sendmail, Postfix and Postoffice all support the use of milters. If you don't use one of those you will need to check that your MTA has support for milters.

The primary purpose of ArchiveSMTP is to provide a server-level mechanism for storing a copy of e-mail sent from clients it services - an archive of their SMTP requests, as the name implies. The secondary goal of the software is to provide a high level of customisation as to what mail is archived and where the archived mail goes, while still remaining simple to set up.

  • Simple configuration using 'rules' to match mail and store it in the location(s) you want.
  • Can perform string matches against SMTP Login username for error-proof identification, with additional support for matching From and To addresses.
  • Multi-threaded, using partial file locks if supported for best write performance and interoperation with other software.
  • Supports mbox file format, readable by many other tools such as procmail.
  • At first glance this may seem like an odd use for a mail filter. It came about while investigating e-mail backups for business. It became clear early on that user mail clients could not be relied on; archiving incoming mail was trivial, but what about outgoing mail? We needed a way to archive this mail reliably on the server without any major changes to the existing mail system.

    The second problem then, was how to identify who the mail actually belonged to. Since the from: address in the mail header is entirely up to the client, we needed a better way to determine who was sending the mail.

    No existing tools seemed to meet these requirements. We decided that the best way to decide who was sending a mail would be to require SMTP Login, so that even if 'bob' set their from address to 'fred' the login details would still show this mail belonged to 'bob'.

    Enter the milter library, which would allow us to interface with an existing MTA, find out the user the mail belongs to and store a copy of it in a place specific to that user. Perfect!