Unable to sieve

Issue #458 closed
Former user created an issue

I am trying to use sieve filter to filter out all emails without a subject but this seems to generate an error. Does anyone know what the issue is?

I want to filter all emails without any subject.

if header :contains "subject" "" { { fileinto "Junk"; }

Comments (11)

  1. Roshan Jonah

    Unfortunately, even with that, there is no way to filter out "no subject" emails. I want to filter all emails without a subject line and put them in the junk. Any other ideas?

  2. Roshan Jonah

    Adding ending newline to email Sieve compile failed:

    Unable to parse script: script errors: line 1: syntax error, unexpected '{'

    Using - https://www.fastmail.com/cgi-bin/sievetest.pl

    Using the following headers for testing.

    Return-Path: zrahul1989@gmail.com Delivered-To: user@emailverifierapp.com Received: from mailsrv.inbox4.biz ([127.0.0.1]) by mailsrv.inbox4.biz with LMTP id KFBmDRaWxVttTAAAQDGklg for user@emailverifierapp.com; Tue, 16 Oct 2018 07:41:10 +0000 Authentication-Results: mailsrv.inbox4.biz; iprev=pass; spf=pass smtp.mailfrom=gmail.com Received-SPF: Pass (mailsrv.inbox4.biz: domain of gmail.com designates 209.85.166.195 as permitted sender) receiver=mailsrv.inbox4.biz; identity=mailfrom; client-ip=209.85.166.195; helo=mail-it1-f195.google.com; envelope-from=zrahul1989@gmail.com Received-SPF: None (mailsrv.inbox4.biz: domain of mail-it1-f195.google.com does not designate 209.85.166.195 as permitted sender) receiver=mailsrv.inbox4.biz; identity=helo; client-ip=209.85.166.195; helo=mail-it1-f195.google.com; envelope-from=zrahul1989@gmail.com Received: from mail-it1-f195.google.com (mail-it1-f195.google.com [209.85.166.195]) by mailsrv.inbox4.biz (Haraka) with ESMTPS id B30873EB-F2E3-4929-9314-83A486A11104.1 envelope-from zrahul1989@gmail.com (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 verify=FAIL); Tue, 16 Oct 2018 07:41:02 +0000 Received: by mail-it1-f195.google.com with SMTP id e74-v6so31027333ita.2 for user@emailverifierapp.com; Tue, 16 Oct 2018 00:41:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from📅message-id:subject:to; bh=XWjRyqpjB6MgQeiUSFpe8OJDwO9Lx+Yej6g9G9Hza7g=; b=dPryuJhpn11jTCYG+LIWpwk58CB3+Qu/hkDV9IdMG75DlGrNp3PHNGSJ8XysDpA58C uNIczqXyLl88CJoDmauquiejPmRgIJ9ESBIG06OhDpWRL8ClSyLgi8/UZzfHWR9JZLM6 UOFwAA/n+7Ri2e+yRkeG6zMkjj9+xw3CDKnL4L/lTzq3WI3+a/nw+1gtKxnItYIVTNFm 1Fm4ucA8gp3Fz6cjgaenkAfC2xixsvasMI2+iq3CVOUu5oRcvwBy65T3aNs67uYnavDz n2tK6F/fFxkCJ8Ulo0CsiPXdAVbdApEqS+xKgM0BNef2wbVvkTHEpn/uxI6V8SdGsK7B aHKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from📅message-id:subject:to; bh=XWjRyqpjB6MgQeiUSFpe8OJDwO9Lx+Yej6g9G9Hza7g=; b=F6yMoS2fizkBvzTiLdhby8TvXolyMIm/7fXWfrX1jLJ9f7LGlzs9/TVa0K66isqFC7 V9LtOLyQVpQ0i0HMBDR4/b+9q3hrH2ZXFbmFfZuid/oCZ9/sh0v4LWgwrBI+tiXjq2NC t60UR9Rtpa5bEyrufETswhwDxFVNyY/+nKGvGmFp957K7TFKXWtqA5GqxwQStDoXe5D6 JM1nTaF2UvIdu246JmITd6vkzHnOiGLc3j0/84O8ZCeOqWRcby4ddDVcfbrCZIXmknRF JEbGd2S/gyOUuJq6RPO0Ai0P0hs5V5o11fq0mbUhrYbki+3ywb08CHiAIO9uo2kjJtKx HHRQ== X-Gm-Message-State: ABuFfoi2GQaU1mYE1XhmXy4O9kzEM3vyzoXgzIvtOlOYqkYzljaERXxM gLjb4L1EcO3OaEIuveFnj9FJA+sjGMcz4AI0pc/l8A== X-Google-Smtp-Source: ACcGV61QvjpC7LZammIJ9CuhhMjrPw7613xP/brf2ZsSwb9NSLturFFx2XmRPhdtmX7DADOswQ8oN2sY/NpNl0WuR/w= X-Received: by 2002:a24:7ad1:: with SMTP id a200-v6mr15477325itc.55.1539675672884; Tue, 16 Oct 2018 00:41:12 -0700 (PDT) MIME-Version: 1.0 From: Rahul Z zrahul1989@gmail.com Date: Tue, 16 Oct 2018 13:11:01 +0530 Message-ID: CALSXQse-jCe38YQNHi-rSqjgumU3ea+fYxusWZWx2aTX2OFb_A@mail.gmail.com Subject: To: user@emailverifierapp.com Content-Type: multipart/alternative; boundary="0000000000008d3c2f057853adee" X-Haraka-ASN: 15169 209.85.128.0/17 X-p0f-Result: os="Linux 2.2.x-3.x" link_type="generic tunnel or VPN" distance=25 total_conn=1 X-Rspamd-Bar: / X-Rspamd-Report: R_DKIM_ALLOW(-0.2) R_SPF_ALLOW(-0.2) MIME_GOOD(-0.1) DMARC_POLICY_ALLOW(-0.25) IP_SCORE(-0.637405) UNPRECISE_RCPT_DETAIL_FROM_SPAMMY(0.5) EMPTY_SUBJECT(1) BAYES_HAM(-0.187489) X-Rspamd-Score: -0.074894 X-Haraka-Karma: score: 9, good: 1, bad: 0, connections: 1, history: 1, awards: 089,131,280,183,182,232, asn_score: 596, asn_connections: 2609, asn_good: 935, asn_bad: 339, pass:asn:history

  3. Roshan Jonah

    My whole script...

    require ["fileinto"]; require ["fileinto", "envelope"]; if header :contains "subject" "*SPAM***" { fileinto "Junk"; } if header :is "subject" "" { { fileinto "Junk"; } }

  4. Log in to comment