Re: [Evolution-hackers] Junk filtering controls and logic are confusing

2013-11-23 Thread Matthew Barnes
On Sat, 2013-11-23 at 15:44 -0600, Michael Ekstrand wrote:
> I've cooked up a pair of not-yet-tested patches that address (1) by
> moving the address book check before the header check and (3) by moving
> the 'do we have a junk filter?' test to right before the junk filter is
> actually moved.

Sounds good.  For (1) please add a comment to the junk_test() function
describing the rationale for the new ordering, for posterity.


>   * Keep 'Check incoming messages for junk' as the top, top-level
> check box.  Have it enable/disable the following options, which
> are indented under it:
>   * 'Skip junk detection if sender is in my address book'
>   * 'Lookup in local address book only'
>   * 'Check custom headers for junk flags'
>   * 'Use external junk filter'  (invisible if no
> plugin available, junk filter config UI is subordinate
> to this checkbox)
>   * 'Delete junk messages' as top-level sibling of 'Check…', at the
> bottom of the pane
>   * Get rid of the 'Option is ignored…' notice

Sounds good on paper.  Maybe you could post a screen shot when you get
things reworked?

A word of warning about Glade, if you choose to use it, is to carefully
check over the changes it makes after saving because it loves to corrupt
our .ui files.  Glade eats any widget types in the .ui file it doesn't
understand and sometimes doesn't get along well with our one-letter 'E'
prefix, and silently omits anything it had trouble reading when saving
back to disk, thereby corrupting the file.

More often than not I have to manually audit the changes it makes with
"git add -p" before committing.

Matthew Barnes

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] Junk filtering controls and logic are confusing

2013-11-23 Thread Michael Ekstrand
On Sat, 2013-11-23 at 13:10 -0500, Matthew Barnes wrote:
> On Sat, 2013-11-23 at 10:48 -0600, Michael Ekstrand wrote:
> > The particular working of the junk filtering pane (Preferences -> Mail
> > Preferences -> Junk) is confusing, and the functionality it controls is
> > (A) hard to understand and (B) arguably incorrect.
> 
> Indeed.  You're wading into a mess here.
> 
> The junk filtering logic bounces between Camel and Evolution.  Camel's
> filtering (both junk and otherwise) is highly dependent on Evolution and
> at some point I'd like to move it all to Evolution and get Camel out of
> the filtering business entirely.  (The relevant Camel APIs badly need an
> overhaul as well, as they're ancient, error-handling is pretty much non-
> existent and they block like crazy.)

I have noticed. It has been interesting trying to figure out how junk
control filtering works.  It does seem, though, that the junk_test
function really does implement the heart of the junk-filtering logic,
which has been somewhat encouraging.

> > In particular, a few things I am immediately interested in making
> > happen:
> >  1. Making address book checks preempt spam header checks
> >  2. (maybe) figuring out why the spam header check isn't doing
> > anything
> >  3. Making spam header & address book checks work without a spam
> > filtering plugin
> >  4. Making spam filtering UI disable things to show how it works
> 
> Sounds great to me!

I've cooked up a pair of not-yet-tested patches that address (1) by
moving the address book check before the header check and (3) by moving
the 'do we have a junk filter?' test to right before the junk filter is
actually moved.

So far I'm thinking about in terms of minimal changes to make things
work better.  I'm open to considering more invasive changes, but I need
to understand the Evolution/Camel interface better, and don't have a
huge amount of free time right now.  Enough to scratch a few itches,
though :).

Moving junk filtering to a per-account option long term does sound like
a good move, but in the short term, I propose the following reworking of
the junk config UI:

  * Keep 'Check incoming messages for junk' as the top, top-level
check box.  Have it enable/disable the following options, which
are indented under it:
  * 'Skip junk detection if sender is in my address book'
  * 'Lookup in local address book only'
  * 'Check custom headers for junk flags'
  * 'Use external junk filter'  (invisible if no
plugin available, junk filter config UI is subordinate
to this checkbox)
  * 'Delete junk messages' as top-level sibling of 'Check…', at the
bottom of the pane
  * Get rid of the 'Option is ignored…' notice

Thoughts?

- Michael

-- 
Michael Ekstrand — http://elehack.net/



signature.asc
Description: This is a digitally signed message part
___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] Junk filtering controls and logic are confusing

2013-11-23 Thread Matthew Barnes
On Sat, 2013-11-23 at 10:48 -0600, Michael Ekstrand wrote:
> The particular working of the junk filtering pane (Preferences -> Mail
> Preferences -> Junk) is confusing, and the functionality it controls is
> (A) hard to understand and (B) arguably incorrect.

Indeed.  You're wading into a mess here.

The junk filtering logic bounces between Camel and Evolution.  Camel's
filtering (both junk and otherwise) is highly dependent on Evolution and
at some point I'd like to move it all to Evolution and get Camel out of
the filtering business entirely.  (The relevant Camel APIs badly need an
overhaul as well, as they're ancient, error-handling is pretty much non-
existent and they block like crazy.)


> 1. What all does 'Check incoming messages for junk' control? Everything?
> Just the junk plugin (spamassassin/bogofilter)?  Does checking or
> unchecking it affect whether custom headers are scanned?
> - Potential UI fix: the options for everything that is pre-empted by
> disabling junk checking should be disabled when the checkbox is cleared

I think the option should be removed entirely and be made per-account,
but that may be a bit of a project.  At the moment, only IMAP accounts
have their own junk filtering options, and I believe those options are
secondary to this master switch.

Disabling the "Check incoming messages for junk" turns off everything:
custom header checks, address book lookups, and junk filtering software.


> 2. What option is ignored if a match for custom junk headers is found?
> - The code suggests that the address book and and junk filter plugin
> logic are both ignored if custom headers are found

Correct: headers first, then address book, then filtering software.  I
think it's meant to be in order of fastest to slowest.  As soon as any
of those tests determine the message to be junk, processing stops.


> 3. What happens if there is no junk plugin (bogofilter/spamassassin)
> installed? UI makes it looks like the custom headers will work, and
> address book checking will work.  However, the code seems to disagree:
> looking at the junk_test function in camel-filter-search.c, it looks
> like everything is just bypassed if there is no junk filter installed.

Yeah you're right.  Probably even my handiwork.  The header and address
book checks should run regardless.  That's a valid bug.


> In my mail setup, I run SpamAssassin on the server (as a Postfix
> milter).  I want Evolution to check the spam headers set by the server,
> but not to mess with running bogofilter or spamassassin or anything like
> that locally.  Further, since my server's SpamAssassin doesn't know
> anything about my address book, I want the address book lookup to
> override the custom header check.

The processing order I mentioned above would have to be changed.

I don't have any strong opinions about that since I just use Bogofilter.


> The UI makes it ambiguous as to whether this is possible.  Looking
> through the code, to the extent that I understand it so far, it looks
> like it is not.  If I have no junk filter plugin, then Evolution will
> not do any checking, including for custom headers.  If I have one, then
> I'm double-scanning my mail and slowing down Evolution.  And the address
> book check doesn't interact with the header check.

It would be clearer if the UI read more like a checklist:

   [ ] First check this...

   [ ] Then check this...

   [ ] Then check this...


> In particular, a few things I am immediately interested in making
> happen:
>  1. Making address book checks preempt spam header checks
>  2. (maybe) figuring out why the spam header check isn't doing
> anything
>  3. Making spam header & address book checks work without a spam
> filtering plugin
>  4. Making spam filtering UI disable things to show how it works

Sounds great to me!

Polishing up those options and unbreaking whatever's broken would be
much appreciated.

Matthew Barnes

___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


[Evolution-hackers] Junk filtering controls and logic are confusing

2013-11-23 Thread Michael Ekstrand

The particular working of the junk filtering pane (Preferences -> Mail
Preferences -> Junk) is confusing, and the functionality it controls is
(A) hard to understand and (B) arguably incorrect.

I'm not just trying to gripe about this - I want to help work towards a
better understanding of the junk filtering logic that can result in an
improved UI, improved documentation, and possibly improvements to the
junk filtering logic itself.  Please let me know if it is better to
discuss this in the bug tracker than on the mailing list.

The UI itself leaves open certain questions:

1. What all does 'Check incoming messages for junk' control? Everything?
Just the junk plugin (spamassassin/bogofilter)?  Does checking or
unchecking it affect whether custom headers are scanned?
- Potential UI fix: the options for everything that is pre-empted by
disabling junk checking should be disabled when the checkbox is cleared

2. What option is ignored if a match for custom junk headers is found?
- The code suggests that the address book and and junk filter plugin
logic are both ignored if custom headers are found

3. What happens if there is no junk plugin (bogofilter/spamassassin)
installed? UI makes it looks like the custom headers will work, and
address book checking will work.  However, the code seems to disagree:
looking at the junk_test function in camel-filter-search.c, it looks
like everything is just bypassed if there is no junk filter installed.

In my mail setup, I run SpamAssassin on the server (as a Postfix
milter).  I want Evolution to check the spam headers set by the server,
but not to mess with running bogofilter or spamassassin or anything like
that locally.  Further, since my server's SpamAssassin doesn't know
anything about my address book, I want the address book lookup to
override the custom header check.

The UI makes it ambiguous as to whether this is possible.  Looking
through the code, to the extent that I understand it so far, it looks
like it is not.  If I have no junk filter plugin, then Evolution will
not do any checking, including for custom headers.  If I have one, then
I'm double-scanning my mail and slowing down Evolution.  And the address
book check doesn't interact with the header check.

Also, custom header checks don't seem to be doing anything right now,
but that seems to be a slightly separate issue.

Is revisiting the UI and logic for junk filtering something that the
Evolution devs are open to?  I'm willing to throw some of my (sadly few)
free cycles at implementing some cleanups, at least if they are to
fairly self-contained code (I'm quite new to the Evolution code base).

In particular, a few things I am immediately interested in making
happen:
 1. Making address book checks preempt spam header checks
 2. (maybe) figuring out why the spam header check isn't doing
anything
 3. Making spam header & address book checks work without a spam
filtering plugin
 4. Making spam filtering UI disable things to show how it works

- Michael

-- 
Michael Ekstrand — http://elehack.net/



signature.asc
Description: This is a digitally signed message part
___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers


Re: [Evolution-hackers] Running Evolution from jhbuild

2013-11-23 Thread Michael Ekstrand
On Fri, 2013-11-22 at 10:06 -0500, Matthew Barnes wrote:
> On Fri, 2013-11-22 at 08:48 -0600, Michael Ekstrand wrote:
> > I can't use the address book subsystem - it says the AddressBook6
> > service isn't provided by any .service files.  I'm using the default
> > moduleset, did 'jhbuild build evolution'.
> 
> You probably haven't configured your session bus to look for service
> files in the place where jhbuild installs them.
> 
> Add something like this to your /etc/dbus-1/session.conf:
> 
>   /path/to/jhbuilt/share/dbus-1/services
> 
> Or you could just start the services manually from a separate terminal
> window.  That's what I usually do so I can monitor the standard output.

Thanks - running evolution-addressbook-factory --wait-for-client in a
separate terminal worked great.

I've now tested and submitted my patch[1].

- Michael

1. https://bugzilla.gnome.org/show_bug.cgi?id=715067

-- 
Michael Ekstrand — http://elehack.net/



signature.asc
Description: This is a digitally signed message part
___
evolution-hackers mailing list
evolution-hackers@gnome.org
To change your list options or unsubscribe, visit ...
https://mail.gnome.org/mailman/listinfo/evolution-hackers