Stephan Bosch wrote:
What exactly are you trying to achieve here? Do you want to execute the Sieve script only when no -m parameter is specified for deliver? Why? You can also use the subaddress extension in Sieve and get rid of the -m parameter altogether.
One issue you may have is that you require that the user should not be able to influence delivery based on an address extension. This, however, can also be solved entirely using Sieve.
For example:
Don't use a -m parameter to deliver for direct folder delivery.
Use something like this as a sieve_before script:
require ["fileinto", "variables", "envelope", "subaddress"];
/* Check for an extension and match full value */ if envelope :detail :matches "to" "*" {
/* Match is available as ${1} by means of the variables extension */ fileinto "${1}";
/* Stop further processing in this script; * implicit keep is canceled */ stop; }
/* Normal messages */
- Now the user's script is only executed when there is no extension in the address.
Regards,
-- Stephan Bosch stephan@rename-it.nl