]> gitweb.michael.orlitzky.com - list-remote-forwards.git/blobdiff - list-remote-forwards.cabal
Introduce a NormalDomain newtype to ensure comparisons are made safely.
[list-remote-forwards.git] / list-remote-forwards.cabal
index cff0d70ebc62b7137242724e495fb10854201fd8..ba8ffa4ebba7f250517448acf281725e45299eab 100644 (file)
@@ -73,7 +73,25 @@ description:
   Default: \"SELECT domain FROM domain WHERE domain <> 'ALL' ORDER BY domain;\"
   .
   @
-  \--forward-query
+  \--exclude-mx, -e
+  @
+  .
+  The name of a mail exchanger, the forwards of whose domains we should
+  ignore. For example, if one mail exchanger, mx1.example.com, has
+  strict spam filtering, it may be acceptable to have remote forwarding
+  for domains that have mx1.example.com as their sole mail exchanger (MX
+  record). In that case, you might want to exclude those domains from
+  the report by naming mx1.example.com here.
+  .
+  A forward will be excluded from the report only if /all/ of its MX
+  records are contained in the given exclude list.
+  .
+  This option can be repeated to add mail exchangers to the exclude list.
+  .
+  Default: [] (empty)
+  .
+  @
+  \--forward-query, -f
   @
   .
   SQL query used to produce a list of all forwards on the mail
@@ -85,7 +103,7 @@ description:
   Default: \"SELECT address,goto FROM alias ORDER BY address;\"
   .
   @
-  \--host
+  \--host, -h
   @
   .
   Hostname where the database is located (Postgres-only).
@@ -108,7 +126,7 @@ description:
   Default: None, a UNIX domain socket connection is attempted (Postgres only)
   .
   @
-  \--username
+  \--username, -u
   @
   .
   Username used to connect to the database (Postgres-only).
@@ -118,11 +136,12 @@ description:
   /Examples/:
   .
   @
-  $ list-remote-forwards --database=postfixadmin.sqlite3
+  $ list-remote-forwards --database=test/fixtures/postfixadmin.sqlite3
   user1@example.com -> user1@example.net
   user2@example.com -> user1@example.org
   user2@example.com -> user2@example.org
   user2@example.com -> user3@example.org
+  user7@example.com -> user8@example.net
   @
 
 executable list-remote-forwards
@@ -132,7 +151,7 @@ executable list-remote-forwards
     cmdargs                     >= 0.10,
     configurator                >= 0.2,
     containers                  >= 0.5,
-    dns                         >= 1.2,
+    dns                         >= 1.4,
     directory                   >= 1.2,
     filepath                    >= 1.3,
     HDBC                        >= 2.4,
@@ -152,9 +171,11 @@ executable list-remote-forwards
     Configuration
     CommandLine
     DNS
+    Forward
     OptionalConfiguration
     MxList
     Report
+    String
 
   ghc-options:
     -Wall
@@ -183,7 +204,7 @@ test-suite testsuite
     cmdargs                     >= 0.10,
     configurator                >= 0.2,
     containers                  >= 0.5,
-    dns                         >= 1.2,
+    dns                         >= 1.4,
     directory                   >= 1.2,
     filepath                    >= 1.3,
     HDBC                        >= 2.4,
@@ -209,6 +230,33 @@ test-suite testsuite
     -O2
 
 
+test-suite doctests
+  type: exitcode-stdio-1.0
+  hs-source-dirs: test
+  main-is: Doctests.hs
+  build-depends:
+    base      == 4.*,
+    -- Additional test dependencies.
+    doctest   >= 0.9,
+    filemanip >= 0.3.6
+
+  -- It's not entirely clear to me why I have to reproduce all of this.
+  ghc-options:
+    -Wall
+    -fwarn-hi-shadowing
+    -fwarn-missing-signatures
+    -fwarn-name-shadowing
+    -fwarn-orphans
+    -fwarn-type-defaults
+    -fwarn-tabs
+    -fwarn-incomplete-record-updates
+    -fwarn-monomorphism-restriction
+    -fwarn-unused-do-bind
+    -rtsopts
+    -threaded
+    -optc-O3
+    -optc-march=native
+
 
 source-repository head
   type: git