Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems with procmail...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
r0dzilla
n00b
n00b


Joined: 06 Feb 2003
Posts: 70
Location: South Carolina, USA

PostPosted: Wed Mar 16, 2005 12:06 am    Post subject: Problems with procmail... Reply with quote

I created some procmail rules to rack-and-stack mail comming into my inbox and also to filter out unwanted spam.

Here is my procmail config file:
Code:

#
## procmail config file to filter incomming e-mail
#

MAILDIR=$HOME/.maildir/

# send cron jobs e-mail to the "Cron Jobs" folder
:0:
* ^Subject:.Cron.*
"$MAILDIR/.Cron Jobs/"

# send mail from Amazon.com to it's own folder
:0:
* ^From:.*@amazon\.com
$MAILDIR/.Amazon/

# send mail from EB Games to it's own folder
:0:
* ^From:.*@ebgames\.com
"$MAILDIR/.EB Games/"

# send mail from Ameritrade to it's own folder
:0:
* ^From:.*@compliance.ameritradeclearing\.com
$MAILDIR/.Ameritrade/

# "viagra" junk mail will be sent to the SPAM folder
:0:
* ^Subject:.*(/iagra|/ICOD1IN|S0MA|XANAAX|CIAL11S|VI0XX|Vicodin)
$MAILDIR/.SPAM/

# software junk mail will be sent to the SPAM folder
:0:
* ^Subject:.*(PR0|AD0BE|PH0T0|0FFICE|NORT0N)
$MAILDIR/.SPAM/

# UK National Lottery Spam
:0:
* ^From:.*@uknationallottery*
$MAILDIR/.SPAM/

rodzilla@stargate rodzilla $


At the moment, the only thing that's happening is the cron jobs are being moved to their own directory and nothing else is being filtered...

It seems there is a problem with or after the cron jobs filter and it's skipping my other filters (or something like that)

Help! :wink:
Back to top
View user's profile Send private message
papal_authority
Veteran
Veteran


Joined: 31 Mar 2004
Posts: 1823
Location: Canada

PostPosted: Wed Mar 16, 2005 4:04 am    Post subject: Reply with quote

Just something I noticed quickly, why do some of your $MAILDIR destinations have double quotes around them and some don't? AFAIK the quotes aren't needed and may be causing the problem.
_________________
The free market gave me gonorrhea.
Back to top
View user's profile Send private message
gentsquash
l33t
l33t


Joined: 03 Nov 2004
Posts: 753
Location: Still a Gentoo beginner.

PostPosted: Wed Mar 16, 2005 4:39 am    Post subject: Reply with quote

I haven't played with procmail for years, but I remember it being
quite sensitive to errant characters.

I suggest testing one stanza at a time.

Also, consider searching for non-printing characters --I imagine
that the only ones you want are SPACE and the C-j for return.
Although I've forgotten the program, I once had a terrible
debugging time because the control file had a unbreakable-space in it.

You might want to do a regexp search for the complement of
printable chars plus SPACE and C-j.
_________________
Your thread resolved? Putting [SOLVED] in its title helps all Gentooers. (Button "edit" , first post)
Prof. Jonathan LF King, Mathematics dept., University of Florida
Back to top
View user's profile Send private message
r0dzilla
n00b
n00b


Joined: 06 Feb 2003
Posts: 70
Location: South Carolina, USA

PostPosted: Wed Mar 23, 2005 11:36 pm    Post subject: Reply with quote

Well, I've change my procmail config file quite a bit since my first post.

It seems that what's not filtering correctly is mailing lists, regardless of whether I'm filtering based on subject or recipient...

When filtering on subject, I can send an e-mail (from another account) with the key words it's looking for and it filters correctly, but it won't filter the mailing lists with the same key words...

I wonder if you have to do them differently?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum