The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers > Answers to Frequently Asked Questions > Email Antispam Techniques and Email Filtering
Google UNIX.COM


Email Antispam Techniques and Email Filtering Techniques Q&A and Procmail recipes for fighting spam.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
procmail code help Hexabah UNIX for Dummies Questions & Answers 0 08-30-2006 07:05 PM
Procmail filter luiz_fer10 UNIX for Dummies Questions & Answers 1 06-14-2002 12:33 PM
Procmail Tutorial luiz_fer10 UNIX for Dummies Questions & Answers 1 05-24-2002 08:39 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-12-2004
Registered User
 

Join Date: Feb 2004
Posts: 5
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
procmail rule

I can tell this is not a recently active formum, but here goes, "why doesn't this procmail rule block
messages with víagra or v1agra appearing in
the subject header

:0
* ^Subject:.*(víagra¦v1agra¦pénis¦prescripti0n¦Medicati0n¦M0rtgage¦Xanaxz)
{
LOG="(THE 7 DIRTY WORDS) "
:0
/dev/null
}
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-12-2004
oombera's Avatar
Have a day :|
 

Join Date: Aug 2002
Location: Cleveland, OH
Posts: 804
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
Waaaay down at the end of this procmail tutorial is a section called "Permanently deleting mail".

Not sure if this'll work for you or not, but their suggestion is:
Code:
:0:
* ^Subject:.*(word1¦word2¦word3) /dev/null
They do something similar in the University of California at Berkeley's Procmail Tutorial
Code:
######
# Rule 1: discard all mail send from SPAMSITE.COM or 
# with ADV in the subject
######
:0
* ^From:.*SPAMSITE.COM
* ^Subject:.* ADV.*
/dev/null
I'm not able to test any of this, so I don't know why your code isn't working correctly... maybe the braces? Maybe the second :0 ?

Last edited by oombera; 02-12-2004 at 07:02 PM.
Reply With Quote
  #3 (permalink)  
Old 02-12-2004
Registered User
 

Join Date: Feb 2004
Posts: 5
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
[rephrased question: how do you filter 8-bit characters in the subject header via procmail?

It cooks on the í which I believe to be an extended ASCII 161
Note that is an 8-bit character.

This rule breaks on a message with Subject: víagra

:0
* ^Subject:.*(víagra¦v1agra¦pénis¦prescripti0n¦Medicati0n¦M0rtgage¦Xanaxz)
{
LOG="(THE 7 DIRTY WORDS) "
:0
/dev/null
}

[procmailLOG] --note the Subject header is garbage.
From jones@justjones.edu Thu Feb 12 21:10:19 2004
Subject: =?ISO-8859-1?Q?Fwd:_v=EDagra?=
Folder: /var/spool/mail/jones

This rule works [7-bit ASCII only] with Subject: v1agra

:0
* ^Subject:.*(v1agra¦prescripti0n¦Medicati0n¦M0rtgage¦Xanaxz)
{
LOG="(THE 7 DIRTY WORDS --) "
:0
/dev/null
}

[procmailLOG]
(THE 7 DIRTY WORDS) From jones@justjones.edu Thu Feb 12 21:03:30 2004
Subject: Fwd: v1agra
Folder: /dev/null

for the record, the word has to be spelled wrong to get on my
7 dirty words list note the zeros insted of O's in prescript0n
reference George Carlin, 1970's, "The 7 Dirty Words"
v\íagra doesn't work either.
Reply With Quote
  #4 (permalink)  
Old 02-13-2004
flim flam flamma jamma
 

Join Date: May 2001
Location: Chicago IL, USA
Posts: 1,006
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
i believe it is becuase it is an extended char.

if your filter can understand octal or hex you might have a better chance.

or if you can define a new char encodeing for proc mail then you will be set.
Reply With Quote
  #5 (permalink)  
Old 02-13-2004
Registered User
 

Join Date: Feb 2004
Posts: 5
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit! Stumble this Post!Spurl this Post!
This one works. Apparently that character "í" was an extended ASCII 237 0xED This is procmail-3.22-5

:0
* ^Subject:.*(v=EDagra|v=ECagra|v1agra|V\*iagra|V1\@gra|Prescripti0n¦M0rtgage)
{
LOG="(THE 7 DIRTY WORDS) "
:0
/dev/null
}
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes


The 50 most popular UNIX and Linux searches.
Google Search Cloud for The UNIX and Linux Forums
421 service not available, remote server has closed connection ^m automate ftp autosys awk trim bash eval bash for loop boot: cannot open kernel/sparcv9/unix command copy/move folder in unix curses.h cut command in unix daemon process export command in unix find grep find mtime find null character in a unix file glance unix grep multiple lines grep or grep recursive inaddr_any inappropriate ioctl for device lynx javascript mailx attachment mget mtime perl array length ping port remove first character from string in k shell replace space by comma , perl script scp recursive segmentation fault(coredump) sftp script snoop unix stale nfs file handle syn_sent tar exclude tar extract to folder test: argument expected unix unix .profile unix forum unix forums unix internals unix interview questions unix mtime unix simulator unix.com vi substitute while loop within while loop shell script


All times are GMT -7. The time now is 12:40 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101