Am 21.04.2013 15:38, schrieb Stephan Bosch:
/Return-path: <sender@example.com> *Envelope-to: test@example.com* if header :matches ["Envelope-to"] ["test@example.com"] {} would make more sense
Although the above will work, it does not mean that the approach Iliusha has chosen is wrong. Be sure you know the Sieve specification before you comment:
i comment not based on how things SHOULD be in theory i GENERALLY comment with working examples how they ARE from the real world
In fact, that is normally the cleanest method to access the actual message envelope. Depending on the setup, those envelope headers may or may not represent the correct information. They usually do, if they exist, but still.
Also, why do you use ':matches' in your example? :)
because the "contains" from the OP has the same intention?
because it is from a well working sieve-script for subject-matching with some hundret entries to protect postmaster-address from most spam while go with the RFC that postmaster must not be spam-filtered at the MX
if header :matches ["Subject"] ["*please your woman*","*see sexy*"]{discard;}
goes well with the RFC as example and leaves me in peace at the same time :-)