]> gitweb.michael.orlitzky.com - list-remote-forwards.git/blob - list-remote-forwards.cabal
list-remote-forwards.cabal: add a homepage
[list-remote-forwards.git] / list-remote-forwards.cabal
1 cabal-version: 3.0
2 name: list-remote-forwards
3 version: 0.0.3
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-only
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/list-remote-forwardsrc.example
14 doc/man1/list-remote-forwards.1
15 test/fixtures/postfixadmin.sqlite3
16 synopsis:
17 List all remote forwards for mail accounts stored in a SQL database.
18 description:
19 /Usage/:
20
21 @
22 list-remote-forwards [OPTIONS]
23 @
24
25 List all remote forwards for mail accounts stored in a SQL database.
26
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,
32
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.
38
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.
44
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.
47
48 /Input:/
49
50 None.
51
52 /Output:/
53
54 A list of addresses that are forwarded to remote domains.
55
56 /Options/:
57
58 * \--database
59
60 The name of the database (or file, if SQLite) to which we should
61 connect.
62
63 Default: The name of the current user (Postgres only).
64
65 * \--domain-query
66
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.
70
71 Default: \"SELECT domain FROM domain WHERE domain <> 'ALL' ORDER BY
72 domain;\"
73
74 * \--exclude-mx, -e
75
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
82 mx1.example.com here.
83
84 A forward will be excluded from the report only if /all/ of its MX
85 records are contained in the given exclude list.
86
87 This option can be repeated to add mail exchangers to the exclude list.
88
89 Default: [] (empty)
90
91 * \--forward-query, -f
92
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.
98
99 Default: \"SELECT address,goto FROM alias ORDER BY address;\"
100
101 * \--host, -h
102
103 Hostname where the database is located (Postgres-only).
104
105 Default: None, a UNIX domain socket connection is attempted
106 (Postgres only)
107
108 * \--password
109
110 Password used to connect to the database (Postgres-only).
111
112 Default: None (assumes passwordless authentication)
113
114 * \--port
115
116 Port number used to connect to the database (Postgres-only).
117
118 Default: None, a UNIX domain socket connection is attempted
119 (Postgres only)
120
121 * \--username, -u
122
123 Username used to connect to the database (Postgres-only).
124
125 Default: The current user
126
127 /Examples/:
128
129 @
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
136 @
137
138 executable list-remote-forwards
139 build-depends:
140 base >= 4.15 && < 5,
141 bytestring >= 0.10,
142 cmdargs >= 0.10,
143 configurator >= 0.2,
144 containers >= 0.5,
145 dns >= 1.4,
146 directory >= 1.2,
147 filepath >= 1.3,
148 HDBC >= 2.4,
149 HDBC-postgresql >= 2.3,
150 HDBC-sqlite3 >= 2.3,
151 MissingH >= 1.2,
152 tasty >= 0.8,
153 tasty-hunit >= 0.8
154
155 default-language:
156 Haskell2010
157
158 main-is:
159 Main.hs
160
161 hs-source-dirs:
162 src/
163
164 other-modules:
165 Configuration
166 CommandLine
167 DNS
168 Forward
169 MxList
170 OptionalConfiguration
171 Paths_list_remote_forwards
172 Report
173 String
174
175 autogen-modules:
176 Paths_list_remote_forwards
177
178 test-suite testsuite
179 type: exitcode-stdio-1.0
180 hs-source-dirs: src test
181 default-language: Haskell2010
182 main-is: TestSuite.hs
183
184 other-modules:
185 Configuration
186 DNS
187 Forward
188 MxList
189 OptionalConfiguration
190 Paths_list_remote_forwards
191 Report
192
193 autogen-modules:
194 Paths_list_remote_forwards
195
196 build-depends:
197 base >= 4.15 && < 5,
198 bytestring >= 0.10,
199 cmdargs >= 0.10,
200 configurator >= 0.2,
201 containers >= 0.5,
202 dns >= 1.4,
203 directory >= 1.2,
204 filepath >= 1.3,
205 HDBC >= 2.4,
206 HDBC-sqlite3 >= 2.3,
207 MissingH >= 1.2,
208 tasty >= 0.8,
209 tasty-hunit >= 0.8
210
211 test-suite doctests
212 type: exitcode-stdio-1.0
213 hs-source-dirs: test
214 default-language: Haskell2010
215 main-is: Doctests.hs
216 build-depends:
217 base >= 4.15 && < 5,
218 -- Additional test dependencies.
219 doctest >= 0.9,
220 filemanip >= 0.3.6
221
222 source-repository head
223 type: git
224 location: https://gitweb.michael.orlitzky.com/list-remote-forwards.git
225 branch: master