is there a way to expresse when the header "X-Spam-Status" *do not* exist move the message to a different folder? :contains, :matches and :is are not helpful here background: the spamass-milter option -B is lacking the spamassassin headers in case of milter-rejects and via sendmail generated BCC while flagged messages contain the headers - so it would be nice to move the rejected ones to a subfolder "REJECTED" instead into the inbox -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20150330/ae4453d4/attachment.sig>
On 2015-03-30 11:25, Reindl Harald wrote:> is there a way to expresse when the header "X-Spam-Status" *do not* > exist move the message to a different folder? > > :contains, :matches and :is are not helpful here >Have you tried using the "exist" test from the sieve rfc 5.5. Test exists Usage: exists <header-names: string-list> The "exists" test is true if the headers listed in the header-names argument exist within the message. All of the headers must exist or the test is false. The following example throws out mail that doesn't have a From header and a Date header. Example: if not exists ["From","Date"] { discard; } https://tools.ietf.org/html/rfc5228#page-28 i have not tried it myself but the core of rfc 5228 is reported to be fully support by pigeonhole regards - christian
Am 30.03.2015 um 11:41 schrieb Christian Kivalo:> On 2015-03-30 11:25, Reindl Harald wrote: >> is there a way to expresse when the header "X-Spam-Status" *do not* >> exist move the message to a different folder? >> >> :contains, :matches and :is are not helpful here >> > > Have you tried using the "exist" test from the sieve rfcindeed - that works - thanks! require ["fileinto"]; if not exists ["X-Spam-Status"] { fileinto "REJECTED"; } else { keep; }> 5.5. Test exists > > > Usage: exists <header-names: string-list> > > The "exists" test is true if the headers listed in the header-names > argument exist within the message. All of the headers must exist or > the test is false. > > The following example throws out mail that doesn't have a From header > and a Date header. > > Example: if not exists ["From","Date"] { > discard; > } > > https://tools.ietf.org/html/rfc5228#page-28 > > i have not tried it myself but the core of rfc 5228 is reported to be > fully support by pigeonhole-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: <http://dovecot.org/pipermail/dovecot/attachments/20150330/28e673be/attachment-0001.sig>
Apparently Analagous Threads
- sieve rule for "header don't exist"
- broken mailing-list -> Re: Accentuated characters issue when receiving attributes from "samba user syncpasswords"
- which DNS backend ?
- broken mailing-list -> Re: Accentuated characters issue when receiving attributes from "samba user syncpasswords"
- Dovecot Oy merger with Open-Xchange AG