Hi,
I'm trying to put a simple (I think) .procmailrc file in place that gets rid of just the most obvious spam email arriving at my mailbox. (Though Outlook/Norton does a great job filtering it, that doesn't help me when I try to read mail from my phone via POP...) For now, I'll just move it to a file in my home directory (maybe later, to /dev/null, if it seems to do the trick).
However, I'm having a tough time figuring out where to put the file, or, at least, to make it do anything.
I've tried /home/myusername/.procmailrc, and /ftp/pub/myusername/.procmailrc and even /.procmailrc (because when I log in via ftp, I see that / is the current directory).
The gist of the script is:
#delete spam
:0
* ^From.*(Viagra|morestuffgoeshere)
/home/myusername/spam
#delete spam
:0
* ^Subject.*(Viagra|morestuffgoeshere)
/home/myusername/spam
Any help appreciated.
-ajw
Results 1 to 8 of 8
Thread: Where to put .procmailrc
-
04-07-2012, 09:22 AM #1Junior Member
- Join Date
- Aug 2007
- Posts
- 9
Where to put .procmailrc
-
04-07-2012, 09:57 AM #2
Hey ajw,
It sounds like you're on site manager, is that correct? There's actually a procmailrc file by default on site manager accounts in /etc/procmailrc. I would recommend adding the lines from your script to the bottom of that file.
-
04-07-2012, 10:27 AM #3
Also just in case you don't realize it, the file /etc is without the . (dot). It should have "# Added By HostDir" at the top of it.
A quick question for Nathan.... You suggested adding it to the end of the file. I know that in my procmailrc file it has the code for Spamassasin added at the bottom since I use that on the account. Would code like the above want to go before that so that it does not get funneled through SA ? I think procmail filters in the order they are in the file but I may be wrong about that.Shawn
Please remember your charity of choice: http://www.redcross.org
Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson
-
04-07-2012, 10:45 AM #4
You're probably right on that, I don't have too much experience modifying procmailrc files. So it may be best to add those lines somewhere earlier in the file.
-
04-07-2012, 12:40 PM #5Junior Member
- Join Date
- Aug 2007
- Posts
- 9
Thanks for your help.
That seems to have done the trick... (I think I might have gotten one of the other locations working, too, but now have backed those out and only have changes in the /etc/procmailrc file.)
Hopefully avoiding at least 1/2 of the zillions of bogus emails that arrive,
-ajw
-
04-07-2012, 04:09 PM #6
You might also want to have a look at this article in the new KB. http://kb.westhost.com/questions/788/SPAM+Protection One thing mentioned in that article is Dynamic Spam Rejection with RBLs which is something you can install via Site Manager. It has done a good job for me of keeping a lot of the junk out.
Shawn
Please remember your charity of choice: http://www.redcross.org
Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson
-
04-07-2012, 05:50 PM #7Junior Member
- Join Date
- Aug 2007
- Posts
- 9
Hi Shawn,
I used to have RBL stuff enabled but it always ended up causing more problems than it was worth by blocking a lot of legitimate mail. I've tried configuring it in various ways but in the end I found I was missing some important mailing list mail that was blocked because the sender was on a shared host with other senders that must have been compromised or otherwise sending spam.
Thanks,
-ajw
-
04-07-2012, 08:25 PM #8
Yeah that can be a drawback of RBL. Kind of hard to balance some times.
Shawn
Please remember your charity of choice: http://www.redcross.org
Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson
Reply With Quote