Dovecot sieve filters

Stephan Bosch stephan at rename-it.nl
Mon Sep 20 11:52:00 EEST 2021



On 20/09/2021 09:05, j.emerlik wrote:
> After I deleted  "envelope" from the "require":
>
> if address :is "from" "*" {
>     set :lower "from" "${1}";
> }

You need to use :matches rather than :is.

> It returns: null
Null? That doesn't make sense. It should return the empty string if you 
do stuff like this.

>
> if header :matches "From" "*" {
>         set "address" ": ${1}";
> }
>
> It returns address as: "some string" <example at example.org 
> <mailto:example at example.org>>
This is the full header value, which can contain more than a single address.

Regards,

Stephan.

>
>
> pon., 20 wrz 2021 o 01:44 Gedalya <gedalya at gedalya.net 
> <mailto:gedalya at gedalya.net>> napisał(a):
>
>     On 9/20/21 03:15, j.emerlik wrote:
>     > "If address :is "from" "*" { .. } - I have same error.
>
>     Quote:
>
>     Error: sieve: report-ham: line 1: the envelope extension cannot be
>     used in this context (needs access to message envelope)
>
>     It says "line 1", that's your "require" line. You need to remove
>     "envelope" from the "require" line.
>
>



More information about the dovecot mailing list