Re: procmail and SpamBayes issues

Robert Bonomi <[email protected]>
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
> Date: Tue, 16 Aug 2011 10:48:39 -0400
> Subject: procmail and SpamBayes issues
> From: Edward McKeown <[email protected]>
> To: [email protected]
>
> hello
> 
> for some reason when my email is processed with procmail and SpamBayes
> the email is lost.  I am new at this and I am not sure why. someone
> told me that my procmailRC is wrong...  I keep on getting an procmail:
> Program failure (2) of "/usr/bin/python" ERROR not sure how to correct
> this any help would be much appreciated.  I know that the file is
> where it is supose to be but for some reason it cannot be open.

What you think you know, and what the computer knows may be different.
you need to provide 'proof' -- e.g. an 'ls -l' of the *fullly-qualified*
(i.e., starting from '/') path name.

> I have included my log and also the procmail config file.

Note: you need to include the content of all the 'INCLUDERC' files, too.
One _cannot_tell_ what is going on without seeing those files.

> 
> thanks
> 
> =======
> LOG
> 
> >From [email protected]  Sun Aug 14 18:19:13 2011
>  Subject: test Sunday
>  Folder: /var/mail/edward                                                 2910
> procmail: [1818] Sun Aug 14 19:37:25 2011
> procmail: Assigning "LOGABSTRACT=all"
> procmail: Assigning "MAILDIR=/Users/edward/Mail/Dovecot"
> procmail: Assigning "SPAMBAYESDIR=/usr/local/cutedge/spambayes"
> procmail: Assigning
> "DELIVER=/usr/local/cutedge/dovecot/libexec/dovecot/deliver -c
> /usr/local/cutedge/dovecot/etc/dovecot.conf"
> procmail: Assigning "INCLUDERC=/etc/rc.custom1"
> procmail: Assigning "LASTFOLDER=cat >> /Users/edward/postbayeslog"
> >From sentto-2240464-41435-1313364858-xxx=abc.com@returns.groups.yahoo.com
>  Sun Aug 14 19:37:25 2011
>  Subject:  Re: test
>  Folder: cat >> /Users/edward/postbayeslog                               15416
> procmail: Executing "cat >> /Users/edward/postbayeslog"
> procmail: Executing "/usr/bin/python,/sb_filter.py,-f,-p,/hammiedb.pck"
> /usr/bin/python: can't open file '/sb_filter.py': [Errno 2] No such
> file or directory

Is 'sb_filter.by' _really_ in the root ('/') directory?
if so, with what permissions?

> procmail: Program failure (2) of "/usr/bin/python"

is the python executable _really_ in '/usr/bin'?
or is it maybe in  '/usr/local/bin'?

what does 'which python' show?

> procmail: Rescue of unfiltered data succeeded
> procmail: No match on "^X-SpamBayes-Classification: spam"
> procmail: Incomplete recipe

Procmail knows what it is talking about on this.  see below

> procmail: Assigning
> "PATH=/Users/edward/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11/bin"
> >From sentto-2240464-41435-1313364858-xxx=abc.com@returns.groups.yahoo.com
>  Sun Aug 14 19:37:25 2011
>  Subject: Re: test
>  Folder: /var/mail/edward                                                15416
> 
> 
> PROCMAIL RC
> 
> UMASK7
> 
> SHELL=/bin/sh
> LOGFILE=/Users/tempo/procmail.log
> VERBOSE=on
> MAILDIR=/Users/tempo/Mail/Dovecot
> SPAMBAYESDIR=/usr/local/cutedge/spambayes
> DELIVER='/usr/local/cutedge/dovecot/libexec/dovecot/deliver -c /usr/
> local/cutedge/dovecot/etc/dovecot.conf'
> 
> INCLUDERC=/usr/local/cutedge/spambayes/etc/rc.custom1
> 
> :0 fw
> | /usr/bin/python /usr/local/cutedge/spambayes/sb_filter.py -f -p /
> usr/
> local/cutedge/spambayes/hammiedb.pck

Note: it is advisable to use '\'  multi-line continuations, and/or
'variables' to reduce the length of recipe lines like the above.
> 
> :0
> * ^X-SpamBayes-Classification: spam
> {
> INCLUDERC=/usr/local/cutedge/etc/rc.sendtodevnull

For 'clairty', it is recommended you _indent_ lines within a '{' '}' block
> 
> :0
> |  -m Spam

This is a 'nonsense' recipe!

> #.Spam/
> }
> 
> INCLUDERC=/usr/local/cutedge/spambayes/etc/rc.custom2
> 
> :0 w
> |

*THIS* is an 'incomplete' recipe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.