Hello Janos and thank for your answer Ok, now i unterstood how piler search function works.So, if i would like perform the default search in both directions (In and Sent mail) i should modify the file you indicated in this way:
if($f_f == '' && $o_f == '' && $f_t == '' && $o_t == '') { return "@to $all_your_addresses| @from $all_your_addresses"; }
I tried this solution and it seems working.I think it will be very appreciated adding a config option for this feature, possibly concerning all the directions (To, From, Both).
Many thanks for your help Roberto Il 08/05/2013 14:06, Janos SUTO ha scritto:
Hello Roberto, On 2013-05-08 12:41, Roberto Bartali wrote:Hi everyone I'm new to mailpiler and just trying to understand if is it suitable for my organization needs. I'm using compiled version of mailpiler and sphinx. This is the "problem": if i search a message using the "search" button it performa a query only for received messages. If I want to extend the search to the "Sent" messages i must use the "Advanced Search" writing my mail address in the "From" field. Is this a normal behavior?yes, it's a feature, not a bug :-) If a regular user issues a search querythen an email address filter is applied based on his email addresses to search within only his emails. If the user defines whether to search in the sent emails, then it's honored and set accordingly in the filter expression.However if you just enter some subject or body expression then the defaultfilter is set which narrows the search to the received emails. Option #1 is to use the "advanced" search and specify your own address. The other option is to write 'from: your@address' to the long search field.Can I modify it by configuration settings?Edit model/search/search.php, and around the 215th line it says:if($f_f == '' && $o_f == '' && $f_t == '' && $o_t == '') { return "@to $all_your_addresses"; }change it to the following:if($f_f == '' && $o_f == '' && $f_t == '' && $o_t == '') { return "@from $all_your_addresses"; }and from then if a user doesn't define whether he wants to search in the sentor received emails, then the gui will focus on the sent emails.Perhaps I'll add a config.php option to define which direction to prefer bydefult: the sent or the received. Janos
smime.p7s
Description: Firma crittografica S/MIME
