spamassassin is consistantly dying root@minimon Mail-SpamAssassin-2.60 # ./spamassassin </home/ee0mdc/Mail/inbox/7126 Can't use an undefined value as an ARRAY reference at lib/Mail/SpamAssassin/Dns.pm line 303. Will poke around a bit more, but people who know the code might find the bug faster..
If I attempt to parse the same mail repeatedly it does eventually succeed. Below is the output of spamassassin in debug mode. My DNS is occasionally a little sluggish, and the effect seems the most prominant with long lists of headers... root@minimon Mail-SpamAssassin-2.60 # spamassassin -D </home/ee0mdc/Mail/inbox/SRA\ Chat/10 debug: Score set 0 chosen. debug: running in taint mode? no debug: using "/usr/share/spamassassin" for default rules dir debug: using "/etc/mail/spamassassin" for site rules dir debug: using "/root/.spamassassin" for user state dir debug: using "/root/.spamassassin/user_prefs" for user prefs file debug: using "/root/.spamassassin" for user state dir debug: bayes: 15450 tie-ing to DB file R/O /root/.spamassassin/bayes_toks debug: bayes: 15450 tie-ing to DB file R/O /root/.spamassassin/bayes_seen debug: bayes: found bayes db version 2 debug: bayes: Not available for scanning, only 0 spam(s) in Bayes DB < 200 debug: bayes: 15450 untie-ing debug: bayes: 15450 untie-ing db_toks debug: bayes: 15450 untie-ing db_seen debug: Score set 1 chosen. debug: Initialising learner debug: using "/root/.spamassassin" for user state dir debug: bayes: 15450 tie-ing to DB file R/O /root/.spamassassin/bayes_toks debug: bayes: 15450 tie-ing to DB file R/O /root/.spamassassin/bayes_seen debug: bayes: found bayes db version 2 debug: bayes: Not available for scanning, only 0 spam(s) in Bayes DB < 200 debug: bayes: 15450 untie-ing debug: bayes: 15450 untie-ing db_toks debug: bayes: 15450 untie-ing db_seen debug: is Net::DNS::Resolver available? yes debug: trying (3) amazon.de... debug: looking up MX for 'amazon.de' debug: MX for 'amazon.de' exists? 1 debug: MX lookup of amazon.de succeeded => Dns available (set dns_available to hardcode) debug: is DNS available? 1 debug: looking up PTR record for '137.205.210.18' debug: PTR for '137.205.210.18': 'raw.sunion.warwick.ac.uk' debug: received-header: parsed as [ ip=137.205.210.18 rdns=raw.sunion.warwick.ac.uk helo=raw.sunion.warwick.ac.uk by=imailg2.svr.pol.co.uk ident= ] debug: received-header: parsed as [ ip=139.184.14.19 rdns=rinka.central.susx.ac.uk helo=rinka.central.susx.ac.uk by=raw.sunion.warwick.ac.uk ident= ] debug: received-header: parsed as [ ip=139.184.176.67 rdns=cs802172.central.susx.ac.uk helo=cs802172.central.susx.ac.uk by=rinka.central.susx.ac.uk ident= ] debug: received-header: 'by' imailg2.svr.pol.co.uk has public IP 195.92.195.182 debug: received-header: relay 137.205.210.18 trusted? no debug: received-header: relay 139.184.14.19 trusted? no debug: received-header: relay 139.184.176.67 trusted? no debug: all '*From' addrs: ktn20@sussex.ac.uk sra-chat-admin@studentradio.org.uk debug: running header regexp tests; score so far=0 debug: running body-text per-line regexp tests; score so far=0.869 debug: Razor2 is not available debug: running raw-body-text per-line regexp tests; score so far=0.869 debug: running uri tests; score so far=0.869 debug: uri tests: Done uriRE debug: running full-text regexp tests; score so far=0.869 debug: Razor2 is not available debug: Current PATH is: /sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin debug: Pyzor is not available: pyzor not found debug: DCCifd is not available: no r/w dccifd socket found. debug: DCC is not available: no executable dccproc found. debug: all '*To' addrs: sra-chat@studentradio.org.uk sra-chat@nslm.fsnet.co.uk debug: DNS MX records found: 1 debug: forged-HELO: from=warwick.ac.uk helo=warwick.ac.uk by=pol.co.uk debug: forged-HELO: from=susx.ac.uk helo=susx.ac.uk by=warwick.ac.uk debug: forged-HELO: from=susx.ac.uk helo=susx.ac.uk by=susx.ac.uk debug: RBL: success for 28 of 30 queries Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/vendor_perl/5.8.0/Mail/SpamAssassin/Dns.pm line 303.
Created attachment 17412 [details, diff] It does the job... Right, the attached patch does solve the problem, sort of. It would appear that some data is disappearing somewhere, the patch checks that the data is there before it tries to use it. It is possibly a kludge, but it is part of the style of coding I've been taught to use. Please note however, this is the first time I've actually tried to make a patch file, so please check that I've got it right...
Saw this problem pop up in the forums and one of the users mentioned that he submitted the bug to SpamAssassin's bugzilla. it's bug #2361 and marked as a duplicate of #2206. Judging by the comments on the bug, this problem was fixed in 2.60-rc2. I had this error on my system when in my ~/.spamassassin/user_prefs i had the line skip_rbl_checks 0 Changed the line to skip_rbl_checks 1 SpamAssassin now works as expected but without the rbl checking. I have applied the patch above, however have not yet had a chance to test.
This is fixed in SA 2.60-rc6.
is this still an issue in Mail-SpamAssassin-2.60-r1 ? I'm running it with no problems and skip_rbl_checks = 0;
should work...
Marking closed