I'm stumped as how to further debug this one. I had a working config of 
postfix/dspam running on my FreeBSD box, but it stopped processing 
successfully with dspam after a "ports" upgrade, including:

Sep 21 19:35:27 mail pkg: postfix upgraded: 2.11.3_4,1 -> 2.11.6,1
Sep 21 19:35:30 mail pkg: dspam reinstalled: 3.10.2 -> 3.10.2
Sep 21 19:35:18 mail pkg: mysql56-client upgraded: 5.6.23 -> 5.6.26
Sep 21 19:35:29 mail pkg: mysql56-server upgraded: 5.6.22 -> 5.6.26


(I've since re-built and re-installed everything, without any improvement)

The symptom is maillog output like this (empty lines added for some 
clarity):

Oct  2 08:08:29 mail postfix/smtpd[67391]: connect from 
bmx.allycomm.com[198.199.108.230]
Oct  2 08:08:29 mail postfix/smtpd[67391]: DCB003E9: 
client=bmx.allycomm.com[198.199.108.230]

Oct  2 08:08:29 mail postfix/cleanup[67396]: DCB003E9: 
message-id=<73de1de0-f53d-4087-a2f4-03e06b3e4...@wagsky.com>

Oct  2 08:08:29 mail postfix/qmgr[3969]: DCB003E9: 
from=<-----@wagsky.com>, size=1241, nrcpt=1 (queue active)

Oct  2 08:08:29 mail dspam[65984]: bailing on error -2
Oct  2 08:08:29 mail dspam[65984]: received invalid result (!DSR_ISSPAM 
&& !DSR_ISINNOCENT): -2
Oct  2 08:08:29 mail dspam[65984]: process_message returned error -5.  
delivering.

Oct  2 08:08:29 mail postfix/reinject/smtpd[67398]: connect from 
localhost[127.0.0.1]
Oct  2 08:08:29 mail postfix/smtpd[67391]: disconnect from 
bmx.allycomm.com[198.199.108.230]
Oct  2 08:08:30 mail postfix/reinject/smtpd[67398]: 3D65E3EA: 
client=localhost[127.0.0.1]
Oct  2 08:08:30 mail postfix/cleanup[67396]: 3D65E3EA: 
message-id=<73de1de0-f53d-4087-a2f4-03e06b3e4...@wagsky.com>

Oct  2 08:08:30 mail postfix/qmgr[3969]: 3D65E3EA: 
from=<------@wagsky.com>, size=1411, nrcpt=1 (queue active)
Oct  2 08:08:30 mail postfix/reinject/smtpd[67398]: disconnect from 
localhost[127.0.0.1]
Oct  2 08:08:30 mail postfix/lmtp[67397]: DCB003E9: 
to=<-----@wagsky.com>, relay=mail.pn.wagsky.com[dspam/dspam.sock], 
delay=0.68, delays=0.04/0/0/0.64, dsn=2.6.0, status=sent (250 2.6.0 
<-----@wagsky.com> Message accepted for delivery)
Oct  2 08:08:30 mail postfix/qmgr[3969]: DCB003E9: removed
Oct  2 08:08:30 mail procmail/-----[67581]: Delivered to 
/home/------/Maildir/new/1443798510.67502_0.mail.pn.wagsky.com
Oct  2 08:08:30 mail postfix/local[67399]: 3D65E3EA: 
to=<-----@wagsky.com>, orig_to=<------@wagsky.com>, relay=local, 
delay=0.53, delays=0.33/0/0/0.2, dsn=2.0.0, status=sent (delivered to 
command: /usr/local/bin/procmail -a "$EXTENSION" -a 
"$ORIGINAL_RECIPIENT" DEFAULT=${HOME}/Maildir/ MAILDIR=${HOME}/Maildir)

It looks to me as though postfix is able to hand off the message to 
dspam, and that dspam can reinject it into the postfix processing (as 
before the upgrade).


I could use some help in trying to determine how to get dspam to once 
again process the messages it is handed by Postfix.




Postfix is configured to "advanced filter" the messages through dspam,
based on <http://www.postfix.org/FILTER_README.html>
with

postfix/master.cf:

# Implement "advanced content filter" filter output by appending
    -o content_filter=lmtp:unix:dspam/dspam.sock
    -o receive_override_options=no_address_mappings
# Implement "advanced content filter" filter input
# localhost:10025 inet  n       n       n       -       10 spawn
#         user=filter argv=/path/to/filter localhost 24
# Implement "advanced content filter" filter re-injection
localhost:24 inet  n    -       n       -       10      smtpd
   -o syslog_name=postfix/reinject
   -o content_filter=
   -o 
receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_milters
   -o smtpd_helo_restrictions=
   -o smtpd_client_restrictions=
   -o smtpd_sender_restrictions=
   # Postfix 2.10 and later: specify empty smtpd_relay_restrictions.
   -o smtpd_relay_restrictions=
   -o smtpd_recipient_restrictions=permit_mynetworks,reject
   -o mynetworks=127.0.0.0/8
   -o smtpd_authorized_xforward_hosts=127.0.0.0/8


The socket is there, with what I would assume are the same permissions 
as before:

# ls -l /var/spool/postfix/dspam/
total 1
srwxrwxrwx  1 root     dspam  0 Oct  2 07:20 dspam.sock
srw-rw-rw-  1 postfix  dspam  0 Feb 14  2015 reinject.sock


The dspam user and dspam group are present in /etc/passwd and /etc/group


dspam is running as a daemon


I can process a single message manually:

# cat ~-----/Maildir/cur/<some message ID>:2,S | dspam --debug --user -----

and see the result in /var/log/dspam/dspam.debug

# tail dspam.debug
66494: [10/02/2015 07:29:40] Graham-Bayesian Probability: 0.002278 
Samples: 15
66494: [10/02/2015 07:29:40] Burton-Bayesian Probability: 0.000018 
Samples: 27
66494: [10/02/2015 07:29:40] no factors specified; using default
66494: [10/02/2015 07:29:40] Result Confidence: 1.00
66494: [10/02/2015 07:29:40] Control: [10 10] [10 11] Delta: [0 1]
66494: [10/02/2015 07:29:40] total processing time: 0.39067s
66494: [10/02/2015 07:29:40] saving signature as 
1001,560e94d4664944297915392
66494: [10/02/2015 07:29:40] libdspam returned probability of 0.002278
66494: [10/02/2015 07:29:40] message result: NOT SPAM
66494: [10/02/2015 07:29:40] DSPAM Instance Shutdown.  Exit Code: 0


I've got some old notes about "received invalid result (!DSR_ISSPAM && 
!DSR_ISINNOCENT): -2" happening with the --user parameter was a 
fully-qualified mail address, not the local user.

I've checked and the mysql server is running and responds to interactive 
queries. That calling dspam directly "works" suggests to me that the 
database and access to the database is still functioning properly.

I don't see anything added in /var/log/dspam/dspam.debug coming from 
running the daemon with the --debug option, nor anything "new" in either 
/var/log/messages, or /var/log/maillog



I'm out of ideas at this point and am hoping for some suggestions as how 
to proceed to resolve this.

TIA,

Jeff


----
Stuff I searched on that may help someone else find this thread:

received invalid result (!DSR_ISSPAM && !DSR_ISINNOCENT): -2

bailing on error -2


------------------------------------------------------------------------------
_______________________________________________
Dspam-user mailing list
Dspam-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-user

Reply via email to