CHEWMAIL(1)

πŸ“¦
version 1.4.1 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ’Œ CHEWMAIL(1) β€” the mail archiver, bestie edition

okay so. chewmail is a Perl manual page from User Contributed Perl Documentation, and if you've ever wanted to yeet old mail into an archive box instead of doom-scrolling your inbox, this is THE one. come sit with me, we're doing this together πŸ’–


✨ NAME ✨

chewmail β€” mail archiver πŸ—ƒοΈβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

chewmail [OPTIONS] <MAILBOX> ...

that's it. that's the whole vibe. give it options, give it a mailbox (or like, several), and it goes to work 🫢


πŸ‘‘ DESCRIPTION πŸ‘‘

chewmail is a program for archiving mail. it's inspired by the Python-based archivemail (yes, the O.G.) but honestly? it has more useful semantics. no shade, just facts πŸ’…

all the mail gets archived into the mailbox you name with the --output-box switch, in mbox format. and it can read mailboxes in three formats:

  • mbox
  • Maildir
  • MH

internally, chewmail uses Mail::Box, which means it supports all the file names and URLs that module supports. so whatever weird little URL your Mail::Box heart desires? it's giving supported. 🌈


🌸 OPTIONS 🌸

every single one, no skips, because we don't gatekeep here 🫢

  • -o mailbox-format, --output-box=mailbox-format β€” the mailbox you're archiving messages to. this string gets run through the Date::Format module, so it supports all of its conversion specifiers. the date and time are relative to the message's timestamp β€” or the current time if the timestamp is literally impossible to determine. sample of the specifiers coming up right below ⬇️
%%      PERCENT
%b      month abbr
%B      month
%d      numeric day of the month, with leading zeros (eg 01..31)
%e      numeric day of the month, without leading zeros (eg 1..31)
%D      MM/DD/YY
%G      GPS week number (weeks since January 6, 1980)
%h      month abbr
%H      hour, 24 hour clock, leading 0's)
%I      hour, 12 hour clock, leading 0's)
%j      day of the year
%k      hour
%l      hour, 12 hour clock
%L      month number, starting with 1
%m      month number, starting with 01
%n      NEWLINE
%o      ornate day of month -- "1st", "2nd", "25th", etc.
%t      TAB
%U      week number, Sunday as first day of week
%w      day of the week, numerically, Sunday == 0
%W      week number, Monday as first day of week
%x      date format: 11/19/94
%y      year (2 digits)
%Y      year (4 digits)
  • -d days-old, --days=days-old β€” only archive messages older than this many days. yes, that's "older than than" in the original, I'm not fighting the source material, I'm just relaying it 😭
  • -D date, --date=date β€” only archive messages older than this date. the date can be any date understood by Perl's Date::Parse module. go wild, it speaks fluent Perl-date πŸ—“οΈ
  • -R, --only-read β€” only archive messages that are marked seen or read. read receipts but make it archival πŸ’…
  • --delete-immediately β€” synchronize the mailboxes after every single message is moved. huge emphasis on substantially slower, but it may give you better recovery for some mailbox formats if everything crashes πŸ’€ translate: slow but safe-ish.
  • --preserve-timestamp β€” preserve the atime and mtime of the input mailbox. heads up: this only affects file-based mailboxes, like mbox. πŸ•°οΈ
  • -n, --dry-run β€” go through all the motions of archiving the mail, but don't actually change any mailboxes. rehearsal era, nothing gets touched, no cap 🎭
  • -v, --verbose β€” output more informational messages. use it multiple times for more verbosity. stack it like a combo πŸ—£οΈ
  • -q, --quiet β€” don't output any messages other than error messages. silent mode, main character energy, no commentary 🀫
  • -V, --version β€” print the version number then exit. immediate farewell 😌
  • -h, --help β€” print usage information then exit. also an immediate farewell 🫑

πŸ¦‹ EXAMPLES πŸ¦‹

archive two day old messages in inbox to inbox-old:

chewmail --days 2 -o inbox-old inbox

archive read messages to a mailbox named the year-month of the message:

chewmail --only-read -o %Y-%m inbox

ok the %Y-%m thing is genuinely so cute, it literally names your archive file after the year and month πŸ₯Ήβœ¨


πŸ”₯ SEE ALSO πŸ”₯

archivemail(1), Date::Parse, Date::Format, Mail::Box

iykyk πŸ“š


πŸ’œ AUTHOR πŸ’œ

Eric Dorland <eric@kuroneko.ca>

thank you for your service king 🫑


and that's the whole page, bestie. this was perl v5.40.1, dated 2025-09-04 β€” icon behavior, periodt πŸ‘‘πŸ’–

πŸ“¦ where this page comes from