This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
reference:user_delivery_script [2015/09/23 12:46] – external edit 127.0.0.1 | reference:user_delivery_script [2018/11/14 10:45] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
(VPOP3 v6.5 or later) | (VPOP3 v6.5 or later) | ||
- | If there is a < | + | If there is a < |
If that script doesn' | If that script doesn' | ||
- | The script | + | The script |
- | =====Global Variables set before | + | (Prior to v6.20, only the **DeliverMessage** function is used) |
+ | |||
+ | =====Global Variables set before | ||
* 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 20: | 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' | * SpamScore - the VPOP3 spam filter' | ||
+ | * 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===== |