Getting cyrus imapd + procmail + spamassassin to work

From: Can (no_at_spam.net)
Date: 06/25/04


Date: Fri, 25 Jun 2004 13:08:43 GMT

Hi,

I've got a Fedora Core 2 system which doesn't seem to bother about my
procmailrc.

I guess that's why spam doesn't get marked correctly - I still haven't found
the solution as to why, spam gets ignored, as if there was no procmailrc
present...

The /etc/procmailrc file contains the following:

DROPPRIVS=yes
VERBOSE=on
LOGFILE=/var/log/procmail
# send mail through spamassassin
:0fw
| /usr/local/bin/procmail-cyrus-delivery.sh $LOGNAME
# | /usr/bin/spamc

The procmail-cyrus-delivery.sh script only consists of:

#!/bin/sh
LOGNAME=$1
formail -I"From " | spamc -u $LOGNAME | /usr/lib/cyrus-imapd/deliver -a
$LOGNAME -m user.$LOGNAME

And this is my whole sendmail.cf:

divert(-1)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for Red Hat Linux')dnl
OSTYPE(`linux')dnl
define(`confDEF_USER_ID',``8:12'')dnl
define(`confTO_CONNECT', `1m')dnl
define(`confTRY_NULL_MX_LIST',true)dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl
define(`ALIAS_FILE', `/etc/aliases')dnl
define(`STATUS_FILE', `/var/log/mail/statistics')dnl
define(`UUCP_MAILER_MAX', `2000000')dnl
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confAUTH_OPTIONS', `A')dnl
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN
PLAIN')dnl
define(`CERT_DIR',`/etc/mail/certs')
define(`confCACERT_PATH',`CERT_DIR')
define(`confCACERT',`CERT_DIR/cacert.pem')
define(`confSERVER_CERT',`CERT_DIR/cert.pem')
define(`confSERVER_KEY',`CERT_DIR/key.pem')
define(`confCLIENT_CERT',`CERT_DIR/cert.pem')
define(`confCLIENT_KEY',`CERT_DIR/key.pem')
define(`confTO_IDENT', `0')dnl
FEATURE(`dnsbl', `relays.ordb.org', `"550 Email rejected due to sending
server misconfiguration - see http://www.ordb.org/faq/\#why_rejected"')dnl
FEATURE(`dnsbl', `bl.spamcop.net', `"450 Mail from " $`'&{client_addr} "
refused - see http://spamcop.net/bl.shtml"')
FEATURE(`dnsbl', `sbl.spamhaus.org', `Rejected - see
http://www.spamhaus.org/')dnl
FEATURE(`no_default_msa',`dnl')dnl
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(redirect)dnl
FEATURE(always_add_domain)dnl
FEATURE(use_cw_file)dnl
FEATURE(use_ct_file)dnl
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl
FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
FEATURE(`accept_unresolvable_domains')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
define(`confLOCAL_MAILER',`cyrus')dnl
MAILER(cyrus)dnl
MAILER(local)dnl
LOCAL_RULE_0
R$=N $: $#local $: $1
R$=N < @ $=w . > $: $#local $: $1
Rbb + $+ < @ $=w . > $#cyrusbb $: $1

If anyone knows about the solution to this, I'd be glad if you posted it
here.
Thanks in advance!

kind regards,
        Can Oezdemir



Relevant Pages

  • Re: Really good spam filtering (Bayesian)
    ... Let us find a better way to shield ourselves from spam. ... The MSP is ... procmail can't fit process it through any of the stanzas in the .procmailrc, ...
    (comp.os.linux.networking)
  • Re: [SLE] senmail+spamassassin
    ... Look at the raw format of a mail that has been marked as spam. ... Make sure this line is exactly as it is in .procmailrc ... See the man page for sa-learn. ... Just drop the missed spam in a mbox and run sa-learn ...
    (SuSE)
  • Re: Should I Abandon Mutt and Exim4?
    ... To my not-yet-trained-on spam folder, which already exists as a Maildir. ... No, maildir_home is fine with a .procmailrc and, indeed, for my own mail I ... into her Maildir without passing through either spamassassin or procmail ...
    (Debian-User)
  • Re: Spamming the spammers?
    ... > If all ISPs got together and declared that spam was a Bad Thing, ... I'm sure most ISPs do think that spam is a Bad Thing. ... their having clueless users with insecure or infected computers which don't ... >>Put this in your .procmailrc: ...
    (uk.comp.sys.mac)