[Spambayes] not getting my email

Edward McKeown emckeown at gmail.com
Fri Aug 5 16:48:45 CEST 2011


When my email server get an email, if Procmail processes the email before
Spambayes does, then the email is delivered to a sub-folder on my IMAP server.
However, if it does go directly through Spambayes, then it is lost and I get the
following error message in the logs.


/usr/bin/python,/usr/local/cutedge/spambayes/sb_filter.py,-f,-p,/usr/local/cutedge/spambayes/hammiedb.pck"
Exception UnboundLocalError: "local variable 'fp' referenced before
assignment" in <bound method HammieFilter.close of
<__main__.HammieFilter object at 0x1016e90d0>> ignored

I have searched online but did not find anything that is
helpful. I think the emails are being lost because of the error.

Here is the login for Procmail:

procmail: [546] Wed Aug  3 19:15:05 2011
procmail: Assigning "MAILDIR=/Users/tempo/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=/usr/local/cutedge/spambayes/etc/rc.custom1"
procmail: Assigning "INCLUDERC=/Users/tempo/Procmail/testing.rc"
procmail: Match on "^Subject:.*test1"
procmail: Assigning "LASTFOLDER=.system/new/1312413305.546_1.BlueTuna.local"
procmail: Notified comsat:
"tempo at 0:/Users/tempo/Mail/Dovecot/.system/new/1312413305.546_1.BlueTuna.local"
>From xxx at mac.com  Wed Aug  3 19:15:05 2011
 Subject: test1
 Folder: .system/new/1312413305.546_1.BlueTuna.local                      1203

procmail: [547] Wed Aug  3 19:15:05 2011
procmail: Assigning "MAILDIR=/Users/tempo/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=/usr/local/cutedge/spambayes/etc/rc.custom1"
procmail: Assigning "INCLUDERC=/Users/tempo/Procmail/testing.rc"
procmail: No match on "^Subject:.*test1"
procmail: No match on "^Subject:.*test2"
procmail: Executing
"/usr/bin/python,/usr/local/cutedge/spambayes/sb_filter.py,-f,-p,/usr/local/cutedge/spambayes/hammiedb.pck"
Exception UnboundLocalError: "local variable 'fp' referenced before
assignment" in <bound method HammieFilter.close of
<__main__.HammieFilter object at 0x1016e90d0>> ignored
procmail: [547] Wed Aug  3 19:15:06 2011
procmail: No match on "^X-SpamBayes-Classification: spam"
procmail: Assigning "INCLUDERC=/usr/local/cutedge/spambayes/etc/rc.custom2"
procmail: Assigning "LASTFOLDER=|"
procmail: Notified comsat: "tempo@:/Users/tempo/Mail/Dovecot/|"
>From xxx at mac.com  Wed Aug  3 19:15:05 2011
 Subject: abc
 Folder: |                                                                1286


and my Configu files:

PROCMAIL CONF
===========
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

:0
* ^X-SpamBayes-Classification: spam
{
INCLUDERC=/usr/local/cutedge/etc/rc.sendtodevnull

:0
|  -m Spam
#.Spam/
}

INCLUDERC=/usr/local/cutedge/spambayes/etc/rc.custom2

:0 w
|



POSTFIX CONF

These are the active Postfix Configuration Parameters

The current Postfix version is 2.8.3

alias_database =hash:/usr/local/cutedge/postfix/etc/aliases
alias_maps =hash:/usr/local/cutedge/postfix/etc/aliases
biff =no
command_directory =/usr/sbin
config_directory =/usr/local/cutedge/postfix/etc
daemon_directory =/usr/libexec/postfix
data_directory =/Library/Server/Mail/Data/mta
debug_peer_level =2
home_mailbox =Mail/Dovecot/
html_directory =/usr/share/doc/postfix/html
inet_interfaces 2.168.123.2, 127.0.0.1, [::1]
inet_protocols =all
mail_owner =_postfix
mailbox_command =/usr/bin/procmail -a "$EXTENSION"
mailbox_size_limit =0
mailq_path =/usr/bin/mailq
manpage_directory =/usr/share/man
message_size_limit =0
mydomain = AAAA.com
mydomain_fallback =localhost
myhostname = AAAA.com
mynetworks_style =host
newaliases_path =/usr/bin/newaliases
queue_directory =/Library/Server/Mail/Data/spool
readme_directory =/usr/share/doc/postfix
relayhost = smpt.comcast.net
sample_directory =/usr/share/doc/postfix/examples
sendmail_path =/usr/sbin/sendmail
setgid_group =_postdrop
smtp_bind_address =0.0.0.0
smtp_bind_address6 =::
smtpd_sender_restrictions =check_sender_access hash:/usr/local/
cutedge/
postfix/etc/access
smtpd_tls_cert_file =/System/Library/OpenSSL/certs/testServer.crt
smtpd_tls_key_file =/System/Library/OpenSSL/private/testServer.key
smtpd_use_tls =yes
tls_random_source Þv:/dev/urandom
unknown_local_recipient_reject_code U0


More information about the SpamBayes mailing list