diff options
Diffstat (limited to 'pigeonhole/src/lib-sieve/sieve-address-source.h')
-rw-r--r-- | pigeonhole/src/lib-sieve/sieve-address-source.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pigeonhole/src/lib-sieve/sieve-address-source.h b/pigeonhole/src/lib-sieve/sieve-address-source.h new file mode 100644 index 0000000..fac4b49 --- /dev/null +++ b/pigeonhole/src/lib-sieve/sieve-address-source.h @@ -0,0 +1,36 @@ +#ifndef SIEVE_ADDRESS_SOURCE_H +#define SIEVE_ADDRESS_SOURCE_H + +#include "sieve-common.h" + +enum sieve_address_source_type { + SIEVE_ADDRESS_SOURCE_DEFAULT = 0, + SIEVE_ADDRESS_SOURCE_SENDER, + SIEVE_ADDRESS_SOURCE_RECIPIENT, + SIEVE_ADDRESS_SOURCE_ORIG_RECIPIENT, + SIEVE_ADDRESS_SOURCE_USER_EMAIL, + SIEVE_ADDRESS_SOURCE_POSTMASTER, + SIEVE_ADDRESS_SOURCE_EXPLICIT +}; + +struct sieve_address_source { + enum sieve_address_source_type type; + const struct smtp_address *address; +}; + +bool sieve_address_source_parse + (pool_t pool, const char *value, + struct sieve_address_source *asrc); +bool sieve_address_source_parse_from_setting + (struct sieve_instance *svinst, pool_t pool, + const char *setting, struct sieve_address_source *asrc); + +int sieve_address_source_get_address + (struct sieve_address_source *asrc, + struct sieve_instance *svinst, + const struct sieve_script_env *senv, + struct sieve_message_context *msgctx, + enum sieve_execute_flags flags, + const struct smtp_address **addr_r); + +#endif |