Author Topic: Filtering and advanced search of emails  (Read 4032 times)

Offline Loggy

  • Newbie
  • *
  • Posts: 6
Filtering and advanced search of emails
« on: September 11, 2021, 11:05:05 AM »
Having finally got version 1,4,11 up and running, it is clear that RC is a very nice package and has an active user community.

I see 2 issues at the moment for which suggestions would be very welcome! :

1) I have installed a number of plugins, most importantly managesieved so I can filter my new mail.

But I cannot filter on a CC: in the header - To, From, ... (whatever that means) but not CC: which is a pity because many mailing lists reply to the originator with a CC to the list, most particularly the postfix list which I suspect many roundcore admins will read.

2) The general search only deals with defined categories of messages, Unread, Flagged etc.  It does not enable me to search for From, To etc, (as in sieve).  I can only do that by sorting on the field in question and scrolling down. In principle I can use getmail to sieve a folder but is not particularly useful as searching From, To, Subject  (and CC) is a frequent need when looking for old messages.

The advanced search fro texxasrulez was the only hope but the present (reasonably recent) version doesn't work with 1.4.11, throwing php errors that needed.  I have forwarded these to the plugin author but is there any other plugin?  I can't see one out of the 69.

TIA

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,850
Re: Filtering and advanced search of emails
« Reply #1 on: September 11, 2021, 12:05:26 PM »
Quote
1) I have installed a number of plugins, most importantly managesieved so I can filter my new mail.

But I cannot filter on a CC: in the header - To, From, ... (whatever that means) but not CC: which is a pity because many mailing lists reply to the originator with a CC to the list, most particularly the postfix list which I suspect many roundcore admins will read.

I assume you are using the managesieve plugin which is shipped with Roundcube. While Cc is not listed specifically in the list of headers if you select the "..." option then you will get an option to enter the name of any header you like, e.g. Cc, to filter on.

Quote
2) The general search only deals with defined categories of messages, Unread, Flagged etc.  It does not enable me to search for From, To etc, (as in sieve).  I can only do that by sorting on the field in question and scrolling down. In principle I can use getmail to sieve a folder but is not particularly useful as searching From, To, Subject  (and CC) is a frequent need when looking for old messages.

You can set the scope of your message search - Subject, From, To, Copy, Bcc, Body or Entire message by clicking on the dropdown arrow at the end of right hand end of the search box at the top of the message list.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Loggy

  • Newbie
  • *
  • Posts: 6
Re: Filtering and advanced search of emails
« Reply #2 on: September 11, 2021, 12:27:04 PM »
Thanks @JohnDoh. 

I tried putting CC in the extra box that ... but it went ape-shaped.  I will try again!  Is it CC or Cc, with or without the colon?

I hadn't spotted the tiny dropdown - I am using the classic theme where the DD was rather tiny on my laptop.  The dropdown includes Copy aka CC so that helps.:)

I got advanced search working and I can search for CC in that too.

The corrections for 1.4.11 (at least) in advanced_search.php are:
a) prepending rcube_utils:: to get_input_value(
b) replacing RCUBE_INPUT with rcube_utils::INPUT
c) prepending rcube:: to Q(
I tried to find a link to email Gene but so far haven't sent anything to him.

Now I need to link to spamassassin which is in my amavis-new stack but needs tuning.

I still don't know how to order the filters.  Do I give them prepended numbers so they are automatically sorted like a conf.d directory?

But I am getting there!

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,850
Re: Filtering and advanced search of emails
« Reply #3 on: September 11, 2021, 12:34:08 PM »
I think its Cc but I'm not certain. No colon for sure.

To reorder filters in the managesieve plugin you can drag-and-drop them.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline Loggy

  • Newbie
  • *
  • Posts: 6
Re: Filtering and advanced search of emails
« Reply #4 on: September 11, 2021, 12:51:46 PM »
@JohnDoh - Oh so you can!   ;D ;D How neat.

I used capitals in the CC filtering and no colon.  The filter translated that into Copy and it was accepted.

Now how do I increase the default number of rows per page shown from 200 to 500 (say)?

I tried altering the values in rcube_imap_generic.php and rcube_ldap.php but it still reverted to 200.  The installer offers a box but it is clearly overwritten in the code somewhere.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,850
Re: Filtering and advanced search of emails
« Reply #5 on: September 11, 2021, 01:02:12 PM »
There are 2 config options, the first mail_pagesize, I'm guessing that is the one you tried to change to 500. But there is also max_pagesize which is 200 by default and so you'd need to raise that as well.
Code: [Select]
// don't let users set pagesize to more than this value if set
$config['max_pagesize'] = 200;
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…