To administer your WestHost account, please enter your
Domain Name or Server Manager Username.

WestHost: Professional Website Hosting Company








Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Aug 2007
    Posts
    9

    Default Where to put .procmailrc

    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

  2. #2

    Default

    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.
    Nathan Collings
    Level 2 Technical Support Rep

    http://www.westhost.com/

  3. #3
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,685

    Default

    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

  4. #4

    Default

    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.
    Nathan Collings
    Level 2 Technical Support Rep

    http://www.westhost.com/

  5. #5
    Junior Member
    Join Date
    Aug 2007
    Posts
    9

    Post

    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

  6. #6
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,685

    Default

    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

  7. #7
    Junior Member
    Join Date
    Aug 2007
    Posts
    9

    Default

    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

  8. #8
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,685

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •