Bug 82391 - Filter export/import OR separation of filter config file
Summary: Filter export/import OR separation of filter config file
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: filtering (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 51830 89489 90963 93526 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-05-28 15:55 UTC by Jedd
Modified: 2008-01-23 00:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jedd 2004-05-28 15:55:09 UTC
Version:            (using KDE KDE 3.2.2)
Installed from:    Debian testing/unstable Packages

Howdi,

No, this isn't the same as bugs 42377, 31186, or even 37564.

The answer given previously was to either duplicate the kmailrc file (which is all well and good for backup & recovery operations), or even to edit the kmailrc, and rip out the relevant paragraphs (X number of [filter] entries, and the filters entry in [General]).

The first doesn't work in situations where you have a different configuration for smtp servers on the two machines (hello, anyone with a laptop), and the second is simply painful when you're doing it frequently.

An import/export function is possibly overkill, because a GUI would actually make it less easy to automate.  It would still be faster than editing kmailrc files on two machines.  But not by much.  And in my own case, I usually do this syncing without going into KDE anyway.

I think a better approach is to separate the filter section out from the kmailrc.  Actually I think a lot of stuff in .kde/share/config/ could do with some separation of user-specific and machine-specific data.  But I digress.

My service provider is tied to the machine, for example.  But my filters are tied to my user-id.  Having both a kmailrc and filterrc, for example, would make it easy to programmatically update machines across the network.

Is the filters= entry in [General] actually needed?  Are there any qt calls for reading in the []-paragraph styled config files .. such that they can be called from other config files?  Eg. in the kmailrc, a @filters=filterrc file, say.  That way you would have multiple entries parsed, and the dream of the author of that other wishlist item could then source spam & special handling filters seamlessly across the net.

Future stuff.  At the moment I'd just be happy to not have to use vi when copying my filters.

Cheers,
Jedd.
Comment 1 Andreas Gungl 2004-05-30 21:34:02 UTC
*** Bug 51830 has been marked as a duplicate of this bug. ***
Comment 2 Tom Albers 2004-10-13 21:42:40 UTC
*** Bug 90963 has been marked as a duplicate of this bug. ***
Comment 3 Tom Albers 2004-11-19 17:40:48 UTC
*** Bug 93526 has been marked as a duplicate of this bug. ***
Comment 4 Jedd 2005-01-05 15:48:23 UTC
This is still a problem.  Dunno why more people (dave, jaime, somekool, I'm looking at you) haven't voted for it.

emailidentities appeared magically one day - causing a bunch of problems with my sync script between desktop & laptop.  Not sure what bug that was trying to fix -- the only reference to 'emailidentities' on bugs.kde is to a recent duplicate of this item (bug 89489).  Come on .. you know you really want to create an 'emailfilters' file to sit next to 'emailidentities' this weekend.
Comment 5 Iacopo 2005-01-05 17:34:07 UTC
I strongly agree with jedd@progsoc.org.
Syncing desktop and laptop mail preferences is a nonsense hell.
Another strong candidate for a separate file is folders' prefences
Comment 6 Mathieu Jobin 2005-01-05 19:36:34 UTC
i'm not sure at which level this should be implemented tho...

global kde settings sync ? or kmail only ?

selectable stuff to be synked ?

Comment 7 S. Burmeister 2005-01-05 19:38:04 UTC
*** This bug has been confirmed by popular vote. ***
Comment 8 Jedd 2005-01-06 02:26:24 UTC
This particular solution should be implemented by having a separate file for filters.

Separate files for various things that need sync'ing is a whole other world of problems.  I'd be happy to do some work on this -- I was involved in some similar design work years ago for that other OS, in the days when it had lots of INI files -- but imagine the KDE PIM people have other priorities.

The general solution is simple.  You separate machine and person aspects of configuration into different files.  Ideally into different directories or have different suffixes, so they can be programmatically copied/moved easily, too.

It gets complicated though (of course) with exceptions -- printers are part person, and part geographical (machine) dependent, for example.

But a basic principle of user .v. machine configuration separation would resolve most cases, and leave a minimum of work handling the exceptions later on.  I looked around for a part of the project where this was being dealt with, or at least discussed, a while ago, but never found it.  If anyone has some hints .. feel free to share.  It's a pretty big hurdle for enterprise implementation.
Comment 9 Tom Albers 2005-01-06 20:57:34 UTC
*** Bug 89489 has been marked as a duplicate of this bug. ***
Comment 10 kdebugs 2005-04-24 09:10:53 UTC
An Export/Import-Filter is not just a question of syncing. 

I want to change my system from Debian to Suse. Now I have to copy several files from several subdirectories of ~/.kde for every application. I can not copy the whole .kde-directory because of issues with kdemenu and different kde-components.

It would be simple to create a tar-archive with every config-file of kmail or kontact. With a GUI you can select the directories and config files, pack them and unpack them later to the right locations.

A more simple solution is to create standard backup profiles for konserve or kdar.
Comment 11 Thomas McGuire 2008-01-21 17:37:19 UTC
KMail in trunk and in the enterprise branch now has a filter exporter/importer, which can import from/export to a separate file.
Comment 12 Jedd 2008-01-22 15:54:30 UTC
Thomas - this is excellent news.  Is this a GUI only thing, or can it be scripted somehow (even if only via dcop).  As in the original posting, a GUI-only interface decreases the functionality (for me, at least - and I speculate others would also seek something scriptable).
Comment 13 Thomas McGuire 2008-01-23 00:29:40 UTC
This is not scriptable with D-Bus at the moment, and the filters are still saved in the normal KMail configuration file.