procmail
[Top] [All Lists]

Re: [procmail] [SAtalk] spamc & procmail -- SOLUTION

2002-04-03 11:15:56

I started this thread a while back and now I have a solution.
Briefly, I installed spamassassin at home on my Linux (Mandrake
8.0) box, where it's the mailserver and I'm the sysadmin.  It was
quite easy to get running and does a beautiful job in cooperation
with procmail running a site-wide (my wife and I) spam-filter.

I had great difficulty getting spamassassin to cooperate
with procmail at work on a Solaris (2.8) machine where I'm
a non-privileged user.  One complicating factor is that the
mailserver machine only has login shells for a few admin
accounts.  This means I can't run spamd on the mail server.  So,
I can't run spamc in a procmail recipe.  Rather, I *must* run
the spamassassin Perl script.  This didn't work for me at first.
Eventually I reallized that the #!/blah/blah/perl line in the
script was pointing at a version of perl compiled for Solaris
2.8.  But, the mailserver is Solaris 2.5 and doesn't have the
same libraries which keeps the required shared objects from
loading.  The solution for this was to point the perl version to
a #!/auto/os/version/aware/perl version of perl.  Then there was
the matter that the spamassassin perl modules live in my account
space.  I needed to add these lines to the spamassassin script:

use lib "/full/nfs/path/to/spam/assassin/modules/lib/perl5/site_perl/5.6.1";
use lib 
"/full/nfs/path/to/spam/assassin/modules/lib/perl5/site_perl/5.6.1/sparc-solaris";

Once I did that spamassassin with procmail started trapping spam
for me at work just as well as it does at home.  For reference,
here's my procmailrc file:

    MAILDIR=/home/kevinc/Mail
    LOGFILE=/home/kevinc/var/log/procmail

    # Search for and mark spam
    :0fw
    | /home/kevinc/bin/spamassassin -P

    # File the spam.
    :0:
    * ^X-Spam-Status: Yes
    spam/.

    # Put all good mail in local spool
    :0:
    spool


A number of people on both the SAtalk and procmail email lists gave 
me suggestions of things to try which improved my understanding and 
debugging abilities for this problem.  This enabled me to solve my 
own problem and I thank everyone who helped.

Cheers....





_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>