CHEWMAIL(1)
π 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:
mboxMaildirMH
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 π«Ά
-omailbox-format,--output-box=mailbox-format β the mailbox you're archiving messages to. this string gets run through theDate::Formatmodule, 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)
-ddays-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 π-Ddate,--date=date β only archive messages older than this date. the date can be any date understood by Perl'sDate::Parsemodule. 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 theatimeandmtimeof the input mailbox. heads up: this only affects file-based mailboxes, likembox. π°οΈ-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
- ubuntu resolute: chewmail 1.4.1-3
- ubuntu stonking: chewmail 1.4.1-3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms