Deleteheader/addheader will likely not maintain sort order, but a
replaceheader ought to (which is useful).
I agree it is complex, but I have always wanted Sieve to be a real
language (= complex) so I don't consider that a problem.
This is not a desire I share. In fact one of the original design goals of
was that it not be "a real language". If I want a real language I'll use one.
There are plenty of them around; no need to invent another.
The only standardized language, used for mail handling, which has
multi-vendor support in MUAs and MTAs, that I know of, is Sieve.
There are not plenty of them around.
I agree with you that there is no need to invent another language,
fortunately, but my reason is that I believe Sieve is being enhanced
into a complex language.