Sieve notify variables not working with body?

Bambero bambero at gmail.com
Fri Nov 16 21:36:47 EET 2018


Thanks, now it works.
But it seems that :message string (of notify command) is limited to 255
chars.
Is there any chance to change limit to 512 ?

require ["body","enotify","variables","foreverypart","mime","extracttext"];

foreverypart
{
    if header :mime :type :is "Content-Type" "text"
    {
        extracttext :first 512 "body";
        break;
    }
}

if not header :contains "subject" "*"
{
    notify :importance "3" :message "${body}" "mailto:test at example.com";
}

On Fri, Nov 16, 2018 at 2:53 PM Stephan Bosch <stephan at rename-it.nl> wrote:

>
>
> Op 15-11-2018 om 23:54 schreef Bambero:
> > Hi,
> >
> > I want to send notification like this:
> >
> > if body :text :matches "*" {
> >            notify :importance "3"
> >                :message "[NOTIFY] ${1}"
> >                "mailto:test at example <mailto:test at example>,com";
> > }
> >
> > The notification works but the variable ${1} seems to be empty.
> >
> > But in this case:
> >
> > if header :matches "Subject" "*" {
> >            notify :importance "3"
> >                :message "[NOTIFY] ${1}"
> >                "mailto:test at example <mailto:test at example>,com";
> > }
> >
> > Everything works correct.
>
> https://tools.ietf.org/html/rfc5173#section-6
>
> Use the extracttext extension instead:
>
> https://tools.ietf.org/html/rfc5703#section-7
>
> Regards,
>
> Stephan.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20181116/18eadf29/attachment.html>


More information about the dovecot mailing list