4 mailbox\-count \- Count mailboxes in a SQL database.
7 \fBmailbox-count\fR [\fIOPTIONS\fR]
13 Either a summary, or detailed report (with \fI\-\-detail\fR) of the
14 number of mailboxes per-domain contained in the database.
16 The summary shows only the per-domain mailbox count, while the
17 detailed report shows both the count and a list of mailboxes.
20 Mailbox-count produces a simple count of mailboxes that exist per-domain in some SQL database. The user supplies the...
23 .IP \fB\-\-database\fR
24 The name of the database (or file, if SQLite) to which we should
27 Default: The name of the current user (Postgres only).
29 .IP \fB\-\-detail\fR,\ \fB-d\fR
30 Produce a detailed report listing all mailboxes by domain.
32 .IP \fB\-\-detail-query\fR
33 SQL query used to produce the detail report. This should return the
34 set of all (domain, username) pairs. See the default value for an
37 Default: \(dqSELECT domain,username FROM mailbox ORDER BY domain;\(dq
39 .IP \fB\-\-hostname\fR
40 Hostname where the database is located (Postgres-only).
42 Default: None, a UNIX domain socket connection is attempted (Postgres only)
44 .IP \fB\-\-password\fR
45 Password used to connect to the database (Postgres-only).
47 Default: None (assumes passwordless authentication)
50 Port number used to connect to the database (Postgres-only).
52 Default: None, a UNIX domain socket connection is attempted (Postgres only)
54 .IP \fB\-\-summary-query\fR
55 SQL query used to produce the summary report. This should return
56 (domain, user count) pairs. See the default value for an
59 Default: \(dqSELECT domain,COUNT(username) FROM mailbox GROUP BY domain ORDER BY domain;\(dq
61 .IP \fB\-\-username\fR
62 Username used to connect to the database (Postgres-only).
64 Default: The current user
69 The default summary report:
72 .I $ mailbox-count postfixadmin.sqlite3
73 Summary (number of mailboxes per domain)
74 ----------------------------------------
81 The more detailed report:
84 .I $ mailbox-count --detail postfixadmin.sqlite3
85 Detail (list of all mailboxes by domain)
86 ----------------------------------------
104 Send bugs to michael@orlitzky.com.