[Users] Problem with processing rule

wwp subscript at free.fr
Mon Apr 16 20:34:09 CEST 2018


Hello Bob,


On Mon, 16 Apr 2018 19:04:41 +0100 Bob Williams <usenet at karmasailing.uk> wrote:

> On Mon, 16 Apr 2018 17:42:14 +0200
> wwp <subscript at free.fr> wrote:
> 
> > Hello Bob,
> > 
> > 
> > On Mon, 16 Apr 2018 14:38:33 +0100 Bob Williams
> > <usenet at karmasailing.uk> wrote:
> >   
> > > On Mon, 16 Apr 2018 15:05:49 +0200
> > > wwp <subscript at free.fr> wrote:
> > >     
> > > > Hello Bob,
> > > > 
> > > > 
> > > > On Mon, 16 Apr 2018 13:50:08 +0100 Bob Williams
> > > > <usenet at karmasailing.uk> wrote:
> > > >       
> > > > > The account is a gmail account. I am trying to move some
> > > > > messages which are filtered into a folder named "crew" to
> > > > > another folder. My processing rule for folder "crew" contains
> > > > > the following condition:
> > > > > 
> > > > > body_part matchcase "has completed a provisional membership
> > > > > form"
> > > > > 
> > > > > but none of the qualifying messages move to the new folder on
> > > > > entering "crew"
> > > > > 
> > > > > I'm not sure what I'm doing wrong.        
> > > > 
> > > > Maybe because the body text is encoded? What's the body format of
> > > > those emails?
> > > > 
> > > > 
> > > > Regards,
> > > >       
> > > 
> > > From the message headers, I see
> > > 
> > > Content-Type: text/html; charset=utf-8
> > > Content-Transfer-Encoding: 8bit
> > > 
> > > Is that what you mean? In Claws I have View > Character Encoding
> > > set to Automatic.    
> > 
> > Unless I'm missing something, filtering those messages' body part
> > seems OK to me. Unless it's IMAP and the body is not yet retrieved?
> > 
> > Or unless your filtering rules include other conditions that are not
> > matching. Did you try debugging the filtering (Tools/Filtering log,
> > you need to turn on filtering debugging in Preferences/Other/Logging.
> >   
> It's IMAP, but the body is readable.
> No other filtering rules applied.
> 
> Logging gives:
> 
> [18:58:27] filtering message (folder processing: Crew)
>             message file: /home/bob/.claws-mail/imapcache/imap.gmail.com/bob.williams at brightonbelle.org/Crew/848
>             Date: Mon, 16 Apr 2018 14:48:57 +0100
>             From: Timothy Test <info at brightonbelle.org>
>             To: crew at brightonbelle.org
>             Subject: 04-07-2019 Timothy Test Brighton
> [18:58:27] processing rule 'Provisional' [ body_part matchcase "has completed a provisional membership form" move "#imap/Brighton Belle/Provisional Members" ]
> [18:58:27] checking if message matches [ body_part matchcase "has completed a provisional membership form" ]
> > message does not match  
> 
> The relevant paragraph in the message that I am searching on reads:
> 
> Timothy Test has completed a provisional membership form for the event on 04-07-2019 and has selected xxx.xxx at brightonbelle.org as skipper. Please check the form and reply to them confirming a place is available and letting them know how they should pay their contribution. 

OK I got it. It's because there's a 0x0A (linefeed) char between 'a' and
'provisional' (at least here) in the body. So you think it's a space,
but it's a just non-printable that prints as ' '.

Such line-break can occur anywhere in the text, you should take this
into account in your match rule, for instance using a regexp instead:

 "has.completed.a.provisional.membership.form"

(one could write a more realistic regexp with, but you'd loose in
readability, this one matches reasonably enough)


Regards,

-- 
wwp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20180416/f458273a/attachment.sig>


More information about the Users mailing list