1MAILDIRPROC(1) User Commands MAILDIRPROC(1)
2
3
4
6 maildirproc - filter emails in local Maildirs
7
9 maildirproc -m <maildir> [-m <maildir> ... ] [options]
10
12 maildirproc continuously monitors one or more maildirs and processes
13 mail in them according to logic in an rc file, a user defined piece of
14 Python code. It also logs its actions to a log file. By default
15 maildirproc operates continuously: when there is no more mail to
16 process, maildirproc sleeps one second and then checks again. And so
17 on. To make maildirproc exit after the first filtering run, pass the
18 --once option.
19
20 maildirproc keeps a list of maildir directories to process. At least
21 one maildir directory must be specified for maildirproc to run. A
22 maildir directory path can be absolute (starting with a slash) or
23 non-absolute. In the latter case, it will be considered relative to
24 the maildir base directory, which defaults to the current working di‐
25 rectory. There are two ways to specify this information: by passing
26 command line options, or by setting attributes on the processor object
27 in the rc file. The rc file has priority over the command line op‐
28 tions.
29
30 In a Maildir++-style setup, the maildir base directory should typically
31 be set to ~/Maildir and the maildir list should include the directory .
32 to make maildirproc process the inbox.
33
34 The default location of the rc file for maildirproc is ~/.mailprocess‐
35 ing/maildir.rc and the default location of its log file is ~/.mailpro‐
36 cessing/log-maildir.
37
38 imapproc can optionally reload the rc file whenever a modification is
39 detected (that is, the file's mtime has changed). This automatic
40 reloading is turned off by default and can be enabled either by passing
41 the --auto-reload-rcfile command line option or by setting the au‐
42 to_reload_rcfile property to True on the processor object in the rc
43 file.
44
46 Common options
47 maildirproc and imapproc both take the following common command line
48 options:
49
50 --version
51 show program's version number and exit
52
53 -h, --help
54 show this help message and exit
55
56 --auto-reload-rcfile
57 turn on automatic reloading of the rc file when it has been mod‐
58 ified
59
60 --dry-run
61 just log what should have been done; implies --once
62
63 -l FILE, --logfile=FILE
64 send log to FILE instead of the default (~/.maildirproc/log-imap
65 for imapproc and ~/.maildirproc/log-maildir for maildirproc).
66 If you are running multiple maildirproc or imapproc instances,
67 you must specify a dedicated log file for each of these.
68
69 --log-level=INTEGER
70 only include log messages with this log level or lower; defaults
71 to 1
72
73 --once only process the maildirs once and then exit; without this flag,
74 maildirproc will scan the maildirs continuously
75
76 -r FILE, --rcfile=FILE
77 use the given rc file instead of the default (~/.maildirproc/de‐
78 fault.rc)
79
80 --test test mode; implies --dry-run, --once, --logfile=- and --verbose
81
82 -v, --verbose
83 increase log level one step
84
85 maildirproc specific options
86 The following options are specific to maildirproc:
87
88 -m DIRECTORY, --maildir=DIRECTORY
89 add DIRECTORY to the set of maildir directories to process (can
90 be passed multiple times); if DIRECTORY is relative, it will be
91 considered relative to the maildir base directory
92
93 -b DIRECTORY, --maildir-base=DIRECTORY
94 set maildir base directory; defaults to the current working di‐
95 rectory
96
97 -p PREFIX, --folder-prefix
98 prefix Maildir names with PREFIX; defaults to '.'
99
100 -s SEP, --folder-separator=SEP
101 use sep as a folder separator in maildir names; defaults to '.'.
102 List style folder names passed to create_folder() will be joined
103 by this character, e.g. ["github", "jrosdahl", "maildirproc"]
104 will become ".github.jrosdahl.maildirproc.
105
107 For some mailprocessing configuration examples, see the examples direc‐
108 tory. You will also find sample logrotate configuration files for
109 mailprocessing in there.
110
112 SIGHUP will cause imapproc to close and re-open its log file. This can
113 be used for online log rotation in continuous mode.
114
116 imapproc(1), mailprocessing(5)
117
118
119
120User Commands MAILDIRPROC(1)