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.
59 The name of the database (or file, if SQLite) to which we should
62 Default: The name of the current user (Postgres only).
66 SQL query used to produce a list of local domains. This should
67 return the set of all domains (i.e one column) that are local to the
68 server. See the default value for an example.
70 Default: \"SELECT domain FROM domain WHERE domain <> 'ALL' ORDER BY
75 The name of a mail exchanger, the forwards of whose domains we
76 should ignore. For example, if one mail exchanger,
77 mx1.example.com, has strict spam filtering, it may be acceptable
78 to have remote forwarding for domains that have mx1.example.com
79 as their sole mail exchanger (MX record). In that case, you
80 might want to exclude those domains from the report by naming
83 A forward will be excluded from the report only if /all/ of its MX
84 records are contained in the given exclude list.
86 This option can be repeated to add mail exchangers to the exclude list.
90 * \--forward-query, -f
92 SQL query used to produce a list of all forwards on the mail
93 system. This query should return the set of all (address, goto)
94 triples, where \"goto\" is the destination address; i.e. to
95 where the \"address\" forwards. The \"goto\" field may contain
96 more than one email address, separated by commas.
98 Default: \"SELECT address,goto FROM alias ORDER BY address;\"
102 Hostname where the database is located (Postgres-only).
104 Default: None, a UNIX domain socket connection is attempted
109 Password used to connect to the database (Postgres-only).
111 Default: None (assumes passwordless authentication)
115 Port number used to connect to the database (Postgres-only).
117 Default: None, a UNIX domain socket connection is attempted
122 Username used to connect to the database (Postgres-only).
124 Default: The current user
129 $ list-remote-forwards --database=test\/fixtures\/postfixadmin.sqlite3
130 user1@example.com -> user1@example.net
131 user2@example.com -> user1@example.org
132 user2@example.com -> user2@example.org
133 user2@example.com -> user3@example.org
134 user7@example.com -> user8@example.net
137 executable list-remote-forwards
148 HDBC-postgresql >= 2.3,
169 OptionalConfiguration
170 Paths_list_remote_forwards
175 Paths_list_remote_forwards
178 type: exitcode-stdio-1.0
179 hs-source-dirs: src test
180 default-language: Haskell2010
181 main-is: TestSuite.hs
188 OptionalConfiguration
189 Paths_list_remote_forwards
193 Paths_list_remote_forwards
211 type: exitcode-stdio-1.0
213 default-language: Haskell2010
217 -- Additional test dependencies.
221 source-repository head
223 location: https://gitweb.michael.orlitzky.com/list-remote-forwards.git