To some of my collaborators who have recent troubles with svn auto notification:
Instead of the usual spam run on my svn mail server, this time the issue seemed to come from over-zealous spam filtering. That is beyond my control, so I did a workaround.
(See below for more details if interested.)
The only difference is that you will see only yourself as the email recipient instead of everyone else on the cc list.
But this is probably a good thing as it can discourage the temptation to reply all through email.
Let me know if you still see issues.
Here is a quick guide on setup for linux. I will let you search online for other systems and more details.
. Under the “hooks” directory of your repository, there should already be a file named “post-commit.tmpl”. Copy it to a file named “post-commit”, and set x permission for ug. As the name implies, this is the file that will be automatically evoked after commit.
. There should already be a line similar to the following at the end of that post-commit file. All you need to do is to set the proper directory for commit-email.pl and append proper email list.
/usr/share/subversion/hook-scripts/commit-email.pl “$REPOS” “$REV” -s “Project Name” firstname.lastname@example.org email@example.com
. Alternatively, you can also use mailer.py in lieu of commit-email.pl. The former will give you more options while the latter is simpler. For mailer.py, use the following line instead of the commit-emai.pl line above:
/usr/share/subversion/hook-scripts/mailer/mailer.py commit “$REPOS” “$REV” “$REPOS”/hooks/mailer.conf
You also need to put a mailer.conf file under the same directory.
Below is a simple basic setup that works well for me.
# This command will be invoked with destination addresses on the command
# line, and the message piped into it.
mail_command = /usr/sbin/sendmail
# This is not passed to the shell, so do not use shell metacharacters.
# The command is split around whitespace, so if you want to include
# whitespace in the command, then ### something ###.
diff = /usr/bin/diff -u -L %(label_from)s -L %(label_to)s %(from)s %(to)s
# The default prefix for the Subject: header for commits.
commit_subject_prefix = Project Name
# The default To: addresses for message. One or more addresses,
# separated by whitespace (no commas).
# NOTE: If you want to use a different character for separating the
# addresses put it in front of the addresses included in square
# brackets ‘[ ]‘.
to_addr = firstname.lastname@example.org email@example.com
# If this is set, then a Reply-To: will be inserted into the message.
reply_to = firstname.lastname@example.org
# Specify which types of repository changes mailer.py will create
# diffs for. Valid options are any combination of
# ‘add copy modify delete’, or ‘none’ to never create diffs.
# add: generates diffs for all added paths
# copy: generates diffs for all copied paths
# which were not changed after copying
# modify: generates diffs for all modified paths, including paths that were
# copied and modified afterwards (within the same commit)
# delete: generates diffs for all removed paths
generate_diffs = add copy modify
# A revision is reported on if any of its changed paths match the
# for_paths option. If only some of the changed paths of a revision
# match, this variable controls the behaviour for the non-matching
# paths. Possible values are:
# yes: (Default) Show in both summary and diffs.
# summary: Show the changed paths in the summary, but omit the diffs.
# no: Show nothing more than a note saying “and changes in other areas”
show_nonmatching_paths = yes
The mail filter appeared to be rejecting and considering as spam some automatic notifications with multiple recipients. So a quick workaround is to send out emails once at a time to individual recipients. This can be easily achieved via commit-email.pl as follows:
for person in email@example.com firstname.lastname@example.org
/usr/share/subversion/hook-scripts/commit-email.pl “$REPOS” “$REV” -s “Project Name” $person
For mailer.py, you will need separate conf files for individual recipients. This does not look very convenient to me.