View previous topic :: View next topic |
Author |
Message |
r0dzilla n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/15856034733f2299234ebae.gif)
Joined: 06 Feb 2003 Posts: 70 Location: South Carolina, USA
|
Posted: Wed Mar 16, 2005 12:06 am Post subject: Problems with procmail... |
|
|
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 :wink:](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
papal_authority Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/101649746447a8e5f5d66a5.png)
Joined: 31 Mar 2004 Posts: 1823 Location: Canada
|
Posted: Wed Mar 16, 2005 4:04 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
gentsquash l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 03 Nov 2004 Posts: 753 Location: Still a Gentoo beginner.
|
Posted: Wed Mar 16, 2005 4:39 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
r0dzilla n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/15856034733f2299234ebae.gif)
Joined: 06 Feb 2003 Posts: 70 Location: South Carolina, USA
|
Posted: Wed Mar 23, 2005 11:36 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|