This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
reference:user_routing_script [2011/05/31 10:59] – created paul | reference:user_routing_script [2011/10/14 15:23] – [If the sender is user@domain.com forward to person@mycompany.com] paul | ||
---|---|---|---|
Line 1: | Line 1: | ||
======User Routing Script====== | ======User Routing Script====== | ||
- | If there is a user_redirect.lua file in a user's directory this Lua script can override VPOP3' | + | If there is a user_redirect.lua file in a user's directory this Lua script can override VPOP3' |
If that file doesn' | If that file doesn' | ||
Line 34: | Line 34: | ||
* Subject - the subject of the message | * Subject - the subject of the message | ||
- | An example script might be | + | =====Examples===== |
+ | |||
+ | ====Don' | ||
+ | |||
+ | < | ||
+ | --Don' | ||
+ | if (string.find(Sender, | ||
+ | ShouldForward = false; | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | ====If | ||
+ | |||
+ | |||
+ | < | ||
+ | --If the sender is user@domain.com forward to person@mycompany.com | ||
+ | if (string.lower(Sender) == " | ||
+ | Forwards = " | ||
+ | ShouldForward = true; | ||
+ | end | ||
+ | </ | ||
- | --Don' | ||
- | if (string.find(Sender, | ||
- | ShouldForward = false | ||
- | end | ||
- | |