On 17-03-14 15:21, Reindl Harald wrote:
> http://git.dbmail.eu/paul/dbmail/commit/?h=dbmail_3_1&id=81f5abec7052ed1a95c5b87bd1c3bd0fc839de3f
> 
>> set header_cache_readonly to 'yes' to prevent new
>> unknown header-names from being cached
> 
> great!
> 
> is there an easy way to get the existing tables completly
> cleaned and fill that with headers what are really needed
> and used by clients?

Sorry, but no! it very much depends on the clients used. Outlook uses
different headers than thunderbird, etc.

Assuming you don't support hand-crafted search queries (some clients
undoubtedly do allow it):

Received is not needed for normal usage.
Most headers that start with 'X-' can be deleted, but not all.

Headers used by Outlook (afaik):

References X-Ref X-Priority X-MSMail-Priority X-MSOESRec Newsgroups

Thunderbird:

>From To Cc Subject Date Message-ID Priority X-Priority References
Newsgroups In-Reply-To Content-Type

So at the very least keep:

Cc


Content-Type
Date
From
In-Reply-To
Message-ID
Newsgroups
Priority
References
Subject
To
X-MSMail-Priority
X-MSOESRec
X-Priority
X-Ref

This is just headers used in FETCH. But other headers I'm sure will be
used by other clients and/or during SEARCH.

Point of the patch is that at least no more headernames will be added.
If things works now, they will continue to work. You can start removing
headernames you are confident are never used (such as Received, and most
X- headers not mentioned). Just removing Received will typically remove
a *lot* of headervalue rows.

But be advised: removing rows from dbmail_headername will cascade to a
lot of rows in dbmail_headervalue.

So test before running stuff like:

delete from dbmail_headername where headername in ('Received',
'X-ListName', ...);

I would delete headernames one by one. Or if this is too slow and you
are certain about the headernames you need:

1) truncated dbmail_header, dbmail_headername, dbmail_headervalue
2) insert headernames you know you need (like the list above)
3) run dbmail-util -by



-- 
________________________________________________________________
Paul J Stevens       pjstevns @ gmail, twitter, github, linkedin
           www.nfg.nl/[email protected]/+31.85.877.99.97
_______________________________________________
DBmail mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to