Sending email when commits are pushed to a repository

Install git-multimail.

[root@len /]# mkdir /usr/local/src; cd /usr/local/src
[root@len /usr/local/src]# git clone https://github.com/git-multimail/git-multimail

As user 'dfri', install a post-receive hook and configure it.

[dfri@len ~]$ cd dfri.git
[dfri@len ~/dfri.git]$ ln -s /usr/local/src/git-multimail/git-multimail/git_multimail.py hooks/post-receive
[dfri@len ~/dfri.git]$ git config --add multimailhook.mailingList git-commits@dfri.se

The dfriadm repo is hosted on iris.dfri.se. We don't want the full commit messages sent in email so we use the 'refchangeList' setting instead:

[gitserver@iris ~] ln -s /usr/local/src/git-multimail/git-multimail/git_multimail.py hooks/post-receive
[gitserver@iris ~] git config --add multimailhook.mailingList ''
[gitserver@iris ~] git config --add multimailhook.refchangeList git-commits@dfri.se