4 author: Michael Orlitzky
5 maintainer: Michael Orlitzky <michael@orlitzky.com>
7 license-file: doc/LICENSE
8 bug-reports: mailto:michael@orlitzky.com
12 doc/mailbox-countrc.example
13 doc/man1/mailbox-count.1
14 test/fixtures/postfixadmin.sqlite3
16 Count mailboxes in a SQL database.
21 mailbox-count [OPTIONS]
24 Mailbox-count produces a simple count of mailboxes that exist
25 per-domain in some SQL database. The default queries are compatible
26 with the schema used by PostfixAdmin <http://postfixadmin.sourceforge.net/>,
27 but it is possible to supply your own queries via the @--summary-query@
28 and @--detail-query@ options.
30 The summary report lists each domain, along with the number of
31 mailboxes owned by that domain. The order is determined by the summary
32 query, which lists the domains alphabetically by default.
34 The default detail report shows the same, but also contains a list of
35 each individual mailbox (again in alphabetical order) belonging to the
44 Either a summary, or detailed report (with @--detail@) of the
45 number of mailboxes per-domain contained in the database.
53 The name of the database (or file, if SQLite) to which we should
56 Default: The name of the current user (Postgres only).
62 Produce a detailed report listing all mailboxes by domain.
68 SQL query used to produce the detail report. This should return the
69 set of all (domain, username) pairs. See the default value for an
72 Default: \"SELECT domain,username FROM mailbox ORDER BY domain;\"
78 Hostname where the database is located (Postgres-only).
80 Default: None, a UNIX domain socket connection is attempted (Postgres only)
86 Password used to connect to the database (Postgres-only).
88 Default: None (assumes passwordless authentication)
93 Port number used to connect to the database (Postgres-only).
95 Default: None, a UNIX domain socket connection is attempted (Postgres only)
101 SQL query used to produce the summary report. This should return
102 (domain, user count) pairs. See the default value for an
105 Default: \"SELECT domain,COUNT(username) FROM mailbox GROUP BY domain
112 Username used to connect to the database (Postgres-only).
114 Default: The current user
118 The default summary report:
121 $ mailbox-count --database=postfixadmin.sqlite3
122 Summary (number of mailboxes per domain)
123 \----------------------------------------
130 The more detailed report:
133 $ mailbox-count --detail --database=postfixadmin.sqlite3
134 Detail (list of all mailboxes by domain)
135 \----------------------------------------
154 executable mailbox-count
163 HDBC-postgresql >= 2.3,
177 OptionalConfiguration
182 type: exitcode-stdio-1.0
183 hs-source-dirs: src test
184 main-is: TestSuite.hs
193 HDBC-postgresql >= 2.3,
202 type: exitcode-stdio-1.0
207 -- Additional test dependencies.
213 source-repository head
215 location: http://gitweb.michael.orlitzky.com/mailbox-count.git