sieve: extract first chars of body in sieve script

Stephan Bosch stephan at
Tue May 26 15:02:33 UTC 2015

On 5/26/2015 4:27 PM, Ingo Thierack wrote:
> Hello,
> is it possible to extract the first x chars of the body of an message to
> forward it,
> or the complete body inside an sieve script.
> I want to forward specific mails via telegram-messenger. No Problem to
> extract
> the "from" and the "subject".
> if header :matches "Subject" "*" {
>     set "subject" "${1}";
> }
> if header :matches "from" "*" {
>     set "from" "${1}";
> }
> pipe :copy :try "" [ "(${from})# ${subject}" ];
> But is it also possible for the body?

That would require this feature:

Unfortunately, it is currently not implemented. I am currently doing
some groundwork for that, but I have no idea when that will be done.

> If I can only pass the complete body, I
> can cut out the first x chars inside the notify-script.

That would be an option.



More information about the dovecot mailing list