Colin,

Sorry for delay, I hope you were able to resolve the problem by now.

> It seems that Amavis gives up at the 'CALLING SA check' stage, and skips
> to the final part to save and destroy the process in hand.

Indeed, so it seems. Apparently something sinister happens during
a SpamAssassin call that could only be trapped at the outermost
level of eval trappings.

> Does anyone have any advice how I can trace this issue further - is
> Amavis looking for a connection to a Spamassassin child and can't find one?

No, there is no separate Spamassassin child in a sense of spamd,
if that is what you had in mind. The amavisd child process calls
Spamassassin code in its own context (unless you have $sa_spawned=1).

> For an email that fails to process this is the end of the log
> 
> Jul  5 16:56:42 vps10521 amavis[9651]: (09651-01) SpamControl: calling
> spam scanner
> Jul  5 16:56:42 vps10521 amavis[9651]: (09651-01) spam_scan: DSPAM not
> available, skipping it
> Jul  5 16:56:42 vps10521 amavis[9651]: (09651-01) timer set to 800 s for
> SA (was 1200 s)
> Jul  5 16:56:42 vps10521 amavis[9651]: (09651-01) calling SA parse, SA
> version 3.2.5, 3.002005, data as GLOB
> Jul  5 16:56:42 vps10521 amavis[9651]: (09651-01) CALLING SA check
> Jul  5 16:56:43 vps10521 amavis[9651]: (09651-01) child_finish_hook:
> invoking DESTROY methods
> Jul  5 16:56:43 vps10521 amavis[9651]: (09651-01) Amavis::Cache DESTROY
> called
> Jul  5 16:56:43 vps10521 amavis[9651]: (09651-01) Amavis::DB::SNMP
> DESTROY called
> Jul  5 16:56:43 vps10521 amavis[9651]: (09651-01) ESMTP> 421 4.3.2
> Service shutting down, closing channel
> Jul  5 16:56:43 vps10521 amavis[9651]: (09651-01) switch_to_client_time
> 480 s, smtp response sent
> Jul  5 16:56:43 vps10521 amavis[9651]: (09651-01) Amavis::TempDir
> DESTROY called
> Jul  5 16:56:43 vps10521 amavis[9651]: (09651-01) (!)TempDir removal:
> tempdir is to be PRESERVED: /var/amavis/tmp/amavis-20100705T165642-09651
> 
> for an email that is ok:
> 
> Jul  5 16:38:37 vps10521 amavis[8072]: (08072-09) SpamControl: calling
> spam scanner
> Jul  5 16:38:37 vps10521 amavis[8072]: (08072-09) spam_scan: DSPAM not
> available, skipping it
> Jul  5 16:38:37 vps10521 amavis[8072]: (08072-09) timer set to 800 s for
> SA (was 1200 s)
> Jul  5 16:38:37 vps10521 amavis[8072]: (08072-09) calling SA parse, SA
> version 3.2.5, 3.002005, data as GLOB
> Jul  5 16:38:37 vps10521 amavis[8072]: (08072-09) CALLING SA check
> Jul  5 16:38:38 vps10521 amavis[8072]: (08072-09) prolong_timer
> spam_scan_sa_finish: timer set to 1199 s
> Jul  5 16:38:38 vps10521 amavis[8072]: (08072-09) spam_scan:
> score=-0.528 autolearn=no
> tests=[ALL_TRUSTED=-1.44,AWL=-0.608,HTML_IMAGE_ONLY_28=1.519,HTML_MESSAGE=0
> .001] Jul  5 16:38:38 vps10521 amavis[8072]: (08072-09) prolong_timer
> spam_scan: remaining time = 1199 s
> Jul  5 16:38:38 vps10521 amavis[8072]: (08072-09) enqueue: stat is not
> numeric: ""
> Jul  5 16:38:38 vps10521 amavis[8072]: (08072-09) enqueue: deleting:
> 132ab45ab78ee0097460be46dd0cce10
> Jul  5 16:38:38 vps10521 amavis[8072]: (08072-09) enqueue: stat is not
> numeric: ""
> Jul  5 16:38:38 vps10521 amavis[8072]: (08072-09) lookup: (scalar)
> matches, result="-999"

> > Sometimes they clear out after a while, but sometimes the only way to
> > process them is via an Amavis restart or postqueue -f

Perhaps turning on SpamAssassin debugging ($sa_debug=1) can narrow down
the culprit code section. Even better is to run (temporarily) the
amavisd process non-daemonized and capture its stderr to a file,
hoping to catch it in the act and analyze it later. This way one
would see even non-perl logged problems (perhaps associated with
some system calls or memory allocations):

  # amavisd debug-sa >tmp.log 2>&1


Mark

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 Please visit http://www.ijs.si/software/amavisd/ regularly
 For administrativa requests please send email to rainer at openantivirus dot 
org

Reply via email to