Crates.io | asimov-imap-module |
lib.rs | asimov-imap-module |
version | 0.1.7 |
created_at | 2025-07-05 14:36:46.763477+00 |
updated_at | 2025-08-10 11:08:05.674095+00 |
description | ASIMOV module for IMAP email import. |
homepage | https://github.com/asimov-modules |
repository | https://github.com/asimov-modules/asimov-imap-module |
max_upload_size | |
id | 1739163 |
size | 659,710 |
ASIMOV module for IMAP email import.
.env
(aka dotenv) files.asimov module install imap -v
cargo install asimov-imap-module
asimov list imaps://imap.ietf.org/Shared%20Folders/json-canon
asimov list imaps://imap.ietf.org/Shared%20Folders/json-canon -o json
asimov-imap-cataloger imaps://imap.gmail.com/INBOX -n5
asimov-imap-fetcher imaps://imap.gmail.com/INBOX#mid
Typically, authentication credentials are required to access an IMAP mailbox. These can be supplied in three different ways, listed below in order of precedence:
imaps:
URLAuthentication credentials can be supplied inline in the URL, as follows:
asimov-imap-cataloger imaps://myuser:mypassword@host:port/mailbox
Authentication credentials can also be supplied via environment variables, as follows:
export ASIMOV_IMAP_USER=myuser
export ASIMOV_IMAP_PASSWORD=mypassword
asimov-imap-cataloger imaps://host:port/mailbox
~/.netrc
fileAuthentication credentials can also be supplied via the ~/.netrc
(aka
$HOME/.netrc
) file, as follows:
machine host
login myuser
password mypassword
asimov-imap-cataloger imaps://host:port/mailbox
To connect to your Gmail (aka Google Mail) account, follow these steps:
Then, construct your IMAP credentials and URL as follows:
imaps:
URL scheme for a secure connection.@gmail.com
, @googlemail.com
,
or your own Google Workspace domain name--as the IMAP username.imap.gmail.com
for the IMAP hostname.The authentication credentials can be configured using any of the aforementioned methods.
For example, configure the ~/.netrc
(aka $HOME/.netrc
) file to store your
Gmail credentials as follows:
machine imap.gmail.com
login myuser@gmail.com
password myapppassword
Test your configuration by attempting to list the first five email messages in your inbox:
asimov-imap-cataloger imaps://imap.gmail.com/INBOX -n5
Provider | Protocol | Username | Hostname | Port |
---|---|---|---|---|
Alibaba Mail | imap: |
myuser@alibaba.com |
imap.alibaba.com |
143 |
AOL Mail | imaps: |
myuser@aol.com |
imap.aol.com |
993 |
Fastmail | imaps: |
myuser@fastmail.com |
imap.fastmail.com |
993 |
GMX Mail | imaps: |
myuser@gmx.com |
imap.gmx.com |
993 |
Gmail (Google Mail) | imaps: |
myuser@gmail.com |
imap.gmail.com |
993 |
iCloud Mail | imaps: |
myuser@icloud.com |
imap.mail.me.com |
993 |
Mail.com | imaps: |
myuser@mail.com |
imap.mail.com |
993 |
NetEase Mail (163) | imaps: |
myuser@163.com |
imap.163.com |
993 |
NetEase Mail (126) | imaps: |
myuser@126.com |
imap.126.com |
993 |
Outlook | imaps: |
myuser@outlook.com |
outlook.office365.com |
993 |
Proton Mail | imaps: |
myuser@proton.me |
127.0.0.1 |
1143 |
QQ Mail | imaps: |
myuser@qq.com |
imap.qq.com |
993 |
Sina Mail | imaps: |
myuser@sina.com |
imap.sina.com |
993 |
Sohu Mail | imaps: |
myuser@sohu.com |
imap.sohu.com |
993 |
Yahoo Mail | imaps: |
myuser@yahoo.com |
imap.mail.yahoo.com |
993 |
Zoho Mail | imaps: |
myuser@zoho.com |
imap.zoho.com |
993 |
asimov-imap-cataloger
: lists email messages in an IMAP mailboxasimov-imap-fetcher
: fetches email messages from an IMAP mailboxasimov-imap-cataloger
asimov-imap-cataloger
Usage: asimov-imap-cataloger [OPTIONS] <IMAP-MAILBOX-URL>
Arguments:
<IMAP-MAILBOX-URL> An `imaps://user@host:port/mailbox` (or `imap://...`) URL to the IMAP mailbox to catalog
Options:
-d, --debug Enable debugging output
--license Show license information
-v, --verbose... Enable verbose output (may be repeated for more verbosity)
-V, --version Print version information
-b, --order-by <PROPERTY> Order messages by a property [default: none] [possible values: none, timestamp, date, from, to, cc, size]
-n, --limit <COUNT> Limit the number of messages to catalog
-o, --output <FORMAT> Set the output format [default: cli] [possible values: cli, json, jsonld, jsonl]
-h, --help Print help (see more with '--help')
asimov-imap-fetcher
asimov-imap-fetcher
Usage: asimov-imap-fetcher [OPTIONS] <IMAP-MESSAGE-URL>
Arguments:
<IMAP-MESSAGE-URL> An `imaps://user@host:port/mailbox#mid` (or `imap://...`) URL to the message to fetch
Options:
-d, --debug Enable debugging output
--license Show license information
-v, --verbose... Enable verbose output (may be repeated for more verbosity)
-V, --version Print version information
-o, --output <FORMAT> The output format
-h, --help Print help
git clone https://github.com/asimov-modules/asimov-imap-module.git