Given a message itht he headers: Subject: This is the subject: X-Foo: bar how would I do the following: 1) Add the contents of X-Foo to subject Subject: [bar] This is the subject 2) replicate the X-Foo header into X-temp X-temp: X-foo-bar -- THE PRESIDENT DID IT IS NOT AN EXCUSE Bart chalkboard Ep. AABF05
> Subject: This is the subject: > X-Foo: bar > > how would I do the following: > > 1) Add the contents of X-Foo to subject > Subject: [bar] This is the subject > > 2) replicate the X-Foo header into X-temp > X-temp: X-foo-barIs there a sieve list that might be more appropriate for sieve specific questions? -- This is to say: while it was true that they had just appeared in this particular set of dimensions, it was also true that they had been living in them all along. It is at this point that normal language gives up, and goes and has a drink. --Colour of Magic
Am 23.07.2019 um 15:40 schrieb @lbutlr via dovecot:> Given a message itht he headers: > > Subject: This is the subject: > X-Foo: bar > > how would I do the following: > > 1) Add the contents of X-Foo to subject > Subject: [bar] This is the subject > > 2) replicate the X-Foo header into X-temp > X-temp: X-foo-barI haven't tested it but try something like this: require ["fileinto", "editheader", "variables"]; if header :matches "X-Foo" "*" { set "foo" ": ${1}"; addheader "X-temp" "X-foo-${foo}"; if header :matches "Subject" "*" deleteheader "Subject"; addheader "Subject" "[${foo}] ${1}"; } } -- Alex JOST