Re: server side filter plugin problem
Paul Lesniewski <[email protected]> Tue, 18 Jun 2013 22:35:48 -0700
| Newsgroups | gmane.mail.squirrelmail.plugins |
|---|---|
| Message-ID | <CAHog115zqXBxXw9HNFnCJMBCNGtJc69rjWfqX99wQxe2-nEj+A@mail.gmail.com> |
Sorry for the delay.
>>>>> version list:
>>>>> squirrelmail-webmail-1.4.22
>>>>> server_settings_backend-2.0-1.4.0.tar.gz
>>>>> server_side_filters-2.0beta1-1.4.0.tar.gz
>>>>> compatibility-2.0.16-1.0.tar.gz
>>>>>
>>>>> And I have enabled the server_side_filters throw config/conf.pl script.
>>>> You need to show configuration files/snippets.
>>>>
>>>>> Plugins
>>>>> Installed Plugins
>>>>> 1. server_side_filters
>>>>>
>>>>> Available Plugins:
>>>>> 2. administrator
>>>>>
>>>>>
>>>>> When I use "Options" -> "Message Filters" in my web browser, after add some filter rules, and click the SAVE button, it says "Error: Error deleting file or directory"
>>>>>
>>>>> And in my /var/log/httpd/ssl_error_log:
>>>>>
>>>>> PHP Warning: unlink(/): \xca\xc7\xd2\xbb\xb8\xf6\xc4\xbf\xc2\xbc in /var/www/html/webmail/functions/global.php on line 278, referer: https://mymailserver.com/webmail/plugins/server_side_filters/options.php
>>>> This is a warning, not an error. You should provide the complete log
>>>> information for whatever has happened. You may need to look in a
>>>> different log file or increase your PHP log settings. You also might
>>>> try using only ASCII characters in your filters to start with.
>>>>
>>>>> Here is the global.php function:
>>>>>
>>>>> 275 function sq_call_function_suppress_errors($function, $args=array()) {
>>>>> 276 $display_errors = ini_get('display_errors');
>>>>> 277 ini_set('display_errors', '0');
>>>>> 278 $ret = call_user_func_array($function, $args);
>>>>> 279 ini_set('display_errors', $display_errors);
>>>>> 280 return $ret;
>>>>> 281 }
>>>>> Anyone can give me some advice?
>>> I have enabled another plugin: server_side_filters_procmail, and below lists all the parameters I changed:
>>>
>>> server_side_filters_procmail/config.php
>>> $use_maildirs = 0;
>
> And for test purpose, I have changed the config as blow:
> $filter_rules_storage_info = array(
> 'BACKEND' => 'local_file',
> 'ACCESS_TYPE' => array('VALUE' => 'PHP'),
> 'FILE' => array('VALUE_REPLACE' => '/tmp/.mailfilter'),
> 'PARSE_PATTERN' => array('VALUE' => "/^(.*)$/s"),
> 'PATTERN_GROUP_NUMBER' => array('VALUE' => 1),
> 'NEW_SETTING_TEMPLATE' => array('VALUE' => '%n'),
Sorry, this %n also should be changed to %1.
> 'DELETE_WHEN_EMPTY' => array('VALUE' => 1),
> 'TREAT_AS_EMPTY_WHEN_NOT_FOUND' => array('VALUE' => 1),
> );
>
> Of course php owner have write privilege to the /tmp directory.
>
> But seems the same problem.
>
> Notice: Uninitialized string offset: -1 in /var/www/html/webmail/plugins/server_side_filters_procmail/functions.php on line 255 Warning: strpos(): Empty delimiter in /var/www/html/webmail/plugins/server_side_filters_procmail/functions.php on line 257 SERVER SETTINGS BACKEND MATCHES (PATTERN = "/^(.*)$/s") ARE:
Again, this is not the cause of your problem, but you can remove this
error by adding this BEFORE line 254 in
server_side_filters_procmail/functions.php:
if (!empty($default_folder_prefix)) {
and then you have to add a closing brace after the following two if
statements - line 260 should do it.
> ERROR:
> Could not write to file "/"
Sorry again, the problem is another oversight of version differences
in the configuration file.
> 'FILE' => array('VALUE_REPLACE' => '/tmp/.mailfilter'),
For you needs to be "VALUE" (without the "_REPLACE" part). Remember
to also use %1 instead of %n in NEW_SETTING_TEMPLATE and %1 and %2
instead of %u and %d respectively in FILE as well. A new version of
the backend plugin will be out in the medium term where you will need
to revert these changes back to what you originally found in the
filters plugin examples.
--
Paul Lesniewski
SquirrelMail Team
Please support Open Source Software by donating to SquirrelMail!
http://squirrelmail.org/donate_paul_lesniewski.php
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
-----
squirrelmail-plugins mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.plugins
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-plugins