User Tools

Site Tools


reference:user_delivery_script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
reference:user_delivery_script [2016/04/15 15:41] – [User Delivery Script] paulreference:user_delivery_script [2017/02/01 14:29] – [User Delivery Script] paul
Line 2: Line 2:
 (VPOP3 v6.5 or later) (VPOP3 v6.5 or later)
  
-If there is a <username>/delivery.lua script, this Lua script can override VPOP3's message delivery options. You can edit this either in the Settings -> Scripts page in the settings. This script affects how VPOP3 will handle how messages being delivered to this user are handled.+If there is a <username>/delivery.lua script, this Lua script can override VPOP3's message delivery options. You can edit this in the Settings -> Scripts page in the settings. This script affects how VPOP3 will handle how messages being delivered to this user are handled.
  
 If that script doesn't exist, but there is a delivery.lua script, that Lua script will be used instead. If that script doesn't exist, but there is a delivery.lua script, that Lua script will be used instead.
Line 10: Line 10:
 (Prior to v6.20, only the **DeliverMessage** function is used) (Prior to v6.20, only the **DeliverMessage** function is used)
  
-**PreDeliver** is called at the beginning of the delivery process, after Message Rules have been handled. It can modify any globals, but only the Quarantine, Forwards, HeaderMods, ForwardingSenderAddress and ForwardingSenderText globals are read after it has been called. Any other changes will be processed after the **DeliverMessage** function is called. +=====Global Variables set before functions are called=====
- +
-If the message is quarantined or Message Rules have indicated that it is not to be delivered to any folders, then it will not be delivered further so **DeliverMessage** will not be called. +
- +
-**DeliverMessage** is called in the middle of the delivery process, as long as the message is still being delivered into at least one message folder. +
- +
-=====Global Variables set before DeliverMessage function is called=====+
   * User - the username the message is to be delivered to   * User - the username the message is to be delivered to
   * Subject - the subject of the message   * Subject - the subject of the message
Line 28: Line 22:
   * Folders - a table containing a list of folders for the message to be delivered to   * Folders - a table containing a list of folders for the message to be delivered to
   * SpamScore - the VPOP3 spam filter's score assigned to the message   * SpamScore - the VPOP3 spam filter's score assigned to the message
 +  * Headers - the message headers (table of string pairs - [1] field name, [2] data
 +  * Forwards - email addresses to forward the message to (table of strings)
 +  * HeaderMods - header modifiers (table of strings)
 +  * ForwardingSenderAddress - the sender address for any forwards
 +  * ForwardingSenderText - the text name of the sender for any forwards
 +  * Quarantine - bool - whether the message should be quarantined or not
 +
 +=====PreDeliver=====
 +**PreDeliver** is called at the beginning of the delivery process, after Message Rules have been handled. It can modify any globals, but only the Quarantine, Forwards, HeaderMods, ForwardingSenderAddress and ForwardingSenderText globals are read after it has been called. Any other changes made by this function will be left unchanged and will be processed after the **DeliverMessage** function is called.
 +
 +=====Global Variables which can be set by the PreDeliver function=====
 +  * Forwards - email addresses to forward the message to (table of strings)
 +  * HeaderMods - header modifiers (table of strings)
 +  * ForwardingSenderAddress - the sender address for any forwards
 +  * ForwardingSenderText - the text name of the sender for any forwards
 +  * Quarantine - bool - whether the message should be quarantined or not
 +
 +=====DeliverMessage=====
 +**DeliverMessage** is called in the middle of the delivery process, as long as the message is still being delivered into at least one message folder.
 +
 +If the message is quarantined or Message Rules have indicated that it is not to be delivered to any folders, then it will not be delivered further so **DeliverMessage** will not be called.
  
 =====Global Variables which can be set by the function===== =====Global Variables which can be set by the function=====
reference/user_delivery_script.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1