MAILDIRPROC(1)
π¦ MAILDIRPROC π¦
okay so bestie, welcome to maildirproc β the little Unix page that's literally just here to filter emails in local Maildirs π no cap.
β¨ NAME β¨
maildirproc β filter emails in local Maildirs π
πΈ SYNOPSIS πΈ
maildirproc -m <maildir> [-m <maildir> ... ] [options]
π DESCRIPTION π
So maildirproc justβ¦ sits there and continuously monitors one or more maildirs, and processes the mail inside them according to the logic in an rc file β which is a user defined piece of Python code, periodt. It also logs all its actions to a log file, because receipts matter π .
By default, maildirproc operates continuously: when there's no more mail to process, it sleeps for one second and then checks again. And so on. Forever. Main character energy π«Ά. To make maildirproc exit after the very first filtering run, pass the --once option.
maildirproc keeps a list of maildir directories to process. At least one maildir directory must be specified for it to run β no maildirs, no vibes. A maildir directory path can be absolute (starting with a slash /) or non-absolute. If it's non-absolute, it'll be considered relative to the maildir base directory, which defaults to the current working directory.
There are two ways to specify this info, bestie:
- by passing command line options, or
- by setting attributes on the processor object in the rc file.
And heads up: the rc file has priority over the command line options. The rc file ate and left no crumbs π.
In a Maildir++-style setup, the maildir base directory should typically be set to ~/Maildir and the maildir list should include the directory . to make maildirproc process the inbox π₯.
The default location of the rc file for maildirproc is ~/.mailprocessing/maildir.rc and the default location of its log file is ~/.mailprocessing/log-maildir.
Also!! imapproc can optionally reload the rc file whenever a modification is detected (that is, when the file's mtime has changed). This automatic reloading is turned off by default, and you can enable it either by passing the --auto-reload-rcfile command line option, or by setting the auto_reload_rcfile property to True on the processor object in the rc file. Two paths to the same glow-up β¨.
π OPTIONS π
π Common options
maildirproc and imapproc both take the following common command line options, iykyk:
--versionβ show program's version number and exit. Short, sweet, iconic.-h,--helpβ show this help message and exit π--auto-reload-rcfileβ turn on automatic reloading of the rc file when it has been modified π--dry-runβ just log what should have been done; implies--once. Perfect for the "what would I do if I were brave" era π«£-l FILE,--logfile=FILEβ send log toFILEinstead of the default (~/.maildirproc/log-imapfor imapproc and~/.maildirproc/log-maildirfor maildirproc). If you're running multiple maildirproc or imapproc instances, you must specify a dedicated log file for each of these. No sharing, bestie, that's not the vibe π€--log-level=INTEGERβ only include log messages with this log level or lower; defaults to1--onceβ only process the maildirs once and then exit; without this flag, maildirproc will scan the maildirs continuously βΎοΈ-r FILE,--rcfile=FILEβ use the given rc file instead of the default (~/.maildirproc/default.rc)--testβ test mode; implies--dry-run,--once,--logfile=-and--verboseπ§ͺ-v,--verboseβ increase log level one step π’
π maildirproc specific options
The following options are specific to maildirproc:
-m DIRECTORY,--maildir=DIRECTORYβ addDIRECTORYto the set of maildir directories to process (can be passed multiple times); ifDIRECTORYis relative, it will be considered relative to the maildir base directory π-b DIRECTORY,--maildir-base=DIRECTORYβ set maildir base directory; defaults to the current working directory π-p PREFIX,--folder-prefixβ prefix Maildir names withPREFIX; defaults to'.'-s SEP,--folder-separator=SEPβ usesepas a folder separator in maildir names; defaults to'.'. List style folder names passed tocreate_folder()will be joined by this character, e.g.["github", "jrosdahl", "maildirproc"]will become.github.jrosdahl.maildirproc.
π EXAMPLES π
For some mailprocessing configuration examples, see the examples directory π. You'll also find sample logrotate configuration files for mailprocessing in there. Go look, it's giving organized π§
π₯ SIGNALS π₯
SIGHUP will cause imapproc to close and re-open its log file πβ‘οΈπ. This can be used for online log rotation in continuous mode. Rotate those logs live, queen π.
πΈ SEE ALSO πΈ
imapproc(1), mailprocessing(5)
bestie reminder: if you want a different log file, a different rc file, or a whole different maildir base, all of that is up there π don't @ me, just read the options π
and that's the whole page, fr fr β this one came from the User Commands section, it's page maildirproc(1), and that's the entire legend of how maildirproc filters emails in local Maildirs. mwah π
π¦ where this page comes from
- fedora 43: mailprocessing 1.2.7-14.fc43 Β· GPL-2.0-only
- fedora 44: mailprocessing 1.2.7-15.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms