Wednesday, May 29, 2013

How to set up a email mailer post commit script with subversion on Fedora.

From http://stackoverflow.com/questions/501692/easiest-best-way-to-set-up-svn-commit-emails, the easiest way is to use the existing .py mailer script.

_____________

On Fedora 15, do the following:

yum install subversion-python

_____________

In your subversion repository:

cd hooks

cp post-commit post-commit.tmpl

Change

mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf

to

/usr/share/doc/subversion-1.6.18/tools/hook-scripts/mailer/mailer.py commit "$REPOS" "$REV" /etc/mailer.conf

_____________

After that, do the following to setup the mailer.conf file:

cp /usr/share/doc/subversion-1.6.18/tools/hook-scripts/mailer/tests/mailer.conf /etc/mailer.conf

Edit the mailer.conf and:

uncomment  mail_command = /usr/sbin/sendmail

add in commit_subject_prefix

add in propchange_subject_prefix

add in lock_subject_prefix

add in unlock_subject_prefix

Add in from_addr

Add in to_addr

_____________

Test it out by committing a test revision.

1 comment:

Matthew said...

Here are some troubleshooting tips:

http://www.unixrock.com/2013/11/sendmail-is-not-working-troubleshooting.html

I had to restart the sendmail daemon which may have crashed on my system, tonight.