| 1 |
# |
| 2 |
# mailer.conf: example configuration file for mailer.py |
| 3 |
# |
| 4 |
# $Id: mailer.conf.example 1872403 2020-01-07 01:08:27Z futatuki $ |
| 5 |
|
| 6 |
[general] |
| 7 |
|
| 8 |
# The [general].diff option is now DEPRECATED. |
| 9 |
# Instead use [defaults].diff . |
| 10 |
|
| 11 |
# |
| 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. |
| 17 |
# |
| 18 |
|
| 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 |
| 22 |
|
| 23 |
# This option specifies the hostname for delivery via SMTP. |
| 24 |
#smtp_hostname = localhost |
| 25 |
|
| 26 |
# This option specifies the TCP port number to connect for SMTP. |
| 27 |
# If it is not specified, 25 is used for SMTP and 465 is used for |
| 28 |
# SMTP-Over-SSL by default. |
| 29 |
#smtp_port = 25 |
| 30 |
|
| 31 |
# Username and password for SMTP servers requiring authorisation. |
| 32 |
#smtp_username = example |
| 33 |
#smtp_password = example |
| 34 |
|
| 35 |
# This option specifies whether to use SSL from the beginning of the SMTP |
| 36 |
# connection. |
| 37 |
#smtp_ssl = yes |
| 38 |
|
| 39 |
# -------------------------------------------------------------------------- |
| 40 |
|
| 41 |
# |
| 42 |
# CONFIGURATION GROUPS |
| 43 |
# |
| 44 |
# Any sections other than [general], [defaults], [maps] and sections |
| 45 |
# referred to within [maps] are considered to be user-defined groups |
| 46 |
# which override values in the [defaults] section. |
| 47 |
# These groups are selected using the following three options: |
| 48 |
# |
| 49 |
# for_repos |
| 50 |
# for_paths |
| 51 |
# search_logmsg |
| 52 |
# |
| 53 |
# Each option specifies a regular expression. for_repos is matched |
| 54 |
# against the absolute path to the repository the mailer is operating |
| 55 |
# against. for_paths is matched against *every* path (files and |
| 56 |
# dirs) that was modified during the commit. |
| 57 |
# |
| 58 |
# The options specified in the [defaults] section are always selected. The |
| 59 |
# presence of a non-matching for_repos has no relevance. Note that you may |
| 60 |
# still use a for_repos value to extract useful information (more on this |
| 61 |
# later). Any user-defined groups without a for_repos, or which contains |
| 62 |
# a matching for_repos, will be selected for potential use. |
| 63 |
# |
| 64 |
# The subset of user-defined groups identified by the repository are further |
| 65 |
# refined based on the for_paths option. A group is selected if at least |
| 66 |
# one path(*) in the commit matches the for_paths regular expression. Note |
| 67 |
# that the paths are relative to the root of the repository and do not |
| 68 |
# have a leading slash. |
| 69 |
# |
| 70 |
# (*) Actually, each path will select just one group. Thus, it is possible |
| 71 |
# that one group will match against all paths, while another group matches |
| 72 |
# none of the paths, even though its for_paths would have selected some of |
| 73 |
# the paths in the commit. |
| 74 |
# |
| 75 |
# search_logmsg specifies a regular expression to match against the |
| 76 |
# log message. If the regular expression does not match the log |
| 77 |
# message, the group is not matched; if the regular expression matches |
| 78 |
# once, the group is used. If there are multiple matches, each |
| 79 |
# successful match generates another group-match (this is useful if |
| 80 |
# "named groups" are used). If search_logmsg is not used, no log |
| 81 |
# message filtering is performed. |
| 82 |
# |
| 83 |
# Groups are matched in no particular order. Do not depend upon their |
| 84 |
# order within this configuration file. The values from [defaults] will |
| 85 |
# be used if no group is matched or an option in a group does not override |
| 86 |
# the corresponding value from [defaults]. |
| 87 |
# |
| 88 |
# Generally, a commit email is generated for each group that has been |
| 89 |
# selected. The script will try to minimize mails, so it may be possible |
| 90 |
# that a single message will be generated to multiple recipients. In |
| 91 |
# addition, it is possible for multiple messages per group to be generated, |
| 92 |
# based on the various substitutions that are performed (see the following |
| 93 |
# section). |
| 94 |
# |
| 95 |
# |
| 96 |
# SUBSTITUTIONS |
| 97 |
# |
| 98 |
# The regular expressions can use the "named group" syntax to extract |
| 99 |
# interesting pieces of the repository or commit path. These named values |
| 100 |
# can then be substituted in the option values during mail generation. |
| 101 |
# |
| 102 |
# For example, let's say that you have a repository with a top-level |
| 103 |
# directory named "clients", with several client projects underneath: |
| 104 |
# |
| 105 |
# REPOS/ |
| 106 |
# clients/ |
| 107 |
# gsvn/ |
| 108 |
# rapidsvn/ |
| 109 |
# winsvn/ |
| 110 |
# |
| 111 |
# The client name can be extracted with a regular expression like: |
| 112 |
# |
| 113 |
# for_paths = clients/(?P<client>[^/]*)($|/) |
| 114 |
# |
| 115 |
# The substitution is performed using Python's dict-based string |
| 116 |
# interpolation syntax: |
| 117 |
# |
| 118 |
# to_addr = commits@%(client)s.tigris.org |
| 119 |
# |
| 120 |
# The %(NAME)s syntax will substitute whatever value for NAME was captured |
| 121 |
# in the for_repos and for_paths regular expressions. The set of names |
| 122 |
# available is obtained from the following set of regular expressions: |
| 123 |
# |
| 124 |
# [defaults].for_repos (if present) |
| 125 |
# [GROUP].for_repos (if present in the user-defined group "GROUP") |
| 126 |
# [GROUP].for_paths (if present in the user-defined group "GROUP") |
| 127 |
# |
| 128 |
# The names from the regexes later in the list override the earlier names. |
| 129 |
# If none of the groups match, but a for_paths is present in [defaults], |
| 130 |
# then its extracted names will be available. |
| 131 |
# |
| 132 |
# Further suppose you want to match bug-ids in log messages: |
| 133 |
# |
| 134 |
# search_logmsg = (?P<bugid>(ProjA|ProjB)#\d) |
| 135 |
# |
| 136 |
# The bugids would be of the form ProjA#123 and ProjB#456. In this |
| 137 |
# case, each time the regular expression matches, another match group |
| 138 |
# will be generated. Thus, if you use: |
| 139 |
# |
| 140 |
# commit_subject_prefix = %(bugid)s: |
| 141 |
# |
| 142 |
# Then, a log message such as "Fixes ProjA#123 and ProjB#234" would |
| 143 |
# match both bug-ids, and two emails would be generated - one with |
| 144 |
# subject "ProjA#123: <...>" and "ProjB#234: <...>". |
| 145 |
# |
| 146 |
# Note that each unique set of names for substitution will generate an |
| 147 |
# email. In the above example, if a commit modified files in all three |
| 148 |
# client subdirectories, then an email will be sent to all three commits@ |
| 149 |
# mailing lists on tigris.org. |
| 150 |
# |
| 151 |
# The substitution variable "author" is provided by default, and is set |
| 152 |
# to the author name passed to mailer.py for revprop changes or the |
| 153 |
# author defined for a revision; if neither is available, then it is |
| 154 |
# set to "no_author". Thus, you might define a line like: |
| 155 |
# |
| 156 |
# from_addr = %(author)[email protected] |
| 157 |
# |
| 158 |
# The substitution variable "repos_basename" is provided, and is set to |
| 159 |
# the directory name of the repository. This can be useful to set |
| 160 |
# a custom subject that can be re-used in multiple repositories: |
| 161 |
# |
| 162 |
# commit_subject_prefix = [svn-%(repos_basename)s] |
| 163 |
# |
| 164 |
# For example if the repository is at /path/to/repo/project-x then |
| 165 |
# the subject of commit emails will be prefixed with [svn-project-x] |
| 166 |
# |
| 167 |
# |
| 168 |
# SUMMARY |
| 169 |
# |
| 170 |
# While mailer.py will work to minimize the number of mail messages |
| 171 |
# generated, a single commit can potentially generate a large number |
| 172 |
# of variants of a commit message. The criteria for generating messages |
| 173 |
# is based on: |
| 174 |
# |
| 175 |
# groups selected by for_repos |
| 176 |
# groups selected by for_paths |
| 177 |
# unique sets of parameters extracted by the above regular expressions |
| 178 |
# |
| 179 |
|
| 180 |
[defaults] |
| 181 |
|
| 182 |
# This is not passed to the shell, so do not use shell metacharacters. |
| 183 |
# The command is split around whitespace, so if you want to include |
| 184 |
# whitespace in the command, then ### something ###. |
| 185 |
diff = /usr/bin/diff -u -L %(label_from)s -L %(label_to)s %(from)s %(to)s |
| 186 |
|
| 187 |
# The default prefix for the Subject: header for commits. |
| 188 |
commit_subject_prefix = |
| 189 |
|
| 190 |
# The default prefix for the Subject: header for propchanges. |
| 191 |
propchange_subject_prefix = |
| 192 |
|
| 193 |
# The default prefix for the Subject: header for locks. |
| 194 |
lock_subject_prefix = |
| 195 |
|
| 196 |
# The default prefix for the Subject: header for unlocks. |
| 197 |
unlock_subject_prefix = |
| 198 |
|
| 199 |
|
| 200 |
# The default From: address for messages. If the from_addr is not |
| 201 |
# specified or it is specified but there is no text after the `=', |
| 202 |
# then the revision's author is used as the from address. If the |
| 203 |
# revision author is not specified, such as when a commit is done |
| 204 |
# without requiring authentication and authorization, then the string |
| 205 |
# 'no_author' is used. You can specify a default from_addr here and |
| 206 |
# if you want to have a particular for_repos group use the author as |
| 207 |
# the from address, you can use "from_addr =". |
| 208 |
from_addr = [email protected] |
| 209 |
|
| 210 |
# The default To: addresses for message. One or more addresses, |
| 211 |
# separated by whitespace (no commas). |
| 212 |
# NOTE: If you want to use a different character for separating the |
| 213 |
# addresses put it in front of the addresses included in square |
| 214 |
# brackets '[ ]'. |
| 215 |
to_addr = [email protected] |
| 216 |
|
| 217 |
# If this is set, then a Reply-To: will be inserted into the message. |
| 218 |
reply_to = |
| 219 |
|
| 220 |
# Specify which types of repository changes mailer.py will create |
| 221 |
# diffs for. Valid options are any combination of |
| 222 |
# 'add copy modify delete', or 'none' to never create diffs. |
| 223 |
# If the generate_diffs option is empty, the selection is controlled |
| 224 |
# by the deprecated options suppress_deletes and suppress_adds. |
| 225 |
# Note that this only affects the display of diffs - all changes are |
| 226 |
# mentioned in the summary of changed paths at the top of the message, |
| 227 |
# regardless of this option's value. |
| 228 |
# Meaning of the possible values: |
| 229 |
# add: generates diffs for all added paths |
| 230 |
# copy: generates diffs for all copied paths |
| 231 |
# which were not changed after copying |
| 232 |
# modify: generates diffs for all modified paths, including paths that were |
| 233 |
# copied and modified afterwards (within the same commit) |
| 234 |
# delete: generates diffs for all removed paths |
| 235 |
generate_diffs = add copy modify |
| 236 |
|
| 237 |
# Commit URL construction. This adds a URL to the top of the message |
| 238 |
# that can lead the reader to a Trac, ViewVC or other view of the |
| 239 |
# commit as a whole. |
| 240 |
# |
| 241 |
# The available substitution variable is: rev |
| 242 |
#commit_url = http://diffs.server.com/trac/software/changeset/%(rev)s |
| 243 |
|
| 244 |
# Diff URL construction. For the configured diff URL types, the diff |
| 245 |
# section (which follows the message header) will include the URL |
| 246 |
# relevant to the change type, even if actual diff generation for that |
| 247 |
# change type is disabled (per the generate_diffs option). |
| 248 |
# |
| 249 |
# Available substitution variables are: path, base_path, rev, base_rev |
| 250 |
#diff_add_url = |
| 251 |
#diff_copy_url = |
| 252 |
#diff_modify_url = http://diffs.server.com/?p1=%(base_path)s&p2=%(path)s |
| 253 |
#diff_delete_url = |
| 254 |
|
| 255 |
# When set to "yes", the mailer will suppress the creation of a diff which |
| 256 |
# deletes all the lines in the file. If this is set to anything else, or |
| 257 |
# is simply commented out, then the diff will be inserted. Note that the |
| 258 |
# deletion is always mentioned in the message header, regardless of this |
| 259 |
# option's value. |
| 260 |
### DEPRECATED (if generate_diffs is not empty, this option is ignored) |
| 261 |
#suppress_deletes = yes |
| 262 |
|
| 263 |
# When set to "yes", the mailer will suppress the creation of a diff which |
| 264 |
# adds all the lines in the file. If this is set to anything else, or |
| 265 |
# is simply commented out, then the diff will be inserted. Note that the |
| 266 |
# addition is always mentioned in the message header, regardless of this |
| 267 |
# option's value. |
| 268 |
### DEPRECATED (if generate_diffs is not empty, this option is ignored) |
| 269 |
#suppress_adds = yes |
| 270 |
|
| 271 |
# A revision is reported on if any of its changed paths match the |
| 272 |
# for_paths option. If only some of the changed paths of a revision |
| 273 |
# match, this variable controls the behaviour for the non-matching |
| 274 |
# paths. Possible values are: |
| 275 |
# |
| 276 |
# yes: (Default) Show in both summary and diffs. |
| 277 |
# summary: Show the changed paths in the summary, but omit the diffs. |
| 278 |
# no: Show nothing more than a note saying "and changes in other areas" |
| 279 |
# |
| 280 |
show_nonmatching_paths = yes |
| 281 |
|
| 282 |
# Subject line length limit. The generated subject line will be truncated |
| 283 |
# and terminated with "...", to remain within the specified maximum length. |
| 284 |
# Set to 0 to turn off. |
| 285 |
#truncate_subject = 200 |
| 286 |
|
| 287 |
# -------------------------------------------------------------------------- |
| 288 |
|
| 289 |
[maps] |
| 290 |
|
| 291 |
# |
| 292 |
# This section can be used define rewrite mappings for option values. It |
| 293 |
# is typically used for computing from/to addresses, but can actually be |
| 294 |
# used to remap values for any option in this file. |
| 295 |
# |
| 296 |
# The mappings are global for the entire configuration file. There is |
| 297 |
# no group-specific mapping capability. For each mapping that you want |
| 298 |
# to perform, you will provide the name of the option (e.g. from_addr) |
| 299 |
# and a specification of how to perform those mappings. These declarations |
| 300 |
# are made here in the [maps] section. |
| 301 |
# |
| 302 |
# When an option is accessed, the value is loaded from the configuration |
| 303 |
# file and all %(NAME)s substitutions are performed. The resulting value |
| 304 |
# is then passed through the map. If a map entry is not available for |
| 305 |
# the value, then it will be used unchanged. |
| 306 |
# |
| 307 |
# NOTES: - Avoid using map substitution names which differ only in case. |
| 308 |
# Unexpected results may occur. |
| 309 |
# - A colon ':' is also considered as separator between option and |
| 310 |
# value (keep this in mind when trying to map a file path under |
| 311 |
# windows). |
| 312 |
# |
| 313 |
# The format to declare a map is: |
| 314 |
# |
| 315 |
# option_name_to_remap = mapping_specification |
| 316 |
# |
| 317 |
# At the moment, there is only one type of mapping specification: |
| 318 |
# |
| 319 |
# mapping_specification = '[' sectionname ']' |
| 320 |
# |
| 321 |
# This will use the given section to map values. The option names in |
| 322 |
# the section are the input values, and the option values are the result. |
| 323 |
# |
| 324 |
|
| 325 |
# |
| 326 |
# EXAMPLE: |
| 327 |
# |
| 328 |
# We have two projects using two repositories. The name of the repos |
| 329 |
# does not easily map to their commit mailing lists, so we will use |
| 330 |
# a mapping to go from a project name (extracted from the repository |
| 331 |
# path) to their commit list. The committers also need a special |
| 332 |
# mapping to derive their email address from their repository username. |
| 333 |
# |
| 334 |
# [projects] |
| 335 |
# for_repos = .*/(?P<project>.*) |
| 336 |
# from_addr = %(author)s |
| 337 |
# to_addr = %(project)s |
| 338 |
# |
| 339 |
# [maps] |
| 340 |
# from_addr = [authors] |
| 341 |
# to_addr = [mailing-lists] |
| 342 |
# |
| 343 |
# [authors] |
| 344 |
# john = [email protected] |
| 345 |
# sarah = [email protected] |
| 346 |
# |
| 347 |
# [mailing-lists] |
| 348 |
# t600 = [email protected] |
| 349 |
# tx = [email protected] |
| 350 |
# |
| 351 |
|
| 352 |
# -------------------------------------------------------------------------- |
| 353 |
|
| 354 |
# |
| 355 |
# [example-group] |
| 356 |
# # send notifications if any web pages are changed |
| 357 |
# for_paths = .*\.html |
| 358 |
# # set a custom prefix |
| 359 |
# commit_subject_prefix = [commit] |
| 360 |
# propchange_subject_prefix = [propchange] |
| 361 |
# # override the default, sending these elsewhere |
| 362 |
# to_addr = [email protected] |
| 363 |
# # use the revision author as the from address |
| 364 |
# from_addr = |
| 365 |
# # use a custom diff program for this group |
| 366 |
# diff = /usr/bin/my-diff -u -L %(label_from)s -L %(label_to)s %(from)s %(to)s |
| 367 |
# |
| 368 |
# [another-example] |
| 369 |
# # commits to personal repositories should go to that person |
| 370 |
# for_repos = /home/(?P<who>[^/]*)/repos |
| 371 |
# to_addr = %(who)[email protected] |
| 372 |
# |
| 373 |
# [issuetracker] |
| 374 |
# search_logmsg = (?P<bugid>(?P<project>projecta|projectb|projectc)#\d+) |
| 375 |
# # (or, use a mapping if the bug-id to email address is not this trivial) |
| 376 |
# to_addr = %(project)[email protected] |
| 377 |
# commit_subject_prefix = %(bugid)s: |
| 378 |
# propchange_subject_prefix = %(bugid)s: |
| 379 |
|