bcc7b9c04e754d945f434f49f705a399a2bc1458
[list-remote-forwards.git] / doc / man1 / list-remote-forwards.1
1 .TH list-remote-forwards 1
2
3 .SH NAME
4 list\-remote\-forwards \- List all remote forwards for mail accounts stored in
5 a SQL database
6 .SH SYNOPSIS
7
8 \fBlist-remote-forwards\fR [\fIOPTIONS\fR]
9 .SH INPUT
10 .P
11 None.
12 .SH OUTPUT
13 .P
14 A list of addresses that are forwarded to remote domains.
15 .SH DESCRIPTION
16 .P
17 A list of local domains is supplied to the program (more or less)
18 through the \fI\-\-domain\-query\fR option. Any addresses which
19 forward to another address not contained in this list of local domains
20 is considered a remote forward. Remote forwards can cause problems for
21 a number of reasons, the most common of which are,
22 .IP \(bu 2
23 If the sender has an SPF record authorizing his mail server to send
24 mail on his behalf, then when his message is forwarded by the
25 recipient's mail server, it will fail any subsequent SPF checks. This
26 will likely cause the message to be rejected, and the original
27 recipient's server will generate backscatter.
28 .IP \(bu
29 If any spam makes it through the filter on the recipient's mail
30 server, that spam will then be forwarded to a remote destination. The
31 remote destination will blame the forwarding server for the spam, and
32 that can impact its reputation and potentially lead to a blacklisting
33 even though the spam did not originate on the recipient's server.
34 .P
35 Whether or not these are an issue depends on the circumstances, but in
36 any case it is useful to know who is forwarding mail off-site.
37 .SH OPTIONS
38
39 .IP \fB\-\-database\fR
40 The name of the database (or file, if SQLite) to which we should
41 connect.
42
43 Default: The name of the current user (Postgres only).
44
45 .IP \fB\-\-domain-query\fR
46 SQL query used to produce a list of local domains. This should return
47 the set of all domains (i.e one column) that are local to the
48 server. See the default value for an example.
49
50 Default: \(dqSELECT domain FROM domain WHERE domain <> 'ALL' ORDER BY domain;\(dq
51
52 .IP \fB\-\-exclude-mx\fR,\ \fB-e\fR
53 The name of a mail exchanger, the forwards of whose domains we should
54 ignore. For example, if one mail exchanger, mx1.example.com, has
55 strict spam filtering, it may be acceptable to have remote forwarding
56 for domains that have mx1.example.com as their mail exchanger (MX
57 record). In that case, you might want to exclude those domains from
58 the report by naming mx1.example.com here.
59
60 Default: [] (empty)
61
62 .IP \fB\-\-forward-query\fR,\ \fB-f\fR
63 SQL query used to produce a list of all forwards on the mail
64 system. This query should return the set of all (address, goto)
65 triples, where \(dqgoto\(dq is the destination address; i.e. to where
66 the \(dqaddress\(dq forwards. The \(dqgoto\(dq field may contain more
67 than one email address, separated by commas.
68
69 Default: \(dqSELECT address,goto FROM alias ORDER BY address;\(dq
70
71 .IP \fB\-\-host\fR,\ \fB-h\fR
72 Hostname where the database is located (Postgres-only).
73
74 Default: None, a UNIX domain socket connection is attempted (Postgres only)
75
76 .IP \fB\-\-password\fR
77 Password used to connect to the database (Postgres-only).
78
79 Default: None (assumes passwordless authentication)
80
81 .IP \fB\-\-port\fR
82 Port number used to connect to the database (Postgres-only).
83
84 Default: None, a UNIX domain socket connection is attempted (Postgres only)
85
86 .IP \fB\-\-username\fR,\ \fB-u\fR
87 Username used to connect to the database (Postgres-only).
88
89 Default: The current user
90
91 .SH EXAMPLES
92
93 .nf
94 .I $ list-remote-forwards --database=postfixadmin.sqlite3
95 user1@example.com -> user1@example.net
96 user2@example.com -> user1@example.org
97 user2@example.com -> user2@example.org
98 user2@example.com -> user3@example.org
99 .fi
100 .SH BUGS
101 .P
102 Send bugs to michael@orlitzky.com.