MBIDLED(1)
π MBIDLED(1) β the group-chat manual page π
okay so bestie, this is mbidled, from the General Commands Manual section β yes that manual. Sit down, grab a strawberry π, and let me tell you about the little daemon-ish icon that runs a command whenever your mailbox changes. It's giving "personal assistant who lives in your terminal" energy, honestly.
β¨ NAME β¨
mbidled β run a command when your mailbox changes. That's it. That's the whole vibe. π¦
πΈ SYNOPSIS πΈ
mbidled -c MBSYNC_CONFIG [-e COMMAND] [OPTION]...
π DESCRIPTION π
mbidled runs COMMAND whenever your mailbox changes. Iconic behaviour, no notes. π
β οΈ CAUTION, bestie, fr fr: this program has not been tested outside the author's own setup. Use it with care. Like, it's cute but it's also a little unhinged β please be careful. π
π COMMANDS π
-c MBSYNC_CONFIGβ path to thembsync(1)configuration file you want it to use. This one's basically required, it's the main character π₯-e COMMANDβ run the shellCOMMANDwhen the mailbox changes. By default, it just syncs the changed mailbox:
mbsync -c $MBIDLED_CONFIG $MBIDLED_CHANNEL:$MBIDLED_MAILBOX
And the following environment variables get set for the program it executes π :
$MBIDLED_CONFIGβ the argument you passed to-c.$MBIDLED_CHANNELβ the name of the changed Channel.$MBIDLED_MAILBOXβ the name of the changed mailbox.
-vβ be verbose. π£οΈ Heads up though: the output may contain sensitive information, so maybe don't paste it in the group chat, iykyk π-hβ display help and exit. The "just tell me what to do" button π«Ά
π¦ STORES π¦
mbidled can watch for mailbox changes in the following stores. Two flavours, both slay β¨
π IMAP
IMAP config gets read from IMAPAccount sections.
It uses the IMAP4 IDLE command (RFC 2177) to watch for changes in INBOX and all mailboxes in the INBOX. namespace. Yes, all of them. Obsessed. π
π§ Maildir
Mailboxes that have a prefix of MaildirStore.Path and MaildirStore.Inbox are the ones being watched.
The filesystem is watched using inotify(7) on Linux systems (if it's supported), or using periodic stat(2) calls in all other cases β refer to libev for the exact details, because that's where the actual magic lives β
π CONFIGURATION π
mbidled was designed to use the configuration file (and format) of mbsync. Reusing the fit, we love to see it π
Besides the standard configuration options, mbidled recognizes some extra options. All of these extension options start with a comment marker character (#) so that they're completely ignored by mbsync. Sneaky? No. Clever. π
The prefix (the part before the colon) is case-sensitive. Don't get cute with the capitalisation, bestie.
π Global
#MBIDLED:StrictPropagate [None|Far|Near|Both]β okay so here's the situation: changes from stores can get registered whileCOMMANDis still running, but there's no way to know whether the program actually handled that change properly, or maybe it completely missed it. π For that reason, the command is scheduled for a re-run to make sure it knows about the latest updates. But β and this is the lowkey funny part β in the vast majority of cases that second run would likely be a no-op, because the change is often generated by the started program itself. This option specifies which sides of the channel should schedule a new command run upon a change (thus propagating potential changes). Optimal choice between safety and low server load can be: forPullNeworPushNew, specifyFarorNearfor this option respectively β that means the side where new mails come from is surely re-checked. (Default=Both) π―#MBIDLED:StartTimeout timeβ after registering a change, wait this many seconds before startingCOMMAND. Stores may emit multiple change notifications for the same change event, so waiting a bit can be useful. (Default=1) β³#MBIDLED:StartInterval timeβ do not runCOMMANDmore often than this many seconds. Boundaries, bestie, we're setting them. (Default=30) π#MBIDLED:Option ...β process the line as if there were no prefix given at all. Can be useful to tweak some options exclusively formbidled. Main character energy for your config file π₯
Examples:
# Disable watching channel.
#MBIDLED:Sync None
# Watch specific mailboxes only.
#MBIDLED:Patterns Archive Sent
π SEE ALSO π
mbsync(1)β go read it, it's the whole reason this exists π«Ά
and that's the page, bestie!! π this little gem is dated May 2022 and it lives in the MBIDLED(1) slot of the General Commands Manual β go forth and let your mailbox changes trigger commands like the icon you are πβ¨π
π¦ where this page comes from
- nixos 26.05: mbidled 0-unstable-2023-09-30
- nixpkgs unstable: mbidled 0-unstable-2023-09-30
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms