]> gitweb.michael.orlitzky.com - list-remote-forwards.git/blob - doc/man1/list-remote-forwards.1
Add a TODO.
[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\-\-forward-query\fR
53 SQL query used to produce a list of all forwards on the mail
54 system. This query should return the set of all (address, goto)
55 triples, where \(dqgoto\(dq is the destination address; i.e. to where
56 the \(dqaddress\(dq forwards. The \(dqgoto\(dq field may contain more
57 than one email address, separated by commas.
58
59 Default: \(dqSELECT address,goto FROM alias ORDER BY address;\(dq
60
61 .IP \fB\-\-host\fR
62 Hostname where the database is located (Postgres-only).
63
64 Default: None, a UNIX domain socket connection is attempted (Postgres only)
65
66 .IP \fB\-\-password\fR
67 Password used to connect to the database (Postgres-only).
68
69 Default: None (assumes passwordless authentication)
70
71 .IP \fB\-\-port\fR
72 Port number used to connect to the database (Postgres-only).
73
74 Default: None, a UNIX domain socket connection is attempted (Postgres only)
75
76 .IP \fB\-\-username\fR
77 Username used to connect to the database (Postgres-only).
78
79 Default: The current user
80
81 .SH EXAMPLES
82
83 .nf
84 .I $ list-remote-forwards --database=postfixadmin.sqlite3
85 user1@example.com -> user1@example.net
86 user2@example.com -> user1@example.org
87 user2@example.com -> user2@example.org
88 user2@example.com -> user3@example.org
89 .fi
90 .SH BUGS
91 .P
92 Send bugs to michael@orlitzky.com.