source: scripts/svn-scripts/mailer.conf.example

Last change on this file was 2769, checked in by Александър Шопов, 13 years ago

svn-scripts: Скриптове за публикуване на информация

File size: 7.7 KB
Line 
1#
2# mailer.conf: example configuration file for mailer.py
3#
4# $Id: mailer.conf.example 10012 2004-06-16 14:34:53Z cmpilato $
5
6[general]
7
8# This is not passed to the shell, so do not use shell metacharacters.
9# The command is split around whitespace, so if you want to include
10# whitespace in the command, then ### something ###
11diff = /usr/bin/diff -u -L %(label_from)s -L %(label_to)s %(from)s %(to)s
12
13#
14# One delivery method must be chosen. mailer.py will prefer using the
15# "mail_command" option. If that option is empty or commented out,
16# then it checks whether the "smtp_hostname" option has been
17# specified. If neither option is set, then the commit message is
18# delivered to stdout.
19#
20
21# This command will be invoked with destination addresses on the command
22# line, and the message piped into it.
23#mail_command = /usr/sbin/sendmail
24
25# This option specifies the hostname for delivery via SMTP
26#smtp_hostname = localhost
27
28# Username and password for SMTP servers requiring authorisation
29#smtp_username = example
30#smtp_password = example
31
32# --------------------------------------------------------------------------
33
34#
35# CONFIGURATION GROUPS
36#
37# Any section other than [general] or [defaults] are considered to be
38# user-defined groups which override values in the [defaults] section.
39# These groups are selected using the following two options:
40#
41# for_repos
42# for_paths
43#
44# Both options specify a regular expression. The former is matched against
45# the absolute path to the repository the mailer is operating against. The
46# second is matched against *every* path (files and dirs) that was modified
47# during the commit.
48#
49# The options specified in the [defaults] section are always selected. The
50# presence of a non-matching for_repos has no relevance. Note that you may
51# still use a for_repos value to extract useful information (more on this
52# later). Any user-defined groups without a for_repos, or which contains
53# a matching for_repos will be selected for potential use.
54#
55# The subset of user-defined groups identified by the repository are further
56# refined based on the for_paths option. A group is selected if at least
57# one path(*) in the commit matches the for_paths regular expression. Note
58# that the paths are relative to the root of the repository and do not
59# have a leading slash.
60#
61# (*) Actually, each path will select just one group. Thus, it is possible
62# that one group will match against all paths, while another group matches
63# none of the paths, even though its for_paths would have selected some of
64# the paths in the commit.
65#
66# Groups are matched in no particular order. Do not depend upon their
67# order within this configuration file. The values from [defaults] will
68# be used if no group is matched or an option in a group does not override
69# the corresponding value from [defaults].
70#
71# Generally, a commit email is generated for each group that has been
72# selected. The script will try to minimize mails, so it may be possible
73# that a single message will be generated to multiple recipients. In
74# addition, it is possible for multiple messages per group to be generated,
75# based on the various substitutions that are performed (see the following
76# section).
77#
78#
79# SUBSTITUTIONS
80#
81# The regular expressions can use the "named group" syntax to extract
82# interesting pieces of the repository or commit path. These named values
83# can then be substituted in the option values during mail generation.
84#
85# For example, let's say that you have a repository with a top-level
86# directory named "clients", with several client projects underneath:
87#
88# REPOS/
89# clients/
90# gsvn/
91# rapidsvn/
92# winsvn/
93#
94# The client name can be extracted with a regular expression like:
95#
96# for_paths = clients/(?P<client>[^/]*)($|/)
97#
98# The substitution is performed using Python's dict-based string
99# interpolation syntax:
100#
101# to_addr = commits@%(client)s.tigris.org
102#
103# The %(NAME)s syntax will substitute whatever value for NAME was captured
104# in the for_repos and for_paths regular expressions. The set of names
105# available is obtained from the following set of regular expressions:
106#
107# [defaults].for_repos (if present)
108# [GROUP].for_repos (if present in the user-defined group "GROUP")
109# [GROUP].for_paths (if present in the user-defined group "GROUP")
110#
111# The names from the regexes later in the list override the earlier names.
112# If none of the groups match, but a for_paths is present in [defaults],
113# then its extracted names will be available.
114#
115# Note that each unique set of names for substitution will generate an
116# email. In the above example, if a commit modified files in all three
117# client subdirectories, then an email will be sent to all three commits@
118# mailing lists on tigris.org.
119#
120#
121# SUMMARY
122#
123# While mailer.py will work to minimize the number of mail messages
124# generated, a single commit can potentially generate a large number
125# of variants of a commit message. The criteria for generating messages
126# is based on:
127#
128# groups selected by for_repos
129# groups selected by for_paths
130# unique sets of parameters extracted by the above regular expressions
131#
132
133[defaults]
134
135# The default prefix for the Subject: header for commits
136commit_subject_prefix =
137
138# The default prefix for the Subject: header for propchanges
139propchange_subject_prefix =
140
141# The default From: address for messages. If the from_addr is not
142# specified or it is specified but there is no text after the `=',
143# then the revision's author is used as the from address. If the
144# revision author is not specified, such as when a commit is done
145# without requiring authentication and authorization, then the string
146# 'no_author' is used. You can specify a default from_addr here and
147# if you want to have a particular for_repos group use the author as
148# the from address, you can use "from_addr =".
149from_addr = invalid@example.com
150
151# The default To: addresses for message. One or more addresses,
152# separated by whitespace (no commas):
153to_addr = invalid@example.com
154
155# If this is set, then a Reply-To: will be inserted into the message
156reply_to =
157
158# When set to one of the valid options, the mailer will create a diff
159# for the appropriate type of change in the repository. If this is
160# empty or contains other words than the valid options no diffs will
161# be created. Note that the operation is always mentioned in the
162# message header, regardless of this option's value.
163# Valid options: add copy delete modify
164generate_diffs = add copy modify
165
166# When set to "yes", the mailer will suppress the creation of a diff which
167# deletes all the lines in the file. If this is set to anything else, or
168# is simply commented out, then the diff will be inserted. Note that the
169# deletion is always mentioned in the message header, regardless of this
170# option's value.
171### DEPRECATED (if generate_diffs is not empty, this option is ignored)
172suppress_deletes = yes
173
174# When set to "yes", the mailer will suppress the creation of a diff which
175# adds all the lines in the file. If this is set to anything else, or
176# is simply commented out, then the diff will be inserted. Note that the
177# addition is always mentioned in the message header, regardless of this
178# option's value.
179### DEPRECATED (if generate_diffs is not empty, this option is ignored)
180#suppress_adds = yes
181
182
183# --------------------------------------------------------------------------
184
185#
186# [example-group]
187# # send notifications if any web pages are changed
188# for_paths = .*\.html
189# # set a custom prefix
190# commit_subject_prefix = [commit]
191# propchange_subject_prefix = [propchange]
192# # override the default, sending these elsewhere
193# to_addr = www-commits@example.com
194# # use the revision author as the from address
195# from_addr =
196#
197# [another-example]
198# # commits to personal repositories should go to that person
199# for_repos = /home/(?P<who>[^/]*)/repos
200# to_addr = %(who)s@example.com
201#
Note: See TracBrowser for help on using the repository browser.