Filtering spam for multiple users

Posted on 2006-05-28
Last Modified: 2013-12-16
I have an RHES3 system with sendmail 8.12.11-4 and qpopper4.0.5.  I can't upgrade to the latest version of sendmail because I depend on rpm updates, and when I've tried installing the latest version of programs from source I've run into problems that are too hard to fix.  Given that my sendmail config already blocks RBL sites, my junk mail consists of mail from mostly legit-looking addresses (all of them different, so I can't block them with sendmail's access database), so I tried writing recipes/filters to block unwanted commercials in procmail, which is the school solution to this problem, along with spamassassin.  The procmail filters work for my root account, however I'm looking to block spam for all the accounts I host on my server with one set of rules, and procmail doesn't lend itself to that.  I found a page that talks about invoking a procmail ruleset directly from sendmail at, however I'm warned that any mail addressed to my server may disappear if I screw this up, so I'm looking for more advice before proceeding.

Fyi, I have a backup Debian server with Postfix on it and a mail account for a user that's aliased to root, so I could try working on that one first, but I'd have to replace Postfix with Sendmail to get a more approximate demo, and the last time I tried working with sendmail on Debian (ubuntu), there were significant differences between that version and the one I have on my Redhat system, so I'm not sure how helpful it would be.  I'd have to be careful about version numbers of course, but I was pretty sure I installed the same version on Ubuntu that I have working on my RHES.  
Question by:klukac
    LVL 16

    Expert Comment


    Have alook at this:

    I know it's Fedora core 1 but it should work fine on RHES3

    Author Comment

    Thanks very much! These instructions, however, require me to install lots of programs and packages, and the more stuff you have to install, the more things can go wrong.  Here's how far I got:
    Installed clamav (the mailscanner Quick Install instructions say to do that first).  That required me to install zlib-devel and to create a clamav user - so far, so good.
    To install mailscanner, I need a bunch of packages, and ./ says I don't have one of them, which turns out to be gcc- (instead I have compat-gcc-7.3-2.96.128).  So I tried installing gcc, which is obviously older than the compat-gcc version I have, however it won't work because gcc doesn't recognize cpp-3.2.3-54 because it's looking for cpp-3.2.2-5, an older version.  I would prefer to force mailscanner to recognize compat-gcc rather than install gcc and force it to recognize cpp-3.2.3-54, however I don't know how to do force rpms to install except with nodeps, which is a bad idea.  So what next?

    Author Comment

    I managed to get procmail do the job for me - procmail filters can be configured to support any number of users if the procmailrc file is placed in /etc, and the .forward file (which I have in /var/spool/mail) lists all the users concerned.  My current concern is with procmail recipe(s), but that's another question, so pls close this one and I'll open another.  

    Accepted Solution

    Question closed - 500 points refunded.

    Best regards,
    Experts Exchange
    Community Support Moderator

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
    The purpose of this article is to demonstrate how we can use conditional statements using Python.
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now