List Info

Thread: Re: FW: maia_mail keeps growin




Re: FW: maia_mail keeps growin
country flaguser name
Netherlands
2007-06-29 19:17:12
Following up on all your 3 mails:

first one.

I checked and double checked the permissions on the db user.
if I delete 
a row by giving  a query like this:

delete from maia_mail_recipient where mail_id=xxx and
type='C' and 
recipient_id=xx it will delete the row, thus the user has
sufficient 
priveleges. I also put that in one of the previous mails to
indicate.

The database table might be corrupt. ill try to export ->
delete -> 
create -> import tomorrow its a bit late right now to try
something like 
that ;) (2am)

Second one,

As I already said above, the amavis user has sufficient
rights. and it 
doesn't contradict what I said in previous posts. when I do
a delete and 
only give mail_id (thus trying to delete all mails with
mail_id=xxx) it 
failed. if I give mail_id & type it failed, if I give a
query like 
above. it works.

*to note, im now at the point the table is 'nearly' empty
only a few 
thousand records left and the statement where I only give a
mail_id + a 
limit 1 or 2 (to keep at least 1 record so the mail attached
to it will 
be deleted as well) it works right now. the second statement
still fails.

Third one,

Tried the select statement you mentioned. but these are
actually very 
old mails (up to months ago) that just got stuck because it
couldnt 
delete them. so im thinking this 'error' might have been in
my DB since 
the start. the select statement only gives type C records.

What it does seem like, the delete statement works from the
perl script. 
if there is a SINGLE entry in the maia_mail_recipients it
will delete 
both that record and the maia_mail record connected to it (+
some other 
table records), the problem seems to be when there are
multiple records 
in maia_mail_recipients which have the same mail_id and
type. if I 
manually delete the records up to keeping only 1 entry for
that mail ID, 
the script will do the rest of the cleaning up.

in other words, its kind of weird the query works for a
single record, 
but fails on multiple records. If I try to reproduce this in
the mysql 
command line client I get the same result. so i am
suspecting mysql here 
and will recreate that table.

Kind regards,

Michiel




>   
>> What seems wrong, though, is that in this example
both of these items
>> have apparently been confirmed (type 'C'), which
means that all of the
>> recipients /have/ expressed their opinion of the
mail item.  In that
>> case, the item should have been deleted.
>>     
>
> Just to follow up on this, are you sure there are no
other rows with
> that mail ID but with types other than 'C'?  You showed
two rows for
> item 3320, both with type 'C', but perhaps that was
because of the query
> you were using.  Try not selecting on the mail type,
e.g.
>
>  SELECT * FROM maia_mail_recipients WHERE mail_id =
3320;
>
> If you see additional rows with types other than 'C'
(confirmed spam) or
> 'G' (confirmed ham), that would explain why
process-quarantine is not
> deleting the item.  If it sees that some recipients
still haven't judged
> the item yet (i.e. it is type 'S' (suspected spam) or
'H' (suspected
> ham)), then it retains the item.
>
> If that turns out to be the case, also take a look at
the mail item
> itself to verify the number of recipients (in the
maia_mail.envelope_to
> column).  Does the number of recipients match the
number of rows in the
> earlier query?
>   

_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

Re: FW: maia_mail keeps growin
country flaguser name
Canada
2007-06-29 23:52:38
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michiel van den Berg wrote:

> As I already said above, the amavis user has sufficient
rights. and it 
> doesn't contradict what I said in previous posts. when
I do a delete and 
> only give mail_id (thus trying to delete all mails with
mail_id=xxx) it 
> failed. if I give mail_id & type it failed, if I
give a query like 
> above. it works.

If the database user definitely has DELETE privileges and
there are rows
in a table that you cannot delete manually with a query
like:

  DELETE FROM maia_mail_recipients WHERE mail_id = 1234;

then you have a corruption problem somewhere, plain and
simple.  Your
database is messed up, and it needs to be repaired before
going any further.

You should also check your MySQL error logs for more
evidence of this,
as the DELETE operations that are failing should be logging
something.
It may be that your disk is physically damaged in places and
MySQL can't
write to certain sectors anymore, so the deletions fail. 
Check the
integrity of your filesystem to be sure.

- --
Robert LeBlanc <rjlrenaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGheGWGmqOER2NHewRAi7bAKCvF8yUZhR6/5VMEFz39EmXxX3FkgCe
Nynh
yXFWIFXWwahScC79Sq6J5S8=
=yPVJ
-----END PGP SIGNATURE-----
_______________________________________________
Maia-users mailing list
Maia-usersrenaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )