> > Dec 10 09:39:42 mail1 dspam[1724]: query error: Column 'uid' 
> cannot be null: see sql.errors for more details
> 
> Have you tried to follow the advice to check sql.errors?

Yes, that's how I know it is trying to create a userid for train-ham.

[12/10/2007 09:39:42] 1724: Column 'uid' cannot be null: insert into 
dspam_virtual_uids (uid, username) values(NULL, 
'[EMAIL PROTECTED]')
[12/10/2007 09:39:42] 1724: Column 'uid' cannot be null: insert into 
dspam_virtual_uids (uid, username) values(NULL, 
'[EMAIL PROTECTED]')
 

> First of all, I've never used postfix, so I may be wrong, but these log
> messages suggest to me that postfix delivers the message twice, once
> using the train-ham transport and once again using the normal spamcheck
> transport.  Just an idea.

Hmm....you're right. The following seems to indicate that postfix is 
getting
the message back from dspam.

Dec 10 09:39:47 mail1 postfix/smtpd[16540]: connect from 
localhost[127.0.0.1]
Dec 10 09:39:48 mail1 postfix/smtpd[16540]: 56DEE1FC6A4: 
client=localhost[127.0.0.1]
Dec 10 09:39:48 mail1 postfix/cleanup[22357]: 56DEE1FC6A4:
message-id=<[EMAIL PROTECTED]>
Dec 10 09:39:48 mail1 postfix/qmgr[10091]: 56DEE1FC6A4: 
from=<[EMAIL PROTECTED]>,
size=805, nrcpt=1 (queue active)
Dec 10 09:39:48 mail1 postfix/smtpd[16540]: disconnect from 
localhost[127.0.0.1]
Dec 10 09:39:48 mail1 postfix/lmtp[27911]: 98AD01FC6A3: 
to=<[EMAIL PROTECTED]>,
relay=mail1.ameripeds.com[/tmp/dspam.sock], delay=6.9, delays=0.64/0
/0/6.3, dsn=2.6.0, status=sent (250 2.6.0 <[EMAIL PROTECTED]> 
Message
accepted for delivery)
Dec 10 09:39:48 mail1 postfix/qmgr[10091]: 98AD01FC6A3: removed

That should definitely not be happening. I'll look into this. I may have 
Postfix setup
wrong somehow. Once it processes the alias file, there shouldn't be a 
message to deliver.
 
> >
> > I'm pretty sure I read that dspam is being run as nobody when called
> > through a Postfix alias. nobody is a trusted user for dspam. 
> 
> Well, you had better make sure then.  Actually, I'm not quite sure you
> really want to run this command as nobody even if this is a trusted user
> according to dspam.conf.  After all, the user calling dspam has to have
> read access to dspam.conf and read/write access to /var/dspam/data.  The
> log messages above suggest that you have trouble with your permissions.

There may not be a choice as Postfix controls this. But I'll double-check
the nobody user id.
 
> [...]
> > Global user is a merged group in /var/dspam/group:
> >
> > globaluser:merged:*
> 
> I suppose you have made sure that globaluser has a separate uid in your
> mysql database.

Yes, it is user id 1.

Thanks for your questions. I'll look into the alias setup more.

MDL

Reply via email to