Am 28.07.2013 19:35, schrieb Daniel Schütze:
> I noticed dbmail_headervalue wasn’t decreasing in size and the query
> SELECT * from dbmail_headervalue where id not in (select headervalue_id from 
> dbmail_header)
> Returns a great many results, which to me implies they are orphaned.
>  
> So have I missed something, has the mechanism for clearing out the old 
> dbmail_header table changed in dbmail 3 in
> which case can someone tell me what the procedure is?  Is it safe to delete 
> anything from dbmail_headervalue not
> referenced in dbmail_header? 
> 
> delete from dbmail_headervalue where id not in (select headervalue_id from 
> dbmail_header)

my daily cronjob
IMHO that is a bug and dbmail-util should to this cleanup itself

/usr/sbin/dbmail-util -y -c -t -u -b -p -d -r 24h
mysql -u dbmail -p**************** dbmail -v -e "delete from dbmail_headername 
where id not in (select
headername_id from dbmail_header);"
mysql -u dbmail -p**************** dbmail -v -e "delete from 
dbmail.dbmail_headervalue where id not in (select
headervalue_id from dbmail.dbmail_header);"
___________________________________________

as well as there are a lot of cached headers nobody needs
IMHO there should be a internal *whitelist* which are worth for the cache-table

use dbmail; delete from dbmail_headername where headername like '%abuse%' or 
headername like '%antivirus%' or
headername like '%x-aol%' or headername like '%x-apple%' or headername like 
'%x-autorespond%' or headername like
'%x-barracuda%' or headername like '%x-ec-messenger%' or headername like 
'%x-imp%' or headername like
'%x-ironport%' or headername like '%linkedin%' or headername like '%exchange%' 
or headername like '%newsticker%' or
headername like '%original%' or headername like '%univie%' or headername like 
'x-cleanmail%' or headername like
'x-cloud-security%' or headername like '%mailscanner%' or headername='x-helo' 
or headername like '%antivirus%';

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to