]> gitweb.michael.orlitzky.com - list-remote-forwards.git/blob - list-remote-forwards.cabal
list-remote-forwards.cabal: update to v0.0.3.
[list-remote-forwards.git] / list-remote-forwards.cabal
1 name: list-remote-forwards
2 version: 0.0.1
3 cabal-version: >= 1.8
4 author: Michael Orlitzky
5 maintainer: Michael Orlitzky <michael@orlitzky.com>
6 license: AGPL-3
7 license-file: doc/LICENSE
8 bug-reports: mailto:michael@orlitzky.com
9 category: Mail, Utils
10 build-type: Simple
11 extra-source-files:
12 doc/list-remote-forwardsrc.example
13 doc/man1/list-remote-forwards.1
14 test/fixtures/postfixadmin.sqlite3
15 synopsis:
16 List all remote forwards for mail accounts stored in a SQL database.
17 description:
18 /Usage/:
19 .
20 @
21 list-remote-forwards [OPTIONS]
22 @
23 .
24 List all remote forwards for mail accounts stored in a SQL database.
25 .
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,
31 .
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.
37 .
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.
43 .
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.
46 .
47 /Input:/
48 .
49 None.
50 .
51 /Output:/
52 .
53 A list of addresses that are forwarded to remote domains.
54 .
55 /Options/:
56 .
57 @
58 \--database
59 @
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 @
67 \--domain-query
68 @
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.
72 .
73 Default: \"SELECT domain FROM domain WHERE domain <> 'ALL' ORDER BY domain;\"
74 .
75 @
76 \--exclude-mx, -e
77 @
78 .
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.
85 .
86 A forward will be excluded from the report only if /all/ of its MX
87 records are contained in the given exclude list.
88 .
89 This option can be repeated to add mail exchangers to the exclude list.
90 .
91 Default: [] (empty)
92 .
93 @
94 \--forward-query, -f
95 @
96 .
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.
102 .
103 Default: \"SELECT address,goto FROM alias ORDER BY address;\"
104 .
105 @
106 \--host, -h
107 @
108 .
109 Hostname where the database is located (Postgres-only).
110 .
111 Default: None, a UNIX domain socket connection is attempted (Postgres only)
112 .
113 @
114 \--password
115 @
116 .
117 Password used to connect to the database (Postgres-only).
118 .
119 Default: None (assumes passwordless authentication)
120 .
121 @
122 \--port
123 @
124 Port number used to connect to the database (Postgres-only).
125 .
126 Default: None, a UNIX domain socket connection is attempted (Postgres only)
127 .
128 @
129 \--username, -u
130 @
131 .
132 Username used to connect to the database (Postgres-only).
133 .
134 Default: The current user
135 .
136 /Examples/:
137 .
138 @
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
145 @
146
147 executable list-remote-forwards
148 build-depends:
149 base >= 4.6 && < 5,
150 bytestring >= 0.10,
151 cmdargs >= 0.10,
152 configurator >= 0.2,
153 containers >= 0.5,
154 dns >= 1.4,
155 directory >= 1.2,
156 filepath >= 1.3,
157 HDBC >= 2.4,
158 HDBC-postgresql >= 2.3,
159 HDBC-sqlite3 >= 2.3,
160 MissingH >= 1.2,
161 tasty >= 0.8,
162 tasty-hunit >= 0.8,
163 tasty-quickcheck >= 0.8
164 main-is:
165 Main.hs
166
167 hs-source-dirs:
168 src/
169
170 other-modules:
171 Configuration
172 CommandLine
173 DNS
174 Forward
175 OptionalConfiguration
176 MxList
177 Report
178 String
179
180 ghc-options:
181 -Wall
182 -fwarn-hi-shadowing
183 -fwarn-missing-signatures
184 -fwarn-name-shadowing
185 -fwarn-orphans
186 -fwarn-type-defaults
187 -fwarn-tabs
188 -fwarn-incomplete-record-updates
189 -fwarn-monomorphism-restriction
190 -fwarn-unused-do-bind
191 -rtsopts
192 -threaded
193 -optc-O3
194 -optc-march=native
195
196
197 test-suite testsuite
198 type: exitcode-stdio-1.0
199 hs-source-dirs: src test
200 main-is: TestSuite.hs
201 build-depends:
202 base >= 4.6 && < 5,
203 bytestring >= 0.10,
204 cmdargs >= 0.10,
205 configurator >= 0.2,
206 containers >= 0.5,
207 dns >= 1.4,
208 directory >= 1.2,
209 filepath >= 1.3,
210 HDBC >= 2.4,
211 HDBC-postgresql >= 2.3,
212 HDBC-sqlite3 >= 2.3,
213 MissingH >= 1.2,
214 tasty >= 0.8,
215 tasty-hunit >= 0.8,
216 tasty-quickcheck >= 0.8
217
218 -- It's not entirely clear to me why I have to reproduce all of this.
219 ghc-options:
220 -Wall
221 -fwarn-hi-shadowing
222 -fwarn-missing-signatures
223 -fwarn-name-shadowing
224 -fwarn-orphans
225 -fwarn-type-defaults
226 -fwarn-tabs
227 -fwarn-incomplete-record-updates
228 -fwarn-monomorphism-restriction
229 -fwarn-unused-do-bind
230 -O2
231
232
233 test-suite doctests
234 type: exitcode-stdio-1.0
235 hs-source-dirs: test
236 main-is: Doctests.hs
237 build-depends:
238 base == 4.*,
239 -- Additional test dependencies.
240 doctest >= 0.9,
241 filemanip >= 0.3.6
242
243 -- It's not entirely clear to me why I have to reproduce all of this.
244 ghc-options:
245 -Wall
246 -fwarn-hi-shadowing
247 -fwarn-missing-signatures
248 -fwarn-name-shadowing
249 -fwarn-orphans
250 -fwarn-type-defaults
251 -fwarn-tabs
252 -fwarn-incomplete-record-updates
253 -fwarn-monomorphism-restriction
254 -fwarn-unused-do-bind
255 -rtsopts
256 -threaded
257 -optc-O3
258 -optc-march=native
259
260
261 source-repository head
262 type: git
263 location: http://gitweb.michael.orlitzky.com/list-remote-forwards.git
264 branch: master