SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Sponsored Links

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files
Presentation

cvsmail is a set of utilities to manage the delivery of cvs commit logs via email. It contains an email answering robot to manage the subscriptions. The subscription is done by modules for each CVS base handled by cvsmail.

Directories

Here is the organisation of the directories for cvsmail:

  • /usr/share/cvsmail contains all the utilities and libraries.
  • /var/lib/cvsmail contains the table of subscriptions.
  • /var/spool/cvsmail contains the pending subscription requests.

These locations can be changed in the configuration file /etc/cvs/cvsmail.conf. By default the make install command will create these directories and install the necessary files in them.

Configuration

The configuration is done in 2 steps. First you need to setup the answering robot and then you need to enable the delivery of cvs log via cvsmail.

For security reason, it's better to create an account for the answering robot. For example create the cvsmail account and add the following to its ~/.forward file:

|/usr/share/cvsmail/subscriber.py

The directories /var/lib/cvsmail and /var/spool/cvsmail must be writable by the cvsmail user. The /var/lib/cvsmail directory must be accessible for all the users of the cvs base handled by cvsmail.

In each cvs base, you need to modify the file loginfo of the CVSROOT module to contain the following line:

ALL /usr/share/cvsmail/log2mail.py $CVSROOT %{sVv}

Mail language:

Here is the language used in the body of the mail to send to the answering robot to manage subscriptions:

email <email> set the email where all the log will be sent.

cvsroot <cvsroot> specify the cvs base. Must precede any add or del command.

add <module> request mail logs for the specified module.

del <module> remove mail logs for the specified module.

Chrooted environment:

If you use a chrooted jail for your cvs base, you cannot launch python programs in the jail so use the log2spool utility to log the message to a spool dir and let log2mail.py process the queue in a cron job of the cvsmail user, like that:

*/15 * * * * /usr/share/cvsmail/log2mail.py <spooldir>

Copy /usr/lib/cvsmail/log2spool to your CVSROOT directory as root. Create a CVSROOT/spool/partial subdir owned by cvsmail. And instead of log2mail.py, add log2spool in your loginfo file:

ALL $CVSROOT/CVSROOT/log2spool $CVSROOT/CVSROOT/spool $CVSROOT %{sVv}

Configuration

In /etc/cvs/cvsmail.conf, you can change and configure different options:

spooldir: the spool area where cvsmail stores the temporary subscription requests.

libdir: the directory where cvsmail stores the subscriptions.

cvsroot: the list of cvs bases handled by cvsmail.

errors_to: the email address to forward mail errors to.

cvsroot_dir_assoc: associative array to map chrooted env to real dir.

mail_domain: mail domain to masquerade email adresses. If the users file is present in your CVSROOT module, cvsmail will masquerade emails from the addresses contained in it.

use_to: if set, cvsmail sends the mail using the To: field else it uses Bcc:

print_diff: if set, print the differences in the body of the message

rcsdiff: path to the rcsdiff command

rcsdiff_args: optional arguments to pass to the rcsdiff command

signature: append the text to the end of each mail as a mail signature

Comments

Feel free to send me comments and patches to Frederic Lepied <cvsmail@lepied.com>.


Sponsored Links

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.