LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 06-10-2007, 12:17 PM   #1
Intimidator
Member
 
Registered: Mar 2005
Distribution: FC4
Posts: 83

Rep: Reputation: 15
Procmailrc filtering


I am working on a user level spam filter based on bayesian approach(decidespam.py)
The program is working..but when i want to do real time filtering using
.procmailrc file.It's not working

The following is in my procmailrc file..

Code:
:0
| cat&>$HOME/guestmail && \
python $HOME/decidespam.py
what i want to do here is write each mail one at a time in to "guestmail" file and run decidespam.py on that..
In decidespam.py i am telling where the mail should get appended( mail or mbox/spam)
what could be the error?
Thanx in anticipation.

Last edited by Intimidator; 06-10-2007 at 01:41 PM.
 
Old 06-11-2007, 07:30 AM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
I don't know anything about python, so I didn't want to muddy the waters with a response, but I see that this question is more than 16 hours old, so I'll give it a shot.

Can you change your python program so it does this?

Rather than read the input from file guestmail, read the input from standard input. Write it to file guestmail within the python script itself. Also (as you presumably do already), write the mail to its intended destination (mail or mbox/spam.

Then use the usual procmailrc configuration lines:

Code:
:0w:$HOME/.lockmail
| $HOME/decidespam.py
Hope this helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
.procmailrc and BCC jayakrishnan Linux - Networking 1 03-10-2006 01:10 AM
.procmailrc jayakrishnan Linux - Networking 0 11-19-2005 02:13 AM
Procmailrc file how many do I Need ?? wylie1001 Linux - Software 2 09-07-2005 07:20 PM
procmailrc davidsrsb Slackware 3 06-15-2005 11:07 AM
Sendmail Spam filtering and Virus filtering MrJoshua Linux - General 2 04-03-2003 10:12 AM


All times are GMT -5. The time now is 06:24 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration