You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Sergio <se...@gmail.com> on 2013/11/08 07:10:01 UTC
Rule to delete emails with empty subject.
Hi all,
I tried this rule to stop emails with an empty subject, but it didn't work:
header SUBJECT_EMPTY SUBJECT =~ /^$/i
describe SUBJECT_EMPTY EMPTY SUBJECT
score SUBJECT_EMPTY 11
Any hint on what is wrong?
Best Regards to all,
Sergio
Re: Rule to delete emails with empty subject.
Posted by RW <rw...@googlemail.com>.
On Fri, 8 Nov 2013 00:10:01 -0600
Sergio wrote:
> Hi all,
> I tried this rule to stop emails with an empty subject, but it didn't
> work:
>
> header SUBJECT_EMPTY SUBJECT =~ /^$/i
> describe SUBJECT_EMPTY EMPTY SUBJECT
> score SUBJECT_EMPTY 11
>
> Any hint on what is wrong?
I pasted this into my local.cf and it worked for me.
Re: Rule to delete emails with empty subject.
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
Please keep mailing-list threads on-list. Do not reply personally.
On Sat, 2013-11-09 at 09:02 -0600, Sergio wrote:
> Thank you for your kind answers.
>
> Well, I am using cpanel with MailScanner and added this rule to my MCP
> set of rules, that are the same as SpamAssassin, the score is because
> the way I configured MS and the rule is not working, I have sent a few
> emails with an empty subject and all the emails comes in.
SA does not block, delete or reject mail. SA classifies mail, assigning
it a score reflecting the spam level. Any action whatsoever taken based
on that score is outside the scope of SA, and done by third-party tools
in your mail processing chain -- MailScanner in your case, I believe.
Thus, mail "coming in" is not an indicator of working or not, even less
so for a single rule. In particular, mail sent by yourself via your own
server is prone to get scored low -- countering the rule's score you are
testing.
The indicator whether a rule works or not is in the X-Spam headers added
by SA. Most notably the X-Spam-Status header listing all rules hit.
Since you're using MailScanner, the headers might be different. Not a MS
user here.
That's the kind of info we need.
In addition, a raw test message might help, too, uploaded to a pastebin.
> Sorry to bother, but, If I have to add this rule directly to
> SpamAssassin where will this be added in what file/directory?
>
> I have plenty of MCP rules and all of them work as expected, this is
> the only one that I have that didn't work.
>
> Once again, thanks for you inputs.
> On Fri, Nov 8, 2013 at 4:39 PM, Karsten Bräckelmann wrote:
> > On Fri, 2013-11-08 at 00:10 -0600, Sergio wrote:
> > > I tried this rule to stop emails with an empty subject, but it didn't
> > > work:
> >
> > The rule is fine, though the score is a tiiiny bit excessive.
> >
> > You'll have to elaborate on "trying" and "doesn't work".
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: Rule to delete emails with empty subject.
Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Fri, 2013-11-08 at 00:10 -0600, Sergio wrote:
> I tried this rule to stop emails with an empty subject, but it didn't
> work:
The rule is fine, though the score is a tiiiny bit excessive.
You'll have to elaborate on "trying" and "doesn't work".
--
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}