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