2 name: list-remote-forwards
4 author: Michael Orlitzky
5 maintainer: Michael Orlitzky <michael@orlitzky.com>
6 homepage: https://michael.orlitzky.com/code/list-remote-forwards.xhtml
8 license-file: doc/LICENSE
9 bug-reports: mailto:michael@orlitzky.com
13 doc/list-remote-forwardsrc.example
14 doc/man1/list-remote-forwards.1
15 test/fixtures/postfixadmin.sqlite3
17 List all remote forwards for mail accounts stored in a SQL database.
22 list-remote-forwards [OPTIONS]
25 List all remote forwards for mail accounts stored in a SQL database.
27 A list of local domains is supplied to the program (more or less)
28 through the @--domain-query@ option. Any addresses which
29 forward to another address not contained in this list of local domains
30 is considered a remote forward. Remote forwards can cause problems for
31 a number of reasons, the most common of which are,
33 * If the sender has an SPF record authorizing his mail server to send
34 mail on his behalf, then when his message is forwarded by the
35 recipient's mail server, it will fail any subsequent SPF checks. This
36 will likely cause the message to be rejected, and the original
37 recipient's server will generate backscatter.
39 * If any spam makes it through the filter on the recipient's mail
40 server, that spam will then be forwarded to a remote destination. The
41 remote destination will blame the forwarding server for the spam, and
42 that can impact its reputation and potentially lead to a blacklisting
43 even though the spam did not originate on the recipient's server.
45 Whether or not these are an issue depends on the circumstances, but in
46 any case it is useful to know who is forwarding mail off-site.
54 A list of addresses that are forwarded to remote domains.
60 The name of the database (or file, if SQLite) to which we should
63 Default: The name of the current user (Postgres only).
67 SQL query used to produce a list of local domains. This should
68 return the set of all domains (i.e one column) that are local to the
69 server. See the default value for an example.
71 Default: \"SELECT domain FROM domain WHERE domain <> 'ALL' ORDER BY
76 The name of a mail exchanger, the forwards of whose domains we
77 should ignore. For example, if one mail exchanger,
78 mx1.example.com, has strict spam filtering, it may be acceptable
79 to have remote forwarding for domains that have mx1.example.com
80 as their sole mail exchanger (MX record). In that case, you
81 might want to exclude those domains from the report by naming
84 A forward will be excluded from the report only if /all/ of its MX
85 records are contained in the given exclude list.
87 This option can be repeated to add mail exchangers to the exclude list.
91 * \--forward-query, -f
93 SQL query used to produce a list of all forwards on the mail
94 system. This query should return the set of all (address, goto)
95 triples, where \"goto\" is the destination address; i.e. to
96 where the \"address\" forwards. The \"goto\" field may contain
97 more than one email address, separated by commas.
99 Default: \"SELECT address,goto FROM alias ORDER BY address;\"
103 Hostname where the database is located (Postgres-only).
105 Default: None, a UNIX domain socket connection is attempted
110 Password used to connect to the database (Postgres-only).
112 Default: None (assumes passwordless authentication)
116 Port number used to connect to the database (Postgres-only).
118 Default: None, a UNIX domain socket connection is attempted
123 Username used to connect to the database (Postgres-only).
125 Default: The current user
130 $ list-remote-forwards --database=test\/fixtures\/postfixadmin.sqlite3
131 user1@example.com -> user1@example.net
132 user2@example.com -> user1@example.org
133 user2@example.com -> user2@example.org
134 user2@example.com -> user3@example.org
135 user7@example.com -> user8@example.net
138 executable list-remote-forwards
149 HDBC-postgresql >= 2.3,
170 OptionalConfiguration
171 Paths_list_remote_forwards
176 Paths_list_remote_forwards
179 type: exitcode-stdio-1.0
180 hs-source-dirs: src test
181 default-language: Haskell2010
182 main-is: TestSuite.hs
189 OptionalConfiguration
190 Paths_list_remote_forwards
194 Paths_list_remote_forwards
212 type: exitcode-stdio-1.0
214 default-language: Haskell2010
218 -- Additional test dependencies.
222 source-repository head
224 location: https://gitweb.michael.orlitzky.com/list-remote-forwards.git