imap
extension
IMAP email management tool — search/fetch, move/copy, flag, create drafts, file messages, and STARTTLS support
emailimapmailproductivity
Open Settings → Add-Ons and pick imap
Source: addons/imap

Install

Open Settings → Add-Ons and install imap from the catalog.

IMAP email management addon for piclaw.

Includes a web settings pane for managing accounts.

IMAP settings pane on the microVM test instance

Features

What it is for

Use this addon when you want Pi to:

It is not an SMTP sender or a full mail client.

Storage model

SQLite KV store

Non-secret account settings are stored in the extension SQLite KV store:

Keychain

Passwords are stored in keychain only:

Settings pane

The settings pane supports:

Per-account fields

Security modes

Implicit TLS

Use:

STARTTLS

Use:

Plain IMAP

Use:

Only sensible on a trusted LAN.

Accept untrusted certificates

allowInsecureTls: true disables certificate verification for that account.

This covers:

Use it only when necessary.

Account management through the tool

In addition to the settings pane, the imap tool supports:

Example: save account

json
{
  "action": "save_account",
  "account": "local",
  "host": "192.168.1.250",
  "port": 143,
  "user": "rcarmo",
  "pass": "...",
  "tls": "false",
  "starttls": "true",
  "allowInsecureTls": "true",
  "setDefault": "true"
}

Mailbox actions

The same tool also supports:

Examples

List accounts

json
{
  "action": "list_accounts"
}

Search unread mail

json
{
  "action": "search",
  "account": "local",
  "folder": "INBOX",
  "seen": "false",
  "limit": 20
}

Fetch full source

json
{
  "action": "fetch",
  "account": "local",
  "folder": "INBOX",
  "uids": "12345",
  "withBody": "true"
}

Create draft

json
{
  "action": "create_draft",
  "account": "local",
  "draftTo": "someone@example.com",
  "draftSubject": "Test draft",
  "draftBody": "Hello from Pi"
}

Operational note for the local Synology-style server

In your current local setup:

So the working temporary config was:

json
{
  "host": "192.168.1.250",
  "port": 143,
  "user": "rcarmo",
  "tls": false,
  "starttls": true,
  "allowInsecureTls": true,
  "from": "rcarmo"
}

Once the certificate is renewed, allowInsecureTls should be set back to false.

Notes