2 name: list-remote-forwards
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/list-remote-forwardsrc.example
13 doc/man1/list-remote-forwards.1
14 test/fixtures/postfixadmin.sqlite3
16 List all remote forwards for mail accounts stored in a SQL database.
21 list-remote-forwards [OPTIONS]
24 List all remote forwards for mail accounts stored in a SQL database.
26 A list of local domains is supplied to the program (more or less)
27 through the @--domain-query@ option. Any addresses which
28 forward to another address not contained in this list of local domains
29 is considered a remote forward. Remote forwards can cause problems for
30 a number of reasons, the most common of which are,
32 * If the sender has an SPF record authorizing his mail server to send
33 mail on his behalf, then when his message is forwarded by the
34 recipient's mail server, it will fail any subsequent SPF checks. This
35 will likely cause the message to be rejected, and the original
36 recipient's server will generate backscatter.
38 * If any spam makes it through the filter on the recipient's mail
39 server, that spam will then be forwarded to a remote destination. The
40 remote destination will blame the forwarding server for the spam, and
41 that can impact its reputation and potentially lead to a blacklisting
42 even though the spam did not originate on the recipient's server.
44 Whether or not these are an issue depends on the circumstances, but in
45 any case it is useful to know who is forwarding mail off-site.
53 A list of addresses that are forwarded to remote domains.
61 The name of the database (or file, if SQLite) to which we should
64 Default: The name of the current user (Postgres only).
69 SQL query used to produce a list of local domains. This should return
70 the set of all domains (i.e one column) that are local to the
71 server. See the default value for an example.
73 Default: \"SELECT domain FROM domain WHERE domain <> 'ALL' ORDER BY domain;\"
79 The name of a mail exchanger, the forwards of whose domains we should
80 ignore. For example, if one mail exchanger, mx1.example.com, has
81 strict spam filtering, it may be acceptable to have remote forwarding
82 for domains that have mx1.example.com as their sole mail exchanger (MX
83 record). In that case, you might want to exclude those domains from
84 the report by naming mx1.example.com here.
86 A forward will be excluded from the report only if /all/ of its MX
87 records are contained in the given exclude list.
89 This option can be repeated to add mail exchangers to the exclude list.
97 SQL query used to produce a list of all forwards on the mail
98 system. This query should return the set of all (address, goto)
99 triples, where \"goto\" is the destination address; i.e. to where
100 the \"address\" forwards. The \"goto\" field may contain more
101 than one email address, separated by commas.
103 Default: \"SELECT address,goto FROM alias ORDER BY address;\"
109 Hostname where the database is located (Postgres-only).
111 Default: None, a UNIX domain socket connection is attempted (Postgres only)
117 Password used to connect to the database (Postgres-only).
119 Default: None (assumes passwordless authentication)
124 Port number used to connect to the database (Postgres-only).
126 Default: None, a UNIX domain socket connection is attempted (Postgres only)
132 Username used to connect to the database (Postgres-only).
134 Default: The current user
139 $ list-remote-forwards --database=test\/fixtures\/postfixadmin.sqlite3
140 user1@example.com -> user1@example.net
141 user2@example.com -> user1@example.org
142 user2@example.com -> user2@example.org
143 user2@example.com -> user3@example.org
144 user7@example.com -> user8@example.net
147 executable list-remote-forwards
158 HDBC-postgresql >= 2.3,
179 OptionalConfiguration
180 Paths_list_remote_forwards
185 Paths_list_remote_forwards
188 type: exitcode-stdio-1.0
189 hs-source-dirs: src test
190 default-language: Haskell2010
191 main-is: TestSuite.hs
198 OptionalConfiguration
199 Paths_list_remote_forwards
203 Paths_list_remote_forwards
221 type: exitcode-stdio-1.0
223 default-language: Haskell2010
227 -- Additional test dependencies.
231 source-repository head
233 location: http://gitweb.michael.orlitzky.com/list-remote-forwards.git