From Halon, SMTP software for hosting providers
Revision as of 13:50, 27 September 2017 by Fredrik (talk | contribs)
Jump to: navigation, search

Messages can be archived on the system's storage disk; which means a copy of the message stored in what we call a "quarantine" while still being delivered.

To enable archiving, follow these steps:

  1. Make sure that your storage disk on Hosts > System > Hardware is large enough for your needs (otherwise, add more disk)
  2. Add a quarantine (it's like a folder) on the Configuration > Email engine > Quarantine and archive page
    • Possibly with a name such as "Archive"
    • Pick a appropriate retention policy from the list based on the size of the storage disk, for example "Delete after 1 month"
    • Remember the ID (mailquarantine:X) of the newly added folder
  3. In the DATA flow that the messages to be archived are processed by (somewhere right before delivery), add the following code in a script block:
Quarantine("mailquarantine:X", ["done" => false, "reject" => false]);

or you could override the Deliver() function by placing the following at the top of the flow (or as an included file):

 function Deliver(...$args) {
      Quarantine("mailquarantine:X", ["done" => false, "reject" => false]);
      builtin Deliver();