Table: imap_mailbox
Query information about mailboxes accessible on the IMAP server (e.g. INBOX
, [Gmail]/Sent Mail
).
Examples
List all mailboxs
select *from imap_mailbox
Get a specific mailbox
select *from imap_mailboxwhere name = '[Gmail]/Starred'
Mailboxes by message count
select name, messagesfrom imap_mailboxorder by messages desc
Mailboxes with unseen messages
select name, unseenfrom imap_mailboxwhere unseen > 0order by unseen desc
Get all mailboxes with the Important attribute
select *from imap_mailboxwhere attributes ? '\Important'
.inspect imap_mailbox
Mailboxes in IMAP.
Name | Type | Description |
---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. |
attributes | jsonb | Attributes set on the mailbox. |
delimiter | text | The server's path separator. |
flags | jsonb | The mailbox flags. |
messages | bigint | The number of messages in this mailbox. |
name | text | Name of the mailbox, e.g. 'INBOX', '[Gmail]/Drafts'. |
permanent_flags | jsonb | The mailbox permanent flags. |
read_only | boolean | True if the mailbox is open in read-only mode. |
recent | bigint | The number of messages not seen since the last time the mailbox was opened. |
unseen | bigint | The number of unread messages. |