]> gitweb.michael.orlitzky.com - list-remote-forwards.git/blob - list-remote-forwards.cabal
53dfcd9ef348c5837f73f56fe2c35cbcc1ace98a
[list-remote-forwards.git] / list-remote-forwards.cabal
1 cabal-version: 3.0
2 name: list-remote-forwards
3 version: 0.0.4
4 author: Michael Orlitzky
5 maintainer: Michael Orlitzky <michael@orlitzky.com>
6 homepage: https://michael.orlitzky.com/code/list-remote-forwards.xhtml
7 license: AGPL-3.0-or-later
8 license-file: doc/LICENSE
9 bug-reports: mailto:michael@orlitzky.com
10 category: Mail, Utils
11 build-type: Simple
12 extra-source-files:
13 doc/COPYING
14 doc/list-remote-forwardsrc.example
15 doc/man1/list-remote-forwards.1
16 test/fixtures/postfixadmin.sqlite3
17 synopsis:
18 List all remote forwards for mail accounts stored in a SQL database.
19 description:
20 /Usage/:
21
22 @
23 list-remote-forwards [OPTIONS]
24 @
25
26 List all remote forwards for mail accounts stored in a SQL database.
27
28 A list of local domains is supplied to the program (more or less)
29 through the @--domain-query@ option. Any addresses which
30 forward to another address not contained in this list of local domains
31 is considered a remote forward. Remote forwards can cause problems for
32 a number of reasons, the most common of which are,
33
34 * If the sender has an SPF record authorizing his mail server to send
35 mail on his behalf, then when his message is forwarded by the
36 recipient's mail server, it will fail any subsequent SPF checks. This
37 will likely cause the message to be rejected, and the original
38 recipient's server will generate backscatter.
39
40 * If any spam makes it through the filter on the recipient's mail
41 server, that spam will then be forwarded to a remote destination. The
42 remote destination will blame the forwarding server for the spam, and
43 that can impact its reputation and potentially lead to a blacklisting
44 even though the spam did not originate on the recipient's server.
45
46 Whether or not these are an issue depends on the circumstances, but in
47 any case it is useful to know who is forwarding mail off-site.
48
49 /Input:/
50
51 None.
52
53 /Output:/
54
55 A list of addresses that are forwarded to remote domains.
56
57 /Options/:
58
59 * \--database
60
61 The name of the database (or file, if SQLite) to which we should
62 connect.
63
64 Default: The name of the current user (Postgres only).
65
66 * \--domain-query
67
68 SQL query used to produce a list of local domains. This should
69 return the set of all domains (i.e one column) that are local to the
70 server. See the default value for an example.
71
72 Default: \"SELECT domain FROM domain WHERE domain <> 'ALL' ORDER BY
73 domain;\"
74
75 * \--exclude-mx, -e
76
77 The name of a mail exchanger, the forwards of whose domains we
78 should ignore. For example, if one mail exchanger,
79 mx1.example.com, has strict spam filtering, it may be acceptable
80 to have remote forwarding for domains that have mx1.example.com
81 as their sole mail exchanger (MX record). In that case, you
82 might want to exclude those domains from the report by naming
83 mx1.example.com here.
84
85 A forward will be excluded from the report only if /all/ of its MX
86 records are contained in the given exclude list.
87
88 This option can be repeated to add mail exchangers to the exclude list.
89
90 Default: [] (empty)
91
92 * \--forward-query, -f
93
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 pairs, where \"goto\" is the destination address; i.e. to
97 where the \"address\" forwards. The \"goto\" field may contain
98 more than one email address, separated by commas.
99
100 Default: \"SELECT address,goto FROM alias ORDER BY address;\"
101
102 * \--host, -h
103
104 Hostname where the database is located (Postgres-only).
105
106 Default: None, a UNIX domain socket connection is attempted
107 (Postgres only)
108
109 * \--password
110
111 Password used to connect to the database (Postgres-only).
112
113 Default: None (assumes passwordless authentication)
114
115 * \--port
116
117 Port number used to connect to the database (Postgres-only).
118
119 Default: None, a UNIX domain socket connection is attempted
120 (Postgres only)
121
122 * \--username, -u
123
124 Username used to connect to the database (Postgres-only).
125
126 Default: The current user
127
128 /Examples/:
129
130 @
131 $ list-remote-forwards --database=test\/fixtures\/postfixadmin.sqlite3
132 user1@example.com -> user1@example.net
133 user2@example.com -> user1@example.org
134 user2@example.com -> user2@example.org
135 user2@example.com -> user3@example.org
136 user7@example.com -> user8@example.net
137 @
138
139 executable list-remote-forwards
140 build-depends:
141 base >= 4.15 && < 5,
142 bytestring >= 0.10,
143 cmdargs >= 0.10,
144 configurator >= 0.2,
145 containers >= 0.5,
146 dns >= 1.4,
147 directory >= 1.2,
148 filepath >= 1.3,
149 HDBC >= 2.4,
150 HDBC-postgresql >= 2.3,
151 HDBC-sqlite3 >= 2.3,
152 MissingH >= 1.2,
153 tasty >= 0.8,
154 tasty-hunit >= 0.8
155
156 default-language:
157 Haskell2010
158
159 main-is:
160 Main.hs
161
162 hs-source-dirs:
163 src/
164
165 other-modules:
166 Configuration
167 CommandLine
168 DNS
169 Forward
170 MxList
171 OptionalConfiguration
172 Paths_list_remote_forwards
173 Report
174 String
175
176 autogen-modules:
177 Paths_list_remote_forwards
178
179 test-suite testsuite
180 type: exitcode-stdio-1.0
181 hs-source-dirs: src test
182 default-language: Haskell2010
183 main-is: TestSuite.hs
184
185 other-modules:
186 Configuration
187 DNS
188 Forward
189 MxList
190 OptionalConfiguration
191 Paths_list_remote_forwards
192 Report
193
194 autogen-modules:
195 Paths_list_remote_forwards
196
197 build-depends:
198 base >= 4.15 && < 5,
199 bytestring >= 0.10,
200 cmdargs >= 0.10,
201 configurator >= 0.2,
202 containers >= 0.5,
203 dns >= 1.4,
204 directory >= 1.2,
205 filepath >= 1.3,
206 HDBC >= 2.4,
207 HDBC-sqlite3 >= 2.3,
208 MissingH >= 1.2,
209 tasty >= 0.8,
210 tasty-hunit >= 0.8
211
212 test-suite doctests
213 type: exitcode-stdio-1.0
214 hs-source-dirs: test
215 default-language: Haskell2010
216 main-is: Doctests.hs
217 build-depends:
218 base >= 4.15 && < 5,
219 -- Additional test dependencies.
220 doctest >= 0.9,
221 filemanip >= 0.3.6
222
223 source-repository head
224 type: git
225 location: https://gitweb.michael.orlitzky.com/list-remote-forwards.git
226 branch: master