◈ Mail → Excel

Excel export for IT admins

By the Mail → Excel team · Updated 2026-10-20

Migration and offboarding need facts: size, count, last activity and forwarding rules. Guessing here breaks migrations. This page lists the exact columns, an example row and the command that produces it.

Columns to keep

ColumnWhy it matters
mailboxWhich mailbox the row belongs to; essential for audits.
sizeMailbox size — the number that decides a migration approach.
messagesMessage count; keep it next to the row count as a completeness check.
last_loginLast activity date — the offboarding signal.
forwardingForwarding status; server rules are not visible over IMAP, so record what you verified.

Example row

One real-shaped row from this role’s export:

mailboxsizemessageslast_loginforwarding
sales@company.com12.4 GB48,2102026-10-18external

Export it in one command

python mail_to_excel.py \
  --host imap.example.com --user you@example.com \
  --days 31 --fields mailbox,size,messages,last_login,forwarding \
  --out it-admin.xlsx

The --fields option is what turns a raw dump into a report your role can use.

Provider notes

Microsoft 365 tenants usually disable basic auth; plan OAuth (or an export from the admin center) before the run.

Two pitfalls that ruin the file

Next step

Step-by-step: export it admin email to Excel · all roles · ready script ($3)

FAQ

Can I audit 200 mailboxes?

Yes, loop the script over a list and keep one row per mailbox; expect hours, not minutes.

Does this change mailbox state?

No — read-only mode is enforced by the script and should never be turned off for audits.

Is there a ready script for this?

Yes — the Python script exports any IMAP mailbox with the fields listed above; it costs $3 and runs locally.

Related guides