]> gitweb.michael.orlitzky.com - list-remote-forwards.git/blob - doc/man1/list-remote-forwards.1
list-remote-forwards.cabal: delete the redundant description
[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 in the list
19 that forward to an address \fBnot\fR in the list are considered remote
20 forwards. Remote forwards can cause problems for a number of reasons,
21 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
51 domain;\(dq
52
53 .IP \fB\-\-exclude-mx\fR,\ \fB-e\fR
54 The name of a mail exchanger, the forwards of whose domains we should
55 ignore. For example, if one mail exchanger, mx1.example.com, has
56 strict spam filtering, it may be acceptable to have remote forwarding
57 for domains that have mx1.example.com as their sole mail exchanger (MX
58 record). In that case, you might want to exclude those domains from
59 the report by naming mx1.example.com here.
60
61 A forward will be excluded from the report only if \fIall\fR of its MX
62 records are contained in the given exclude list.
63
64 This option can be repeated to add mail exchangers to the exclude list.
65
66 Default: [] (empty)
67
68 .IP \fB\-\-forward-query\fR,\ \fB-f\fR
69 SQL query used to produce a list of all forwards on the mail
70 system. This query should return the set of all (address, goto)
71 triples, where \(dqgoto\(dq is the destination address; i.e. to where
72 the \(dqaddress\(dq forwards. The \(dqgoto\(dq field may contain more
73 than one email address, separated by commas.
74
75 Default: \(dqSELECT address,goto FROM alias ORDER BY address;\(dq
76
77 .IP \fB\-\-host\fR,\ \fB-h\fR
78 Hostname where the database is located (Postgres-only).
79
80 Default: None, a UNIX domain socket connection is attempted (Postgres only)
81
82 .IP \fB\-\-password\fR
83 Password used to connect to the database (Postgres-only).
84
85 Default: None (assumes passwordless authentication)
86
87 .IP \fB\-\-port\fR
88 Port number used to connect to the database (Postgres-only).
89
90 Default: None, a UNIX domain socket connection is attempted (Postgres only)
91
92 .IP \fB\-\-username\fR,\ \fB-u\fR
93 Username used to connect to the database (Postgres-only).
94
95 Default: The current user
96
97 .SH CONFIGURATION FILE
98
99 Any of the options above can be placed in a configuration file rather
100 than passed on the command line. An example config file
101 \fIdoc/list-remote-forwardsrc.example\fR is included with the
102 source. You can edit it and rename it to either
103 \fI$sysconfdir/list-remote-forwardsrc\fR or
104 \fI~/.list-remote-forwardsrc\fR. The variable \fI$sysconfdir\fR is
105 determined at build time and is typically \fI/etc\fR on UNIX systems.
106
107 .SH EXAMPLES
108
109 .nf
110 .I $ list-remote-forwards --database=test/fixtures/postfixadmin.sqlite3
111 user1@example.com -> user1@example.net
112 user2@example.com -> user1@example.org
113 user2@example.com -> user2@example.org
114 user2@example.com -> user3@example.org
115 user7@example.com -> user8@example.net
116 .fi
117 .SH BUGS
118 .P
119 Send bugs to michael@orlitzky.com.