1. 18 Jan, 2019 2 commits
    • Alberto Bertogli's avatar
      queue: Internationalized Delivery Status Notifications (DSN) · 1ecc957a
      Alberto Bertogli authored
      Our non-delivery status notifications are quite simple today, but that
      makes it much more difficult to support internationalization and
      cross-language reporting.
      There is a standard for internationalized DSNs, RFC 6533 (which builds
      on top of the structured DSNs from RFC 3464).
      This patch changes our DSN messages to be based on those standards, so
      it is easier for MUAs to display reports according to the users'
      languages preferences.
      Note we still use message/rfc822 + 8bit to transmit the message, instead
      of message/global, for compatibility reasons. This seems to be more
      universally compatible, but the decision might be revisited in the
      future. See RFC 5335 (section 4.6 in particular).
    • Alberto Bertogli's avatar
      test: Make mail_diff support comparing multipart messages · abf91eac
      Alberto Bertogli authored
      In upcoming patches we will want to compare mime-multipart messages, so
      this patch extends the mail_diff test helper to support it.
  2. 10 Jan, 2019 1 commit
  3. 02 Dec, 2018 1 commit
  4. 01 Dec, 2018 1 commit
    • Alberto Bertogli's avatar
      Code style improvements · 4db9ffec
      Alberto Bertogli authored
      This patch contains some minor code style improvements, to leave the
      linter happier and generally follow best practices in some areas where
      things snuck through.
  5. 30 Nov, 2018 10 commits
    • Alberto Bertogli's avatar
      test: Fix flaky courier test · 4296e280
      Alberto Bertogli authored
      In the upcoming Go release, logging from a finished testing.T triggers a
      panic.  In the courier tests, this is possible because we don't wait for
      completion of fakeServer before ending the test.
      This patch makes the tests wait for fakeServer to finish before exiting,
      removing the race.
    • Alberto Bertogli's avatar
      gitlab-ci.yml: Add a configuration file for GitLab CI · f4b41b67
      Alberto Bertogli authored
      This patch adds a configuration file for the GitLab CI environment, to
      run the integration tests with docker.
    • Alberto Bertogli's avatar
      test: Use minidns in the Docker tests · dd7cfaeb
      Alberto Bertogli authored
      The integration tests depend on having a DNS server that resolves
      "localhost", which is unfortunate but currently unavoidable given
      glibc's limitations ($HOSTALIASES only works on DNS-level aliases, and
      does not do lookups in /etc/hosts).
      Even under docker, this makes the tests depend on the DNS server, and
      whether it resolves localhost or not.
      In order to make the docker tests more hermetic and isolated from the
      environment, this patch introduces a docker entrypoint that, within the
      container, will launch minidns and override /etc/resolv.conf to use it.
      This guarantees that the tests will be able to resolve localhost, and
      also avoid accidental reliance on external DNS zones.
    • Alberto Bertogli's avatar
      test: Replace dnsmasq with minidns · 57f5a099
      Alberto Bertogli authored
      This commit replaces test/t-14-tls_tracking usage of dnsmasq (an
      external test dependency) with our new minidns.
    • Alberto Bertogli's avatar
      test/util: Add mini DNS server for testing purposes · a0ae5fb4
      Alberto Bertogli authored
      This is a mini-DNS server for testing purposes.
      This can be used to set up hermetic tests in containers, and work around
      glibc's limitation of being unable to create per-process host aliases.
    • Alberto Bertogli's avatar
      test: Allow up to 2 loops in the loop integration test · 661f759c
      Alberto Bertogli authored
      In the loop integration test, we detect looping via checking the expvars
      of chasquid, and waiting for the loop counter to be 1.
      However, if chasquid is fast enough, it will go up to 2 before the
      detection notices. This is because the DSN that gets generated also
      loops (as expected).
    • Alberto Bertogli's avatar
      smtpsrv: Improve "Received" header standard compliance · 29709a0d
      Alberto Bertogli authored
      Despite its loose appearance, the "Received" header has a reasonably
      standarized format.
      We were not following the standard format as closely as we should; this
      rarely causes problems in this particular case, but there's no need to
      deviate from it.
      This patch changes the Received header generation as follows:
       - The "from" section now uses the remote address as canonical (for
         non-authenticated users) which provides more valuable information
         than the user-supplied EHLO address (which is also included).
       - The remote authenticated user is now hidden, for additional privacy.
       - Use the "with" optional clause.
       - Use the standard way of printing TLS cipher suite.
       - Use the standard way of printing address literals.
    • Alberto Bertogli's avatar
      tlsconst: Update TLS cipher suites, and include TLS 1.3 · 32800806
      Alberto Bertogli authored
      This patch updates the list of known TLS cipher suites, and adds TLS 1.3
      to the list of known versions (it will be included in Go 1.12).
    • Alberto Bertogli's avatar
      tests: Reorder Dockerfile statements to allow caching · d0c7c3d4
      Alberto Bertogli authored
      Docker creates intermediate layers on each command (for most commands),
      but the COPY was invalidating them too early, every time it runs it was
      generating a different layer.
      This patch moves the COPY down to the bottom, and adds a bit more
      organization to the commands below.
    • Alberto Bertogli's avatar
      Add driusan/dkim integration example and tests · 4ecc5461
      Alberto Bertogli authored
      This patch adds DKIM signing using https://github.com/driusan/dkim tools
      to the example hook.
      It also adds an optional integration test to exercise signing and
      verification, and corresponding documentation.
  6. 26 Sep, 2018 2 commits
    • Alberto Bertogli's avatar
      README: Remove codefresh.io integration · ebad590c
      Alberto Bertogli authored
      codefresh.io now requires to be logged in to view the status, and very
      extensive permissions to even log in.
      So I've removed the hook from the repository.
    • Alberto Bertogli's avatar
      MTA-STS is now RFC 8461 · 2dfed059
      Alberto Bertogli authored
      MTA-STS has been published as RFC 8461, with no major changes since the
      last draft we updated (-18).
      This patch updates the documentation accordingly (no code changes).
  7. 22 Jul, 2018 2 commits
    • Alberto Bertogli's avatar
    • Alberto Bertogli's avatar
      docs/man: Make generate script use git timestamps · a2fa1d07
      Alberto Bertogli authored
      When regenerating the manpages, the mtime of the pod files is used.
      That mtime can change based on file and repository manipulations,
      because git does not preserve mtimes.
      This causes unnecessary regenerations which require manual cleanups in
      order to avoid cluttering the history unnecessarily.
      This patch makes the generate script set the mtime of the pod files to
      the time of the last git commit that affected them, if they have not
      changed since. This avoids unnecessary changes and makes the script
      easier to use.
      There's one file that needed adjustment to match its last commit time,
      that is also included here.
  8. 15 Jul, 2018 1 commit
    • Alberto Bertogli's avatar
      test: Add workarounds for dovecot 2.3 · 910c6e9c
      Alberto Bertogli authored
      The current dovecot config for integration test t-11-dovecot is not
      compatible with dovecot 2.3. There are some new services which want to
      change the group owner for some files to the default, and that does not
      work when run as non-root.
      The errors look like:
        master: Error: service(stats): chown(/tmp/chasquid-dovecot-test/run/stats-writer, 4294967295, 127) failed: Operation not permitted
        master: Error: service(imap-hibernate): chown(/tmp/chasquid-dovecot-test/run/imap-hibernate, 4294967295, 127) failed: Operation not permitted
        master: Error: service(dict): chown(/tmp/chasquid-dovecot-test/run/dict, 4294967295, 127) failed: Operation not permitted
        master: Error: service(dict-async): chown(/tmp/chasquid-dovecot-test/run/dict-async, 4294967295, 127) failed: Operation not permitted
        master: Fatal: Failed to start listeners
      (127 is the "dovecot" user)
      So this patch adds some config settings to set the group manually for
      these services, which is backwards compatible with 2.2.
      Eventually we will stop supporting 2.2 for tests, at which point we can
      change to just setting default_internal_group.
  9. 14 Jul, 2018 8 commits
  10. 01 Jul, 2018 4 commits
    • Alberto Bertogli's avatar
      sts: DNS TXT record support · 79a8cfc2
      Alberto Bertogli authored
      This patch adds support for checking the MTA-STS TXT record before
      fetching the policy via https.
      The content of the record is unused.
    • Alberto Bertogli's avatar
      sts: Don't pre-filter MX list, but skip them if needed · 8bf584bd
      Alberto Bertogli authored
      Instead of pre-filtering the MX list based on STS policy, just check
      if it's allowed before each attempt, and skip it if not.
      This simplifies the code.
    • Alberto Bertogli's avatar
      sts: Update to draft-ietf-uta-mta-sts-18 · 252ab5d3
      Alberto Bertogli authored
      This patch updates the STS implementation from draft version 02 to 18.
      The main changes are:
       - Policy is now in an ad-hoc format instead of JSON (😒).
       - Minor policy well-known URL change (now ends in ".txt").
       - Enforce HTTP media type == text/plain, as with the ad-hoc format this
         becomes much more important.
       - Simplify wildcard mx matching (same algorithm), extend test cases.
       - Valid modes are "enforce" (as before), "testing" (replaces "report"),
         and "none" (new).
    • Alberto Bertogli's avatar
      Reinstate the MTA-STS (Strict Transport Security) implementation · 23deaf1f
      Alberto Bertogli authored
      This commit brings back the experimental MTA-STS (Strict Transport
      Security) implementation, removed in commit
      We will continue development in the "sts" branch, subject to rebase,
      until it is ready to be integrated into "next" again.
  11. 06 Jun, 2018 1 commit
  12. 04 Jun, 2018 3 commits
  13. 03 Jun, 2018 4 commits