reference:send_admin_message

Send Admin Message

It is possible for administrator users to send a bulk email message to an entire group or list.

To begin composing an email, go to the Administration Settings → Users page, and click Send Admin Message.

This should then open a window, which allows you to specify various options.

  • Target Group/List: The message will be sent to all local users who are members of the selected group or list.
  • Save message for future use: If ticked, the message will remain available, so that it may be edited, and then sent again. Otherwise, the most recently saved message will remain available.
  • Message Subject
  • Message Text: The plaintext message body. HTML messages are not currently supported.

Keywords

Keywords can be placed into the message content, which will provide an individual value for each recipient (e.g. {username} will ensure each user's message contains their own username).

  • {username}
  • {ldap_###} - the LDAP attribute represented by ###; e.g. {ldap_o}.
  • {messagecount} - the number of messages in the recipient's inbox, at the time the message is sent.
  • {mailboxsize} - the total size of all messages in the recipient's mailbox.
  • {mailboxquota} - the total number of megabytes allocated for the recipient's mailbox quota. Note: this value will be 0, where no quota has been set.
  • {lua}…{/lua} - will execute an embedded Lua script.

Using Lua

On of the options of this facility lets you specify a Lua script in the message to send. This script lets you customise the message for each user.

See the Lua scripting page for details on the VPOP3 Lua implementation.

When a Lua script in the administrator message is run, it has certain global variables set:

  • Username - contains the username of the user currently being processed
  • MessageCount - contains the number of messages in the user's inbox
  • MailboxSize - contains the size of the user's whole mailbox (in bytes)
  • MailboxQuota - contains the user's mailbox quota setting (in bytes - 0 means no limit)
  • LDAP - this is a table containing the LDAP attributes for this user - the attribute names are in upper case - eg LDAP.CN is the user's 'display name'

(The variable names are case sensitive)

Anything that the script 'prints' gets sent to the user

An example Lua script used in the message sending facility might be

{lua}
if MailboxQuota ~= 0 then
  print ("You are currently using " .. MailboxSize .. " bytes of your allowed " .. MailboxQuota .. " bytes in your mailbox")
end
{/lua}

If the Lua script sets the global variable 'DontSend' (case sensitive) to '1' then VPOP3 won't send the message to this particular user.

reference/send_admin_message.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1