contrib / hooks / multimail / doc / troubleshooting.rston commit Merge branch 'nd/ita-cleanup' into maint (c12c71f)
   1Troubleshooting issues with git-multimail: a FAQ
   2================================================
   3
   4Git is not using the right address in the From/To/Reply-To field
   5----------------------------------------------------------------
   6
   7First, make sure that git-multimail actually uses what you think it is
   8using. A lot happens to your email (especially when posting to a
   9mailing-list) between the time `git_multimail.py` sends it and the
  10time it reaches your inbox.
  11
  12A simple test (to do on a test repository, do not use in production as
  13it would disable email sending): change your post-receive hook to call
  14`git_multimail.py` with the `--stdout` option, and try to push to the
  15repository. You should see something like::
  16
  17  Counting objects: 3, done.
  18  Writing objects: 100% (3/3), 263 bytes | 0 bytes/s, done.
  19  Total 3 (delta 0), reused 0 (delta 0)
  20  remote: Sending notification emails to: foo.bar@example.com
  21  remote: ===========================================================================
  22  remote: Date: Mon, 25 Apr 2016 18:39:59 +0200
  23  remote: To: foo.bar@example.com
  24  remote: Subject: [git] branch master updated: foo
  25  remote: MIME-Version: 1.0
  26  remote: Content-Type: text/plain; charset=utf-8
  27  remote: Content-Transfer-Encoding: 8bit
  28  remote: Message-ID: <20160425163959.2311.20498@anie>
  29  remote: From: Auth Or <Foo.Bar@example.com>
  30  remote: Reply-To: Auth Or <Foo.Bar@example.com>
  31  remote: X-Git-Host: example
  32  ...
  33  remote: --
  34  remote: To stop receiving notification emails like this one, please contact
  35  remote: the administrator of this repository.
  36  remote: ===========================================================================
  37  To /path/to/repo
  38     6278f04..e173f20  master -> master
  39
  40Note: this does not include the sender (Return-Path: header), as it is
  41not part of the message content but passed to the mailer. Some mailer
  42show the ``Sender:`` field instead of the ``From:`` field (for
  43example, Zimbra Webmail shows ``From: <sender-field> on behalf of
  44<from-field>``).