<commit_before>homepage: ''
changelog-type: ''
hash: 758a52e592d39ace3556ed50cbc7646b94fa539e1b2317bcab85b6f3c5f59bc1
test-bench-deps:
  MissingH: '>=1.2'
  bytestring: '>=0.10'
  filemanip: '>=0.3.6'
  base: '>=4.15 && <5'
  HDBC: '>=2.4'
  configurator: '>=0.2'
  filepath: '>=1.3'
  doctest: '>=0.9'
  containers: '>=0.5'
  cmdargs: '>=0.10'
  HDBC-sqlite3: '>=2.3'
  tasty-hunit: '>=0.8'
  tasty: '>=0.8'
  dns: '>=1.4'
  directory: '>=1.2'
maintainer: <NAME> <<EMAIL>>
synopsis: List all remote forwards for mail accounts stored in a SQL database.
changelog: ''
basic-deps:
  MissingH: '>=1.2'
  bytestring: '>=0.10'
  base: '>=4.15 && <5'
  HDBC: '>=2.4'
  configurator: '>=0.2'
  filepath: '>=1.3'
  HDBC-postgresql: '>=2.3'
  containers: '>=0.5'
  cmdargs: '>=0.10'
  HDBC-sqlite3: '>=2.3'
  tasty-hunit: '>=0.8'
  tasty: '>=0.8'
  dns: '>=1.4'
  directory: '>=1.2'
all-versions:
- 0.0.1
- 0.0.2
author: <NAME>
latest: 0.0.2
description-type: haddock
description: |-
  /Usage/:

  @
  list-remote-forwards [OPTIONS]
  @

  List all remote forwards for mail accounts stored in a SQL database.

  A list of local domains is supplied to the program (more or less)
  through the @--domain-query@ option. Any addresses which
  forward to another address not contained in this list of local domains
  is considered a remote forward. Remote forwards can cause problems for
  a number of reasons, the most common of which are,

    * If the sender has an SPF record authorizing his mail server to send
      mail on his behalf, then when his message is forwarded by the
      recipient's mail server, it will fail any subsequent SPF checks. This
      will likely cause the message to be rejected, and the original
      recipient's server will generate backscatter.

    * If any spam makes it through the filter on the recipient's mail
      server, that spam will then be forwarded to a remote destination. The
      remote destination will blame the forwarding server for the spam, and
      that can impact its reputation and potentially lead to a blacklisting
      even though the spam did not originate on the recipient's server.

  Whether or not these are an issue depends on the circumstances, but in
  any case it is useful to know who is forwarding mail off-site.

  /Input:/

  None.

  /Output:/

  A list of addresses that are forwarded to remote domains.

  /Options/:

  @
  \--database
  @

  The name of the database (or file, if SQLite) to which we should
  connect.

  Default: The name of the current user (Postgres only).

  @
  \--domain-query
  @
  SQL query used to produce a list of local domains. This should return
  the set of all domains (i.e one column) that are local to the
  server. See the default value for an example.

  Default: \"SELECT domain FROM domain WHERE domain <> 'ALL' ORDER BY domain;\"

  @
  \--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
  system. This query should return the set of all (address, goto)
  triples, where \"goto\" is the destination address; i.e. to where
  the \"address\" forwards. The \"goto\" field may contain more
  than one email address, separated by commas.

  Default: \"SELECT address,goto FROM alias ORDER BY address;\"

  @
  \--host, -h
  @

  Hostname where the database is located (Postgres-only).

  Default: None, a UNIX domain socket connection is attempted (Postgres only)

  @
  \--password
  @

  Password used to connect to the database (Postgres-only).

  Default: None (assumes passwordless authentication)

  @
  \--port
  @
  Port number used to connect to the database (Postgres-only).

  Default: None, a UNIX domain socket connection is attempted (Postgres only)

  @
  \--username, -u
  @

  Username used to connect to the database (Postgres-only).

  Default: The current user

  /Examples/:

  @
  $ list-remote-forwards --database=test\/fixtures\/postfixadmin.sqlite3
  <EMAIL> -> <EMAIL>
  <EMAIL> -> <EMAIL>
  <EMAIL> -> <EMAIL>
  <EMAIL> -> <EMAIL>
  <EMAIL> -> <EMAIL>
  @
license-name: AGPL-3.0-only<commit_msg>Update from Hackage at 2022-08-28T17:07:48Z<commit_after>homepage: ''
changelog-type: ''
hash: 0744e4d72c1691f2918c6c96abfa4b89d32dbd95fe67b247b9c5a9db78b90ec5
test-bench-deps:
  MissingH: '>=1.2'
  bytestring: '>=0.10'
  filemanip: '>=0.3.6'
  base: '>=4.15 && <5'
  HDBC: '>=2.4'
  configurator: '>=0.2'
  filepath: '>=1.3'
  doctest: '>=0.9'
  containers: '>=0.5'
  cmdargs: '>=0.10'
  HDBC-sqlite3: '>=2.3'
  tasty-hunit: '>=0.8'
  tasty: '>=0.8'
  dns: '>=1.4'
  directory: '>=1.2'
maintainer: <NAME> <<EMAIL>>
synopsis: List all remote forwards for mail accounts stored in a SQL database.
changelog: ''
basic-deps:
  MissingH: '>=1.2'
  bytestring: '>=0.10'
  base: '>=4.15 && <5'
  HDBC: '>=2.4'
  configurator: '>=0.2'
  filepath: '>=1.3'
  HDBC-postgresql: '>=2.3'
  containers: '>=0.5'
  cmdargs: '>=0.10'
  HDBC-sqlite3: '>=2.3'
  tasty-hunit: '>=0.8'
  tasty: '>=0.8'
  dns: '>=1.4'
  directory: '>=1.2'
all-versions:
- 0.0.1
- 0.0.2
- 0.0.3
author: <NAME>
latest: 0.0.3
description-type: haddock
description: |-
  /Usage/:

  @
  list-remote-forwards [OPTIONS]
  @

  List all remote forwards for mail accounts stored in a SQL database.

  A list of local domains is supplied to the program (more or less)
  through the @--domain-query@ option. Any addresses which
  forward to another address not contained in this list of local domains
  is considered a remote forward. Remote forwards can cause problems for
  a number of reasons, the most common of which are,

    * If the sender has an SPF record authorizing his mail server to send
      mail on his behalf, then when his message is forwarded by the
      recipient's mail server, it will fail any subsequent SPF checks. This
      will likely cause the message to be rejected, and the original
      recipient's server will generate backscatter.

    * If any spam makes it through the filter on the recipient's mail
      server, that spam will then be forwarded to a remote destination. The
      remote destination will blame the forwarding server for the spam, and
      that can impact its reputation and potentially lead to a blacklisting
      even though the spam did not originate on the recipient's server.

  Whether or not these are an issue depends on the circumstances, but in
  any case it is useful to know who is forwarding mail off-site.

  /Input:/

  None.

  /Output:/

  A list of addresses that are forwarded to remote domains.

  /Options/:

  * \--database

      The name of the database (or file, if SQLite) to which we should
      connect.

      Default: The name of the current user (Postgres only).

  * \--domain-query

      SQL query used to produce a list of local domains. This should
      return the set of all domains (i.e one column) that are local to the
      server. See the default value for an example.

      Default: \"SELECT domain FROM domain WHERE domain <> 'ALL' ORDER BY
      domain;\"

  * \--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
      system. This query should return the set of all (address, goto)
      triples, where \"goto\" is the destination address; i.e. to
      where the \"address\" forwards. The \"goto\" field may contain
      more than one email address, separated by commas.

      Default: \"SELECT address,goto FROM alias ORDER BY address;\"

  * \--host, -h

      Hostname where the database is located (Postgres-only).

      Default: None, a UNIX domain socket connection is attempted
      (Postgres only)

  * \--password

      Password used to connect to the database (Postgres-only).

      Default: None (assumes passwordless authentication)

  * \--port

      Port number used to connect to the database (Postgres-only).

      Default: None, a UNIX domain socket connection is attempted
      (Postgres only)

  * \--username, -u

      Username used to connect to the database (Postgres-only).

      Default: The current user

  /Examples/:

  @
  $ list-remote-forwards --database=test\/fixtures\/postfixadmin.sqlite3
  <EMAIL> -> <EMAIL>
  <EMAIL> -> <EMAIL>
  <EMAIL> -> <EMAIL>
  <EMAIL> -> <EMAIL>
  <EMAIL> -> <EMAIL>
  @
license-name: AGPL-3.0-only
{'fraction_non_alphanumeric': 0.10301192219201004, 'fraction_numerical': 0.027295544865090986, 'mean_word_length': 2.9746467165419785, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 101, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4653428', 'n_tokens_mistral': 3253, 'n_tokens_neox': 3027, 'n_words': 1252}