mod_watchregistrations
If you run a server on which registration is open, it is quite likely that you will want to know when someone registers a new account. This module allows you to do just that.
Details
By enabling this module all configured admins will receive a message when someone registers. You can customise this behaviour using the below options.
Usage
= {
modules_enabled -- Other modules
"watchregistrations"; -- Enable mod_watchregistrations
}
Configuration
Option | Default | Notes |
---|---|---|
registration_watchers | { } | List of users to receive registration alerts, if empty the admins list is used |
registration_notification | "User $username just registered on $host from $ip" | The message to send whenever a new user registers with variable expansion - see below |
Registration Notification Variables
Some variables can be specified in registration_notification and Prosody will automatically replace them with the relevant information before sending the message. The following list assumes a user has registered new.user@example.net from IP address 127.0.0.1.
Variable | Description | Example |
---|---|---|
$username | The username of the new user | new.user |
$host | The host of the new user | example.net |
$ip | The IP address the registration was made from | 127.0.0.1 |
Example
= {
modules_enabled -- Other modules
"watchregistrations"; -- Enable mod_watchregistrations
}
= { "some.user@example.net" } -- mod_watchregistrations will use this list of users instead of the admin list
registration_watchers = "User $username just registered on $host from $ip" registration_notification