Skip to main content

Archiving

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 -> Anti-spam/virus -> Quarantine 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 "4 weeks"
    • Remember the ID (mailquarantine:X) of the newly added folder
  3. In the EOD (Per recipient) 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(...$args);
}