Due to some maintenance issues, this service has been switched in read-only mode, you can find more information about the why

and how to migrate your plugin documentation in this blogpost

Skip to end of metadata
Go to start of metadata

Plugin Information

No information for the plugin 'regexemail' is available. It may have been removed from distribution.

This plugin allows you to generate user email addresses from usernames.

RegEx Email plugin

This plugin allows you to generate user email addresses from usernames using regular expressions and Java format strings. Because there is no UI support for mail resolver configuration, you have to configure this plugin manually. That's done by creating a file named com.mtvi.plateng.hudson.regex.RegexMailAddressResolver.xml and dropping it in the HUDSON_HOME directory. Here's an example configuration file:

<?xml version='1.0' encoding='UTF-8'?>
<com.mtvi.plateng.hudson.regex.Configuration>
 <userNameExpression>(.*) (.*)</userNameExpression>
 <emailAddressPattern>%s.%s@foo.com</emailAddressPattern>
</com.mtvi.plateng.hudson.regex.Configuration>

As of version 0.2 of the plugin, you can specify multiple regular expression/email address pattern pairs:

<?xml version='1.0' encoding='UTF-8'?>
<com.mtvi.plateng.hudson.regex.MultiConfiguration>
    <configurations>
        <com.mtvi.plateng.hudson.regex.Configuration>
            <userNameExpression>(.*) (.*) (.*)</userNameExpression>
            <emailAddressPattern>%s.%s-%s@foo.com</emailAddressPattern>
        </com.mtvi.plateng.hudson.regex.Configuration>
        <com.mtvi.plateng.hudson.regex.Configuration>
            <userNameExpression>(.*) (.*)</userNameExpression>
            <emailAddressPattern>%s.%s@foo.com</emailAddressPattern>
        </com.mtvi.plateng.hudson.regex.Configuration>
    </configurations>
</com.mtvi.plateng.hudson.regex.MultiConfiguration>

Note that the top-level element changes when you are using multiple configurations. Also note that if multiple regular expressions are potential matches (as in the case above), care must be taken to ensure the order is correct.

Version History

Version 0.3 (January 31, 2010)
  • Update code for more recent Hudson
Version 0.2 (June 30, 2008)
  • Added multiple-configuration support
  • Added more logging
Version 0.1 (June 20, 2008)
  • Initial release

3 Comments

  1. Unknown User (jnizet)

    I think the file name must be com.mtvi.plateng.hudson.regex.RegexMailAddressResolver.xml and not com.mtvi.plateng.hudson.ldap.RegexMailAddressResolver.xml.

    1. Unknown User (zonar808)

      The plugin shows as installed. I added both xml files at hudson home level and at various levels of plugins/regex.  I get no messages that it is even loading or any sort of error or output from the regex package.  I have hudson running on port 8087.  It sort of looks like it's not even loading the plugin....Any ideas?

  2. Unknown User (huberts)

    Is there a way to reload the config file without restarting Jenkins? The regular Jenkins "Reload Configuration from Disk" doesn't seem to do this.