1 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-forwards.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 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 Can be repeated to exclude more than one mail exchanger.
94 SQL query used to produce a list of all forwards on the mail
95 system. This query should return the set of all (address, goto)
96 triples, where \"goto\" is the destination address; i.e. to where
97 the \"address\" forwards. The \"goto\" field may contain more
98 than one email address, separated by commas.
100 Default: \"SELECT address,goto FROM alias ORDER BY address;\"
106 Hostname where the database is located (Postgres-only).
108 Default: None, a UNIX domain socket connection is attempted (Postgres only)
114 Password used to connect to the database (Postgres-only).
116 Default: None (assumes passwordless authentication)
121 Port number used to connect to the database (Postgres-only).
123 Default: None, a UNIX domain socket connection is attempted (Postgres only)
129 Username used to connect to the database (Postgres-only).
131 Default: The current user
136 $ list-remote-forwards --database=postfixadmin.sqlite3
137 user1@example.com -> user1@example.net
138 user2@example.com -> user1@example.org
139 user2@example.com -> user2@example.org
140 user2@example.com -> user3@example.org
141 user7@example.com -> user8@example.net
144 executable list-remote-forwards
155 HDBC-postgresql >= 2.3,
160 tasty-quickcheck >= 0.8
171 OptionalConfiguration
178 -fwarn-missing-signatures
179 -fwarn-name-shadowing
183 -fwarn-incomplete-record-updates
184 -fwarn-monomorphism-restriction
185 -fwarn-unused-do-bind
193 type: exitcode-stdio-1.0
194 hs-source-dirs: src test
195 main-is: TestSuite.hs
206 HDBC-postgresql >= 2.3,
211 tasty-quickcheck >= 0.8
213 -- It's not entirely clear to me why I have to reproduce all of this.
217 -fwarn-missing-signatures
218 -fwarn-name-shadowing
222 -fwarn-incomplete-record-updates
223 -fwarn-monomorphism-restriction
224 -fwarn-unused-do-bind
229 type: exitcode-stdio-1.0
234 -- Additional test dependencies.
238 -- It's not entirely clear to me why I have to reproduce all of this.
242 -fwarn-missing-signatures
243 -fwarn-name-shadowing
247 -fwarn-incomplete-record-updates
248 -fwarn-monomorphism-restriction
249 -fwarn-unused-do-bind
256 source-repository head
258 location: http://michael.orlitzky.com/git/list-remote-forwards.git