LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-01-2006, 11:54 AM   #1
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Rep: Reputation: 30
Procmail recipe question


I have a spam filtering solution that adds *****SPAM***** as a prefix to the subject line of any email that was detected as spam. I'm trying to get these sent over to a Trash folder using the following recipe:

Code:
VERBOSE=off
MAILDIR=~/mail # elm users might use $HOME/Mail instead
PMDIR=~/.procmail
DEFAULT=$MAILDIR/
LOGFILE=$MAILDIR/log
# INCLUDERC=$PMDIR/other.rc
# add as many INCLUDERC's as you like
# end of .procmailrc


* ^SUBJECT: \*\*\*\*\*SPAM\*\*\*\*\*
{
       :0
       $HOME/mail/.Trash/cur
}
This is putting everything in the Trash folder. What am I doing wrong here?
 
Old 05-02-2006, 10:56 AM   #2
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
A receipe begins with the ':0'. Try:

Quote:
:0
* ^SUBJECT: \*\*\*\*\*SPAM\*\*\*\*\*
.Trash/
The trailing slash on Trash/ tells procmail that this is a maildir, so the mail will actually go in $HOME/mail/.Trash/new.

You don't really need the { } in this case, since there is only one action.

Last edited by ioerror; 05-02-2006 at 10:58 AM.
 
Old 05-02-2006, 05:45 PM   #3
gauge73
Member
 
Registered: Jan 2003
Location: Dallas, TX
Distribution: Fedora Core 4
Posts: 420

Original Poster
Rep: Reputation: 30
Thanks! What does the :0 indicate? Should following recipes have incrimenting numbers like :1, then :2, etc? Also, how can these items be marked as read so they're not new in Outlook or Ximian?
 
Old 05-03-2006, 05:09 AM   #4
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Quote:
Thanks! What does the :0 indicate? Should following recipes have incrimenting numbers like :1, then :2, etc?
It is just a tag (as far as I can tell), all recipes should begin with :0 (not :1, :2 etc).

Quote:
Also, how can these items be marked as read so they're not new in Outlook or Ximian?
Not sure. I just spotted you were trying to deliver to ~/mail/.Trash/cur. That might work, since new mail goes in new and read mail goes in cur. Try changing the last line to '.Trash/cur', similar to what you had before (no trailing slash this time). I think that should work.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Three actions in a recipe of Procmail Borelian Linux - Software 1 11-11-2012 07:48 AM
Procmail/Formail recipe question Toadman Linux - Software 0 12-31-2005 11:41 PM
Procmail recipe jebix666 Linux - General 1 06-09-2005 02:43 PM
procmail recipe for charset conversion Peff Linux - Software 0 07-13-2004 03:40 AM
procmail recipe not working? theLIGHT Linux - Software 3 11-18-2002 11:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:42 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration