2 # mailer.conf: example configuration file for mailer.py
8 # The [general].diff option is now DEPRECATED.
9 # Instead use [defaults].diff .
12 # One delivery method must be chosen. mailer.py will prefer using the
13 # "mail_command" option. If that option is empty or commented out,
14 # then it checks whether the "smtp_hostname" option has been
15 # specified. If neither option is set, then the commit message is
16 # delivered to stdout.
19 # This command will be invoked with destination addresses on the command
20 # line, and the message piped into it.
21 #mail_command = /usr/sbin/sendmail
23 # This option specifies the hostname for delivery via SMTP.
24 #smtp_hostname = localhost
26 # Username and password for SMTP servers requiring authorisation.
27 #smtp_username = example
28 #smtp_password = example
30 # --------------------------------------------------------------------------
33 # CONFIGURATION GROUPS
35 # Any sections other than [general], [defaults], [maps] and sections
36 # referred to within [maps] are considered to be user-defined groups
37 # which override values in the [defaults] section.
38 # These groups are selected using the following two options:
43 # Both options specify a regular expression. The former is matched against
44 # the absolute path to the repository the mailer is operating against. The
45 # second is matched against *every* path (files and dirs) that was modified
48 # The options specified in the [defaults] section are always selected. The
49 # presence of a non-matching for_repos has no relevance. Note that you may
50 # still use a for_repos value to extract useful information (more on this
51 # later). Any user-defined groups without a for_repos, or which contains
52 # a matching for_repos, will be selected for potential use.
54 # The subset of user-defined groups identified by the repository are further
55 # refined based on the for_paths option. A group is selected if at least
56 # one path(*) in the commit matches the for_paths regular expression. Note
57 # that the paths are relative to the root of the repository and do not
58 # have a leading slash.
60 # (*) Actually, each path will select just one group. Thus, it is possible
61 # that one group will match against all paths, while another group matches
62 # none of the paths, even though its for_paths would have selected some of
63 # the paths in the commit.
65 # Groups are matched in no particular order. Do not depend upon their
66 # order within this configuration file. The values from [defaults] will
67 # be used if no group is matched or an option in a group does not override
68 # the corresponding value from [defaults].
70 # Generally, a commit email is generated for each group that has been
71 # selected. The script will try to minimize mails, so it may be possible
72 # that a single message will be generated to multiple recipients. In
73 # addition, it is possible for multiple messages per group to be generated,
74 # based on the various substitutions that are performed (see the following
80 # The regular expressions can use the "named group" syntax to extract
81 # interesting pieces of the repository or commit path. These named values
82 # can then be substituted in the option values during mail generation.
84 # For example, let's say that you have a repository with a top-level
85 # directory named "clients", with several client projects underneath:
93 # The client name can be extracted with a regular expression like:
95 # for_paths = clients/(?P<client>[^/]*)($|/)
97 # The substitution is performed using Python's dict-based string
98 # interpolation syntax:
100 # to_addr = commits@%(client)s.tigris.org
102 # The %(NAME)s syntax will substitute whatever value for NAME was captured
103 # in the for_repos and for_paths regular expressions. The set of names
104 # available is obtained from the following set of regular expressions:
106 # [defaults].for_repos (if present)
107 # [GROUP].for_repos (if present in the user-defined group "GROUP")
108 # [GROUP].for_paths (if present in the user-defined group "GROUP")
110 # The names from the regexes later in the list override the earlier names.
111 # If none of the groups match, but a for_paths is present in [defaults],
112 # then its extracted names will be available.
114 # Note that each unique set of names for substitution will generate an
115 # email. In the above example, if a commit modified files in all three
116 # client subdirectories, then an email will be sent to all three commits@
117 # mailing lists on tigris.org.
119 # The substitution variable "author" is provided by default, and is set
120 # to the author name passed to mailer.py for revprop changes or the
121 # author defined for a revision; if neither is available, then it is
122 # set to "no_author". Thus, you might define a line like:
124 # from_addr = %(author)s@example.com
129 # While mailer.py will work to minimize the number of mail messages
130 # generated, a single commit can potentially generate a large number
131 # of variants of a commit message. The criteria for generating messages
134 # groups selected by for_repos
135 # groups selected by for_paths
136 # unique sets of parameters extracted by the above regular expressions
141 # This is not passed to the shell, so do not use shell metacharacters.
142 # The command is split around whitespace, so if you want to include
143 # whitespace in the command, then ### something ###.
144 diff = /usr/bin/diff -u -L %(label_from)s -L %(label_to)s %(from)s %(to)s
146 # The default prefix for the Subject: header for commits.
147 commit_subject_prefix =
149 # The default prefix for the Subject: header for propchanges.
150 propchange_subject_prefix =
152 # The default prefix for the Subject: header for locks.
153 lock_subject_prefix =
155 # The default prefix for the Subject: header for unlocks.
156 unlock_subject_prefix =
159 # The default From: address for messages. If the from_addr is not
160 # specified or it is specified but there is no text after the `=',
161 # then the revision's author is used as the from address. If the
162 # revision author is not specified, such as when a commit is done
163 # without requiring authentication and authorization, then the string
164 # 'no_author' is used. You can specify a default from_addr here and
165 # if you want to have a particular for_repos group use the author as
166 # the from address, you can use "from_addr =".
167 from_addr = invalid@example.com
169 # The default To: addresses for message. One or more addresses,
170 # separated by whitespace (no commas).
171 # NOTE: If you want to use a different character for separating the
172 # addresses put it in front of the addresses included in square
174 to_addr = invalid@example.com
176 # If this is set, then a Reply-To: will be inserted into the message.
179 # Specify which types of repository changes mailer.py will create
180 # diffs for. Valid options are any combination of
181 # 'add copy modify delete', or 'none' to never create diffs.
182 # If the generate_diffs option is empty, the selection is controlled
183 # by the deprecated options suppress_deletes and suppress_adds.
184 # Note that this only affects the display of diffs - all changes are
185 # mentioned in the summary of changed paths at the top of the message,
186 # regardless of this option's value.
187 # Meaning of the possible values:
188 # add: generates diffs for all added paths
189 # copy: generates diffs for all copied paths
190 # which were not changed after copying
191 # modify: generates diffs for all modified paths, including paths that were
192 # copied and modified afterwards (within the same commit)
193 # delete: generates diffs for all removed paths
194 generate_diffs = add copy modify
196 # Commit URL construction. This adds a URL to the top of the message
197 # that can lead the reader to a Trac, ViewVC or other view of the
200 # The available substitution variable is: rev
201 #commit_url = http://diffs.server.com/trac/software/changeset/%(rev)s
203 # Diff URL construction. For the configured diff URL types, the diff
204 # section (which follows the message header) will include the URL
205 # relevant to the change type, even if actual diff generation for that
206 # change type is disabled (per the generate_diffs option).
208 # Available substitution variables are: path, base_path, rev, base_rev
211 #diff_modify_url = http://diffs.server.com/?p1=%(base_path)s&p2=%(path)s
214 # When set to "yes", the mailer will suppress the creation of a diff which
215 # deletes all the lines in the file. If this is set to anything else, or
216 # is simply commented out, then the diff will be inserted. Note that the
217 # deletion is always mentioned in the message header, regardless of this
219 ### DEPRECATED (if generate_diffs is not empty, this option is ignored)
220 #suppress_deletes = yes
222 # When set to "yes", the mailer will suppress the creation of a diff which
223 # adds all the lines in the file. If this is set to anything else, or
224 # is simply commented out, then the diff will be inserted. Note that the
225 # addition is always mentioned in the message header, regardless of this
227 ### DEPRECATED (if generate_diffs is not empty, this option is ignored)
230 # A revision is reported on if any of its changed paths match the
231 # for_paths option. If only some of the changed paths of a revision
232 # match, this variable controls the behaviour for the non-matching
233 # paths. Possible values are:
235 # yes: (Default) Show in both summary and diffs.
236 # summary: Show the changed paths in the summary, but omit the diffs.
237 # no: Show nothing more than a note saying "and changes in other areas"
239 show_nonmatching_paths = yes
241 # Subject line length limit. The generated subject line will be truncated
242 # and terminated with "...", to remain within the specified maximum length.
243 # Set to 0 to turn off.
244 #truncate_subject = 200
246 # --------------------------------------------------------------------------
251 # This section can be used define rewrite mappings for option values. It
252 # is typically used for computing from/to addresses, but can actually be
253 # used to remap values for any option in this file.
255 # The mappings are global for the entire configuration file. There is
256 # no group-specific mapping capability. For each mapping that you want
257 # to perform, you will provide the name of the option (e.g. from_addr)
258 # and a specification of how to perform those mappings. These declarations
259 # are made here in the [maps] section.
261 # When an option is accessed, the value is loaded from the configuration
262 # file and all %(NAME)s substitutions are performed. The resulting value
263 # is then passed through the map. If a map entry is not available for
264 # the value, then it will be used unchanged.
266 # NOTES: - Avoid using map substitution names which differ only in case.
267 # Unexpected results may occur.
268 # - A colon ':' is also considered as separator between option and
269 # value (keep this in mind when trying to map a file path under
272 # The format to declare a map is:
274 # option_name_to_remap = mapping_specification
276 # At the moment, there is only one type of mapping specification:
278 # mapping_specification = '[' sectionname ']'
280 # This will use the given section to map values. The option names in
281 # the section are the input values, and the option values are the result.
287 # We have two projects using two repositories. The name of the repos
288 # does not easily map to their commit mailing lists, so we will use
289 # a mapping to go from a project name (extracted from the repository
290 # path) to their commit list. The committers also need a special
291 # mapping to derive their email address from their repository username.
294 # for_repos = .*/(?P<project>.*)
295 # from_addr = %(author)s
296 # to_addr = %(project)s
299 # from_addr = [authors]
300 # to_addr = [mailing-lists]
303 # john = jconnor@example.com
304 # sarah = sconnor@example.com
307 # t600 = spottable-commits@example.com
308 # tx = hotness-commits@example.com
311 # --------------------------------------------------------------------------
315 # # send notifications if any web pages are changed
316 # for_paths = .*\.html
317 # # set a custom prefix
318 # commit_subject_prefix = [commit]
319 # propchange_subject_prefix = [propchange]
320 # # override the default, sending these elsewhere
321 # to_addr = www-commits@example.com
322 # # use the revision author as the from address
324 # # use a custom diff program for this group
325 # diff = /usr/bin/my-diff -u -L %(label_from)s -L %(label_to)s %(from)s %(to)s
328 # # commits to personal repositories should go to that person
329 # for_repos = /home/(?P<who>[^/]*)/repos
330 # to_addr = %(who)s@example.com