[H-GEN] SpamAssassin problem

Jason Parker-Burlingham jasonp at panix.com
Wed Jul 23 09:25:14 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

Harry Phillips <harry at tux.com.au> writes:

> Robert Brockway wrote:
>> Harry Phillips <harry at tux.com.au> writes:
>>>"Cannot open bayes_path /home/users/harry/.spamassassin/bayes R/W:
>>>File Exists"
>> Something to do with the Bayensian filter built in to SA I gather.
>> Does the file exist?  If so, does it exist all the time or only
>> during mail arrival or other times?

> No that file does not exist, but others in that dir do:
>
> bayes_msgcount bayes_seen bayes_toks user_prefs
>
> Don't know if it gets created during mail arrival, don't know enough
> about SA.

Okay, you need to learn more about it.  Here are some suggestions on
how to do that:

   1.  Download the SpamAssassin source code.  (You should do that
       anyway.)  Review it to find the code that tries to open that
       file and see how it works.
   2.  Read the manual page and/or source code to find out how to feed
       spamassassin a message on STDIN; do that a few times to get the
       hang of things and ensure you can generate the error reliably.
       Then run the process from a debugger or with the strace(1)
       command.
   3.  Whichever way you do things, you're looking for open(2) calls.
       See if these calls have O_CREAT|O_EXCL set.  Find out why the
       file already exists when the program runs.  Find out which
       error code is returned by these calls.

>>>Does anyone know what this means? Should I be concerned about it?
>> Is your mail delivering ok, and is SA still blocking mail for you?
> Yes SA is working as it should. That's why I asked if it was anything
> to be concerned about or not.

Well it certainly sounds like a misfeature of spamassassin to me.

(You realize that you're getting the syslog message because
spamassassin is sending that message to STDERR, right?)

jason, including code written to test his guess about the origin of
       this error (though I think the open(2) call is hidden inside a
       dbopen call or something)

   #include <sys/types.h>
   #include <sys/stat.h>
   #include <fcntl.h>
   
   #include <stdio.h>
   
   int main(int argc, char* argv[]) {
   	const char* filename = "existing";
   	int handle;
   	int i;
   
   	if (0 != unlink(filename))
   		perror("eexist unable to remove temporary file at startup");
   
   	for (i=0;i<2;i++) {
   		if (handle = open(filename, O_CREAT|O_EXCL) < 0) {
   			perror("eexist cannot create temporary file");
   		} else {
   			fprintf(stderr, "File creation successful!\n");
   		}
   	}
   
   	if (0 != unlink(filename))
   		perror("eexist unable to remove temporary file at exit");
   
   	exit(0);
   }
-- 
Stay up-to-date on what I'm doing lately:
                                 http://www.panix.com/~jasonp

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list