Import Emails from Maildir Format Mailboxes or .eml files

Spider command line tool spider-import supports importing emails from (local) maildir format mailboxes. It scans all files under given directory path, checks and submits valid email messages for archiving.


If the mailboxes are stored on another machine other than Spider server, please copy the program /usr/local/bin/spider-import to the target server.

Command line arguments:

  • --api-token: The API token.

    Please follow our tutorial API Tokens to either generate a new one, or use an existing one. Replace <api-token> by a real one in our sample commands.

  • --api-endpoint: [Optional] The endpoint of Spider web server, defaults to (it means spider-import is running on Spider server locally).

    • API Endpoint is the URL of Spider web API interface, spider-import will query it to verify whether email is duplicate, and submit for enqueue if it does not exist.

    • If you already request free SSL cert on Spider web UI, Spider will redirect all http traffic to https, hence you must specify endpoint explicitly with https URL. For example:


  • --owner (Introduced in v2.7.0): Owner of the imported mailbox. Must be a valid email address, used to precisely identify the owner.

  • --path: Path to maildir format mailbox(es), or the directory where you store .eml files.

Sample command:

spider-import maildir \
    --api-endpoint \
    --api-token <api-token> \
    --owner \
    --path /path/to/mailbox/

If you're running spider-import on another server, don't forget to specify --api-endpoint with correct Spider server address and port.