[Sieve] Matches on body content - looking for working example

Doug Hardie bc979 at lafn.org
Thu Sep 20 01:22:39 EEST 2018


> On 19 September 2018, at 12:54, Adam Raszkiewicz <araszkiewicz at medallies.com> wrote:
> 
> I have tried to do something like
>  
> if body :content ["multipart"] :matches ["Original-Message-ID" “*”] { set "Original_Message_ID" "${0}"; }
>  
> but instead getting Original Message ID I’m getting value from previous match which was
>  
> if envelope :matches "From" "*" { set "sender" "${0}"; }
>  
> Is there any example of working :matches matching-type with body?
>  
> Thanks


I have the following that works:

if allof (header :contains "from" "fbl-no-reply at postmaster.aol.com",
        body :contains :raw "some text")
{
        fileinto "Deleted Messages";
        stop;
}




More information about the dovecot mailing list