Stalwart

All-in-one Mail & Collaboration server. Secure, scalable and fluent in every protocol (IMAP, JMAP, SMTP, CalDAV, CardDAV, WebDAV).

Not yet tested productivity Based on TrueNAS app v2.0.16 (Stalwart v0.16.24)
  1. 1
    Copy the script below
  2. 2
    In HexOS, open Apps, find Stalwart and choose Custom Install
  3. 3
    Paste, then press Install — full guide with screenshots
stalwart.json
Download
1{
12  "version": 5,
23  "script": {
4    "version": "0.1.0",
5    "changeLog": "Auto-generated draft from TrueNAS stalwart 2.0.16"
6  },
7  "requirements": {
38    "locations": ["ApplicationsPerformance"],
49    "specifications": ["2CORE"],
510    "permissions": ["READ_WRITE_LOCATIONS"],
611    "ports": [
12      30340,
13      30341,
14      30342,
15      30343,
16      30344,
17      30345,
18      30346,
19      30347,
20      30348,
21      30349
22    ]
23  },
724  "ensure_directories_exists": [
25    {"path": "$LOCATION(ApplicationsPerformance)"},
26    {"path": "$LOCATION(ApplicationsPerformance)/stalwart"},
27    {
28      "path": "$LOCATION(ApplicationsPerformance)/stalwart/data",
29      "owner": {"user": "apps"},
30      "snapshot": {"id": "data"}
31    }
32  ],
33  "app_values": {
34    "storage": {
835      "data": "$HOST_PATH($LOCATION(ApplicationsPerformance)/stalwart/data)"
36    },
37    "network": {
938      "http_port": {"bind_mode": "published", "port_number": 30340},
1039      "https_port": {"bind_mode": "published", "port_number": 30341},
1140      "smtp_port": {"bind_mode": "published", "port_number": 30342},
1241      "submission_port": {
42        "bind_mode": "published",
43        "port_number": 30343
44      },
1345      "submissions_port": {
46        "bind_mode": "published",
47        "port_number": 30344
48      },
1449      "imap_port": {"bind_mode": "published", "port_number": 30345},
1550      "imaps_port": {"bind_mode": "published", "port_number": 30346},
1651      "pop3_port": {"bind_mode": "published", "port_number": 30347},
1752      "pop3s_port": {"bind_mode": "published", "port_number": 30348},
1853      "sieve_port": {"bind_mode": "published", "port_number": 30349}
54    },
1955    "resources": {"limits": {"cpus": 2, "memory": "$MEMORY(10%, 4096)"}}
56  }
57}

What this script does

Hover or tap a box to see the lines it explains.

  1. Script format

    Tells HexOS this is a version 5 install script, so it knows how to read the rest.

    Line 2

  2. Script revision

    This copy of the script is revision 0.1.0. Latest change: “Auto-generated draft from TrueNAS stalwart 2.0.16”.

    Lines 3–6

  3. Storage locations it needs

    The app uses these HexOS storage locations: App storage (fast). If one isn't set up yet, HexOS will ask you to pick a place for it.

    Line 8

  4. Minimum hardware

    Recommended minimum: 2 CPU cores.

    Line 9

  5. Permission to use your folders

    Allows the app to read and write files inside the storage locations listed above — and nowhere else.

    Line 10

  6. Network ports

    The app needs ports 30340, 30341, 30342, 30343, 30344, 30345, 30346, 30347, 30348 and 30349 to be free on your server. A port is like an apartment number for your server's address.

    Lines 11–22

  7. Folders created on install

    Creates the folders the app needs before it starts: App storage (fast) › stalwart and App storage (fast) › stalwart › data. Some folders are handed to a specific system user so the app is allowed to write to them. Folders marked “snapshot” are included in HexOS snapshots, so you can roll them back.

    Lines 24–32

  8. Where the app's main data is saved

    Where the app's main data is saved on your server: App storage (fast) › stalwart › data.

    Line 35

  9. Http port: 30340

    The app's web page is published on port 30340. You don't need to remember it — clicking the app's card in HexOS takes you there.

    Line 38

  10. Https port: 30341

    Publishes the app's https port as 30341.

    Line 39

  11. Smtp port: 30342

    Publishes the app's smtp port as 30342.

    Line 40

  12. Submission port: 30343

    Publishes the app's submission port as 30343.

    Lines 41–44

  13. Submissions port: 30344

    Publishes the app's submissions port as 30344.

    Lines 45–48

  14. Imap port: 30345

    Publishes the app's imap port as 30345.

    Line 49

  15. Imaps port: 30346

    Publishes the app's imaps port as 30346.

    Line 50

  16. Pop3 port: 30347

    Publishes the app's pop3 port as 30347.

    Line 51

  17. Pop3s port: 30348

    Publishes the app's pop3s port as 30348.

    Line 52

  18. Sieve port: 30349

    Publishes the app's sieve port as 30349.

    Line 53

  19. Resource limits

    Caps how much of your server the app can use: 2 CPU cores and 10% of your server's memory, but never more than 4 GB. This keeps one busy app from slowing everything else down.

    Line 55