Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filters 2.2.0 #2

Open
wants to merge 87 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
dcc6a43
Create ja_JP.inc
tatsuyaueda Aug 20, 2015
428c7a9
Merge pull request #1 from tatsuyaueda/ja_JP-patch-1
Sep 1, 2015
7cc7918
Update README.txt
Sep 1, 2015
cc796c4
Update README.txt
Sep 2, 2015
c0ed57d
Update ru_RU.inc
Sep 3, 2015
0656173
Create el_GR.inc
sl45sms Jan 11, 2016
4524af1
Update el_GR.inc
sl45sms Jan 11, 2016
6a9b984
Update el_GR.inc
sl45sms Jan 11, 2016
f3713ac
Merge pull request #6 from sl45sms/master
Jan 12, 2016
3a417e9
Add config.inc.php
Jan 12, 2016
d505f39
Add config.inc.php
Jan 12, 2016
728a8de
Add config.inc.php
Jan 12, 2016
ab30f5d
Update filters.php
Jan 12, 2016
cae3c65
Update filters.php
Jan 12, 2016
a0ac30b
Update filters.php
Jan 12, 2016
97608d0
Fix "decode and search BASE64 messages"
Jan 12, 2016
d7cb608
Fix "decode and search BASE64 messages"
Jan 12, 2016
b9c1f9f
Update config.inc.php
Jan 12, 2016
6bd3f27
Create uk_UA.inc
Feb 4, 2016
ec1bb37
Update README.txt
Feb 4, 2016
c57bbf6
Fixed no prefs error
jirislav Mar 10, 2016
8b718c8
Fix FR translations
nicolas-joubert Mar 18, 2016
42c4acf
Merge pull request #8 from jirislav/patch-1
Mar 23, 2016
e1c45c2
Merge pull request #10 from nicolas-joubert/fix_fr_translations
Mar 23, 2016
cb523ac
Create turkish lang file
bluexpres Jul 31, 2016
833a68f
Merge pull request #14 from bluexpres/patch-1
Aug 2, 2016
55653c7
Update Spanish translation, including a missing string
larjona Sep 22, 2016
40b9da5
Merge pull request #15 from larjona/patch-1
Sep 22, 2016
82f45c9
Fix for roundcube 1.2.2
Nov 28, 2016
ea058ef
Update composer.json
Nov 28, 2016
ecd98fe
Create package.xml
Nov 28, 2016
655293a
Update composer.json
Nov 28, 2016
c5737cd
Update config.inc.php
Nov 28, 2016
162e506
Fixed for Roundcube 1.2.2
Nov 28, 2016
b1083bc
Fixed for Roundcube 1.2.2
Nov 28, 2016
448b772
Fixed for Roundcube 1.2.2
Nov 28, 2016
5d14614
Fixed for Roundcube 1.2.2
Nov 28, 2016
5a3a8e4
Fixed for Roundcube 1.2.2
Nov 28, 2016
59fe7c3
Linea 18 falta el punto y coma.
Nov 30, 2016
400ece2
Merge pull request #18 from Incosal/patch-1
Dec 1, 2016
5900854
Update zh_TW.inc
Dec 5, 2016
43290e6
Fix "SAVE" button in settings -> filter rules.
Gr4ffy Apr 12, 2017
9582ac4
Fix warnings
Gr4ffy Apr 12, 2017
2cde09e
Update version to 2.1.6
Gr4ffy Apr 12, 2017
7542038
Update version to 2.1.6
Gr4ffy Apr 12, 2017
b68ad17
Update version to 2.1.6
Gr4ffy Apr 12, 2017
21ae07a
Update version to 2.1.6
Gr4ffy Apr 12, 2017
6cc26f5
Update version to 2.1.6
Gr4ffy Apr 12, 2017
add7cd4
Merge pull request #22 from Gr4ffy/master
Apr 12, 2017
bd3ac5f
Update README.txt
Apr 12, 2017
dad70d6
Fix search in RC
peterkroon May 10, 2017
eabcf74
Merge pull request #25 from peterkroon/patch-1
May 10, 2017
5077a4a
Fix search in RC
May 10, 2017
1983640
Added pt_BR translation and renamed README.txt to README.md, with mar…
filhocf May 22, 2017
2262442
Merge pull request #26 from filhocf/master
May 23, 2017
bd5935b
Update README.md
May 23, 2017
643ac73
Update README.md
May 23, 2017
af420c9
Fix for #23
derekisbusy Jul 5, 2017
d1e5474
Update README.md
Dec 14, 2017
3201990
Update README.md
Dec 14, 2017
ada978c
Update README.md
Dec 14, 2017
e51aafa
Update package.xml
Dec 14, 2017
7c1a48e
Update README.md
Dec 14, 2017
cdf19aa
Update filters.php
BeBest123 Feb 11, 2018
085adfd
Merge pull request #32 from BeBest123/patch-1
Feb 23, 2018
1fa6c0b
Merge pull request #28 from derekisbusy/master
Feb 23, 2018
b616004
Update README.md
Feb 23, 2018
ecc0d64
Update composer.json
Feb 23, 2018
214c474
Update filters.js
Feb 23, 2018
f2bf1b3
Update filters.php
Feb 23, 2018
b7ce0d9
Update package.xml
Feb 23, 2018
01b6f88
Update README.md
Feb 23, 2018
690b866
Update README.md
Feb 23, 2018
102152a
Update README.md
Feb 24, 2018
f098208
Update package.xml
Feb 24, 2018
a437c55
Update filters.php
Feb 24, 2018
3fd3967
Update composer.json
Feb 24, 2018
19e8d3a
Update filters.js
Feb 24, 2018
03fee15
Hungarian localization added
csanyikrisztian May 18, 2018
8677f47
Merge pull request #33 from Sitedesign/master
May 20, 2018
e8f237e
Render settings sidebar with RC's PHP API
jfcherng Jan 25, 2019
9e08ac7
Merge pull request #38 from jfcherng/master
Feb 19, 2019
aa30f6d
Update README.md
Mar 1, 2019
4c17f8f
Added check additional headers
Mar 14, 2019
b72bd3f
fixed default rules bug
Mar 17, 2019
4d6822e
Update README.md
Mar 28, 2019
9ebdc3f
Updated to v2.2.0
Jun 19, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 120 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
Roundcube Plugin Filters
============================

Plugin that adds a new tab to the settings section to create client-side e-mail filtering.

@version 2.2.0
@author Roberto Zarrelli <[email protected]>
@developer Artur Petrov <[email protected]>

Installation
----------------------------------------

To install the plugin you have to:
1. Download zip-archive to Roundcube/plugins folder;
2. Unzip downloaded zip-archive;
3. Rename unziped folder to 'filters';
4. Add "filters" in the plugins section of the roundcube configuration (config/config.inc.php).
For example:
```
$config['plugins'] = array(
'archive',
'password',
'filters',
);
```

Installation (ISPConfig 3.1)
----------------------------------------
```
#!/bin/bash
cd /usr/share/roundcube/plugins
wget https://github.com/6ec123321/filters/archive/master.zip
unzip master.zip && mv filters-master filters
cd filters && mkdir /etc/roundcube/plugins/filters
mv config.inc.php /etc/roundcube/plugins/filters/config.inc.php
ln -s /etc/roundcube/plugins/filters/config.inc.php config.inc.php
ln -s /usr/share/roundcube/plugins/filters /var/lib/roundcube/plugins/filters
```

Configuration
----------------------------------------

To setup the plugin, open the config.inc.php file and edit the following variables:
```
$config['autoAddSpamFilterRule'] = TRUE; // if TRUE a spam filter rule is created for all users which automatically move messages into junk folder if no filters rules
$config['spam_subject'] = '[SPAM]'; // How to mark the spam in the subject? To have effect the previous variable must be TRUE.
$config['caseInsensitiveSearch'] = TRUE; // if TRUE filters searching in case insensitive mode.
$config['decodeBase64Msg'] = TRUE; // if TRUE decode base64 mail messages.
$config['spam_headers'] = array('X-Spam-Flag','X-Spam-Status','X-Yandex-Spam'); // Check additional headers or amavisd-new headers like X-Spam-Flag, don't need mark spam in the subject
```

History
----------------------------------------


* 1.0. Initial version.
* 1.1. Fixed some important issues.
* 1.2. Fixed some minor issues - thanks to Marco De Vivo.
* 1.3. Fixed some minor issues and added additional translations: Dutch and French - thanks to Ruud van den Hout.
* 1.4. News: each rule can now filter all, read or unread messages.
* 1.5. Fixed some important issues detected with Roundcube 0.8
* 1.6. Added additional translation: German - thanks to Fynn Kardel.
* 1.7. Added additional translation: Russian - thanks to AresMax.
* 1.8. Added additional translation: Czech - thanks to Miroslav Baka.
* 1.9. Added additional translation: Spanish - thanks to Yoni (MyRoundcube Dev Team - www.myroundcube.com).
* 1.9.1. Added additional translations: Polish - thanks to Damian Wrzalski; Slovak - thanks to Miki.
* 1.9.2:
- Added additional translation: Portugal - thanks to antoniomr.
- Fixed the UTF-8 coding on the German translation - thanks to Veit.
- Added the contrib section with third-party scripts.
- Thanks to Carsten Schumann to write the manual filter patch for Filters 1.9.2 which adds the option to filter manually on request (i.e. to move all newsletters/alerts from inbox to trash).
The patch expands the settings page with an option "Mode: automatic/manual" and adds a "manual filter" button to the toolbar. Finally, it updates the localization files.
* 2.0:
- Added the 'auto add spam filter rule' which automatically add the rule to move messages into junk folder.
- Added additional translations: Taiwan - thanks to Avery Wu;
- Added additional translations: Romanian - thanks to Tache Madalin;
- Fixed to UTF-8 the French translation - thanks to Nvirenque.
* 2.1:
- Added the feature to filter base64 encoded mail messages;
- Added the feature to filter messages searching in case insensitive or case sensitive mode;
- Improved the code to prevent the javascript injection - thanks to Moritz;
- Improved code organization;
- Minor bug fixes.
* 2.1.1:
- Fixed a bug which prevented to insert case sensitive search strings - thanks to Emanuele Bruno.
* 2.1.2:
- Added a dynamic vertical scrollbar when there are a lot of filters to show - thanks to Alain Martini.
* 2.1.3:
- Now check mail only in INBOX like yandex.mail or gmail;
- fix "refresh" mailboxes after move mails;
- Fixed a bug with the conflict rules. Add priority checkbox, now first rules with priority are working.
* 2.1.4:
- Fixed for compare strings (Tested in all russian charset);
- Fixed option: all, read and unread messages;
- Added a new option: mark read or mark unread messages;
- Fully replaced a search algorithm;
- Fixed localization for 'folder' and 'folder.subfolder' - thanks to twisterbr;
- Added additional translations: Japanese - thanks to tatsuyaueda;
- Added config.inc.php;
- Fix "decode and search BASE64 messages";
- Added additional translations: Ukrainian - thanks to Dmitro Gnatoyko ([email protected]).
* 2.1.5:
- Fixed for Roundcubemail 1.2.2.
* 2.1.6:
- Fixed for Roundcubemail 1.2.4;
- Fixed warnings;
- Fixed "SAVE" button in settings -> filter rules. Thx @JofO97;
- Fixed search in Roundcube - thanks to peterkroon.
* 2.1.7:
- Fixed for Roundcubemail 1.3.4;
- Fixed error "The fields Contains must not be empty"... but the field isn't empty when adding a filter - thanks to derekisbusy (Merge pull request #28 from derekisbusy/master);
- Fixed PHP Warning: Invalid argument supplied for foreach() in /sites/www/roundcube/plugins/filters/filters.php on line 247 - thanks to BeBest123 (Merge pull request #32 from BeBest123/patch-1);
- Render settings sidebar with RC's PHP API - thanks to jfcherng (Merge pull request #38 from jfcherng/master).
* 2.1.8:
- Added new option for select source folder.
* 2.1.9:
- Added check for additional headers from config.inc.php ($config['spam_headers']=array()).
* 2.2.0:
- Fixed error "filters have stopped working after an update from version 2.1.7 to 2.1.9" (https://github.com/6ec123321/filters/issues/46);
- Fixed error "Folder name with single quotation marks not filtered".
75 changes: 0 additions & 75 deletions README.txt

This file was deleted.

5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"type": "roundcube-plugin",
"description": "Plugin that adds a new tab to the settings section to create client-side e-mail filtering.",
"keywords": ["filters","client-side","rules","spam"],
"homepage": "https://github.com/6ec123321/filters",
"license": "GNU GPLv3+",
"version": "2.1.4",
"version": "2.2.0",
"authors": [
{
"name": "Roberto Zarrelli",
Expand All @@ -13,7 +14,7 @@
},
{
"name": "Artur Petrov",
"email": "admin@gtn18.ru",
"email": "artur@phpchain.ru",
"role": "Developer"
}
],
Expand Down
9 changes: 9 additions & 0 deletions config.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$config['autoAddSpamFilterRule'] = TRUE;
$config['spam_subject'] = '[SPAM]';
$config['caseInsensitiveSearch'] = TRUE;
$config['decodeBase64Msg'] = FALSE;
$config['spam_headers'] = array('X-Spam-Flag','X-Spam-Status','X-Yandex-Spam');

?>
10 changes: 3 additions & 7 deletions filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@
*
* Plugin that adds a new tab to the settings section to create client-side e-mail filtering.
*
* @version 2.1.4
* @version 2.2.0
* @author Roberto Zarrelli <[email protected]>
* @developer Artur Petrov <admin@gtn18.ru>
* @developer Artur Petrov <artur@phpchain.ru>
*/


if (window.rcmail) {
rcmail.addEventListener('init', function(evt) {
var tab = $('<span>').attr('id', 'settingstabpluginfilters').addClass('tablink');
var button = $('<a>').attr('href', rcmail.env.comm_path+'&_action=plugin.filters').html(rcmail.gettext('filters', 'filters')).appendTo(tab);

// add button and register command
rcmail.add_element(tab, 'tabs');
// register command
rcmail.register_command('plugin.filters-delete', function(){ rcmail.goto_url('plugin.filters-delete') }, true);
rcmail.register_command('plugin.filters-save', function(){
var input_searchstring = rcube_find_object('_searchstring');
Expand Down
Loading