Commit acdbd68b authored by Jesse Norell's avatar Jesse Norell
Browse files

select Move to Junk before/after custom filters

parent 94be0a2a
......@@ -46,4 +46,7 @@ ALTER TABLE `web_domain` DROP COLUMN `enable_spdy`;
ALTER TABLE `web_domain` ADD `folder_directive_snippets` TEXT NULL AFTER `https_port`;
ALTER TABLE `web_domain` CHANGE `apache_directives` `apache_directives` mediumtext NULL DEFAULT NULL;
ALTER TABLE `web_domain` CHANGE `nginx_directives` `nginx_directives` mediumtext NULL DEFAULT NULL;
\ No newline at end of file
ALTER TABLE `web_domain` CHANGE `nginx_directives` `nginx_directives` mediumtext NULL DEFAULT NULL;
-- add move to junk before/after option, default to after
ALTER TABLE `mail_user` MODIFY `move_junk` enum('y','a','n') NOT NULL DEFAULT 'a';
......@@ -1046,7 +1046,7 @@ CREATE TABLE `mail_user` (
`autoresponder_end_date` datetime NULL default NULL,
`autoresponder_subject` varchar(255) NOT NULL default 'Out of office reply',
`autoresponder_text` mediumtext NULL,
`move_junk` enum('n','y') NOT NULL default 'n',
`move_junk` enum('y','a','n') NOT NULL default 'a',
`purge_trash_days` INT NOT NULL DEFAULT '0',
`purge_junk_days` INT NOT NULL DEFAULT '0',
`custom_mailfilter` mediumtext,
......
......@@ -60,7 +60,8 @@ plugin {
# no longer needed, as 'sieve' is in userdb extra fields:
sieve=/var/vmail/%d/%n/.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig.sieve
sieve_before=/var/vmail/%d/%n/.ispconfig-before.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig-after.sieve
sieve_max_script_size = 2M
sieve_max_actions = 100
sieve_max_redirects = 25
......
......@@ -29,7 +29,8 @@ plugin {
# no longer needed, as 'sieve' is in userdb extra fields:
sieve=/var/vmail/%d/%n/.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig.sieve
sieve_before=/var/vmail/%d/%n/.ispconfig-before.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig-after.sieve
sieve_max_script_size = 2M
sieve_max_actions = 100
sieve_max_redirects = 25
......
......@@ -1145,7 +1145,8 @@ plugin {
# and they're not deleted automatically (use a cronjob or something).
#lazy_expunge = .EXPUNGED/ .DELETED/ .DELETED/.EXPUNGED/
sieve_after=/var/vmail/%d/%n/.ispconfig.sieve
sieve_before=/var/vmail/%d/%n/.ispconfig-before.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig-after.sieve
sieve_max_script_size = 2M
sieve_max_actions = 100
sieve_max_redirects = 25
......
......@@ -28,7 +28,8 @@ plugin {
# no longer needed, as 'sieve' is in userdb extra fields:
sieve=/var/vmail/%d/%n/.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig.sieve
sieve_before=/var/vmail/%d/%n/.ispconfig-before.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig-after.sieve
sieve_max_script_size = 2M
sieve_max_actions = 100
sieve_max_redirects = 25
......
......@@ -1306,7 +1306,8 @@ plugin {
# ManageSieve this is where the uploaded scripts are stored.
sieve_dir=~/sieve
sieve_after=/var/vmail/%d/%n/.ispconfig.sieve
sieve_before=/var/vmail/%d/%n/.ispconfig-before.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig-after.sieve
sieve_max_script_size = 2M
sieve_max_actions = 100
sieve_max_redirects = 25
......
......@@ -26,7 +26,8 @@ plugin {
# no longer needed, as 'sieve' is in userdb extra fields:
sieve=/var/vmail/%d/%n/.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig.sieve
sieve_before=/var/vmail/%d/%n/.ispconfig-before.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig-after.sieve
sieve_max_script_size = 2M
sieve_max_actions = 100
sieve_max_redirects = 25
......
......@@ -1280,7 +1280,8 @@ plugin {
# ManageSieve this is where the uploaded scripts are stored.
sieve_dir=~/sieve
sieve_after=/var/vmail/%d/%n/.ispconfig.sieve
sieve_before=/var/vmail/%d/%n/.ispconfig-before.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig-after.sieve
sieve_max_script_size = 2M
sieve_max_actions = 100
sieve_max_redirects = 25
......
......@@ -25,7 +25,8 @@ plugin {
# no longer needed, as 'sieve' is in userdb extra fields:
sieve=/var/vmail/%d/%n/.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig.sieve
sieve_before=/var/vmail/%d/%n/.ispconfig-before.sieve
sieve_after=/var/vmail/%d/%n/.ispconfig-after.sieve
sieve_max_script_size = 2M
sieve_max_actions = 100
sieve_max_redirects = 25
......
......@@ -192,10 +192,11 @@ class page_action extends tform_actions {
$app->db->datalogUpdate('mail_user', $mail_user, 'mailuser_id', $mail_user["mailuser_id"], true);
$mail_user['autoresponder'] = 'y';
$app->db->datalogUpdate('mail_user', $mail_user, 'mailuser_id', $mail_user["mailuser_id"], true);
} elseif($mail_user['move_junk'] == 'y') {
} elseif($mail_user['move_junk'] != 'n') {
$save = $mail_user['move_junk'];
$mail_user['move_junk'] = 'n';
$app->db->datalogUpdate('mail_user', $mail_user, 'mailuser_id', $mail_user["mailuser_id"], true);
$mail_user['move_junk'] = 'y';
$mail_user['move_junk'] = $save;
$app->db->datalogUpdate('mail_user', $mail_user, 'mailuser_id', $mail_user["mailuser_id"], true);
} else {
$app->db->datalogUpdate('mail_user', $mail_user, 'mailuser_id', $mail_user["mailuser_id"], true);
......
......@@ -402,9 +402,9 @@ if ($global_config['mail']['mailbox_show_mail_filter_tab'] === 'y') {
//#################################
'move_junk' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
'formtype' => 'SELECT',
'default' => 'a',
'value' => array('y' => 'move_junk_y_txt', 'a' => 'move_junk_a_txt', 'n' => 'move_junk_n_txt'),
),
'purge_trash_days' => array (
'datatype' => 'VARCHAR',
......
......@@ -31,6 +31,9 @@ $wb['disablepop3_txt'] = 'Disable POP3';
$wb['duplicate_alias_or_forward_txt'] = 'There is already an alias or forwrd with this email address.';
$wb['quota_error_value'] = 'Invalid quota value. Allowed values are: 0 for unlimited or numbers > 1';
$wb['move_junk_txt'] = 'Move Spam Emails to Junk directory';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Realname';
$wb['name_optional_txt'] = '(Optional)';
$wb['autoresponder_active'] = 'Enable the autoresponder';
......
......@@ -31,6 +31,9 @@ $wb['autoresponder_start_date_ispast'] = 'Датата на старта нем
$wb['autoresponder_end_date_txt'] = 'Край на';
$wb['autoresponder_end_date_isgreater'] = 'датата на края неможе да бъде преди датата за старт.';
$wb['move_junk_txt'] = 'Премести СПАМ пощата в Директорията Боклуци';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Реално име ';
$wb['name_optional_txt'] = '(По желание)';
$wb['autoresponder_active'] = 'Разреши автоматичен отговор';
......
......@@ -36,6 +36,9 @@ $wb['disablepop3_txt'] = 'Desabilitar POP3';
$wb['duplicate_alias_or_forward_txt'] = 'Já existe um alias ou encaminhamento para este endereço de e-mail.';
$wb['quota_error_value'] = 'Valor da cota é inválido. Valores permitidos são: 0 para ilimitado ou números > 1.';
$wb['move_junk_txt'] = 'Mover e-mails marcados como spam para o diretório junk.';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Nome';
$wb['name_optional_txt'] = '(Opcional)';
$wb['autoresponder_active'] = 'Habilitar auto-resposta';
......
......@@ -30,6 +30,9 @@ $wb['autoresponder_end_date_txt'] = 'Terminer le';
$wb['autoresponder_end_date_isgreater'] = 'La date de fin doit être saisie et doit être ultérieure à la date de début.';
$wb['quota_error_value'] = 'Valeur de quota invalide. Les valeurs de quota autorisées sont : 0 pour illimité ou nombres > 1';
$wb['move_junk_txt'] = 'Déplacer le spam vers le dossier Junk';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Nom véritable';
$wb['name_optional_txt'] = '(Optionnel)';
$wb['autoresponder_active'] = 'Activer le répondeur automatique';
......
......@@ -30,6 +30,9 @@ $wb['disablepop3_txt'] = 'Zakázat POP3';
$wb['duplicate_alias_or_forward_txt'] = 'Alias nebo přesměrování s touto adresou již existuje.';
$wb['quota_error_value'] = 'Chybná hodnota kvóty. Povolené hodnoty jsou: 0 pro neomezeno nebo čísla > 1';
$wb['move_junk_txt'] = 'Přesunout e-maily detekované jako spam do adresáře Junk';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Skutečné jméno';
$wb['name_optional_txt'] = '(volitelné)';
$wb['autoresponder_active'] = 'Povolit automatický odpovídač';
......
......@@ -34,6 +34,9 @@ $wb['autoresponder_start_date_ispast'] = 'Startdatum kann nicht in der Vergangen
$wb['autoresponder_end_date_txt'] = 'Endet am';
$wb['autoresponder_end_date_isgreater'] = 'Enddatum muss angegeben werden und muss später als das Startdatum sein.';
$wb['move_junk_txt'] = 'Spam E-Mails in das Junk Verzeichnis verschieben';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Name';
$wb['name_optional_txt'] = '(optional)';
$wb['autoresponder_active'] = 'Autoresponder aktivieren';
......
......@@ -33,6 +33,9 @@ $wb['disablepop3_txt'] = 'Deaktiver POP3';
$wb['duplicate_alias_or_forward_txt'] = 'Der er allerede et alias eller forward for denne e-mail adresse.';
$wb['quota_error_value'] = 'Ugyldig kvote værdi. Tilladte værdier er: 0 for ubegrænset eller tal > 1';
$wb['move_junk_txt'] = 'Flyt Spam E-mails til Junk mappe.';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Navn';
$wb['name_optional_txt'] = '(Valgfri)';
$wb['autoresponder_active'] = 'Aktiver autosvarer';
......
......@@ -31,6 +31,9 @@ $wb['disablepop3_txt'] = 'Απενεργοποίηση POP3';
$wb['duplicate_alias_or_forward_txt'] = 'Υπάρχει ήδη ένα ψευδωνύμο ή μία προώθηση με αυτή τη διεύθυνση email.';
$wb['quota_error_value'] = 'Μη έγκυρη τιμή ορίου χώρου. Επιτρεπόμενες τιμές είναι: 0 για απεριόριστο ή αριθμοί > 1';
$wb['move_junk_txt'] = 'Μετακίνηση των Spam Emails στο φάκελο Junk';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Πραγματικό Όνομα';
$wb['name_optional_txt'] = '(Προαιρετικό)';
$wb['autoresponder_active'] = 'Ενεργοποίηση αυτόματης απάντησης';
......
......@@ -35,7 +35,10 @@ $wb["disableimap_txt"] = 'Disable IMAP';
$wb["disablepop3_txt"] = 'Disable POP3';
$wb["duplicate_alias_or_forward_txt"] = 'There is already an alias or forward with this email address.';
$wb["quota_error_value"] = 'Invalid quota value. Allowed values are: 0 for unlimited or numbers > 1';
$wb["move_junk_txt"] = 'Move Spam Emails to Junk directory.';
$wb["move_junk_txt"] = 'Move Spam Emails to Junk folder.';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb["name_txt"] = 'Name';
$wb["name_optional_txt"] = '(Optional)';
$wb['autoresponder_active'] = 'Enable the autoresponder';
......
......@@ -40,6 +40,9 @@ $wb['login_txt'] = 'Iniciar Sesión';
$wb['maildir_txt'] = 'Dirección de correo';
$wb['monthly_backup_txt'] = 'Mensualmente';
$wb['move_junk_txt'] = 'Mover correo basura (spam) a la carpeta Basura (Junk).';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_optional_txt'] = '(Opcional)';
$wb['name_txt'] = 'Nombre';
$wb['no_backup_txt'] = 'Sin copia de seguridad';
......
......@@ -31,6 +31,9 @@ $wb['autoresponder_start_date_ispast'] = 'Aloituspäivä ei voi olla menneisyyde
$wb['autoresponder_end_date_txt'] = 'Lopetuspäivä';
$wb['autoresponder_end_date_isgreater'] = 'Lopetuspäivän pitää olla myöhempi kuin aloituspäivä.';
$wb['move_junk_txt'] = 'Siirrä roskapostit Junk-kansioon';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Oikea nimi';
$wb['name_optional_txt'] = '(Valinnainen)';
$wb['autoresponder_active'] = 'Ota lomavastaaja käyttöön';
......
......@@ -30,6 +30,9 @@ $wb['autoresponder_end_date_txt'] = 'Terminer le';
$wb['autoresponder_end_date_isgreater'] = 'La date de fin doit être saisie et doit être ultérieure à la date de début.';
$wb['quota_error_value'] = 'Valeur de quota invalide. Les valeurs de quota autorisées sont : 0 pour illimité ou nombres > 1';
$wb['move_junk_txt'] = 'Déplacer le spam vers le dossier Junk';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Nom véritable';
$wb['name_optional_txt'] = '(Optionnel)';
$wb['autoresponder_active'] = 'Activer le répondeur automatique';
......
......@@ -31,6 +31,9 @@ $wb['disablepop3_txt'] = 'Disable POP3';
$wb['duplicate_alias_or_forward_txt'] = 'There is already an alias or forward with this email address.';
$wb['quota_error_value'] = 'Invalid quota value. Allowed values are: 0 for unlimited or numbers > 1';
$wb['move_junk_txt'] = 'Move Spam Emails to Junk directory';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Realname';
$wb['name_optional_txt'] = '(Optional)';
$wb['autoresponder_active'] = 'Enable the autoresponder';
......
......@@ -32,6 +32,9 @@ $wb['autoresponder_start_date_ispast'] = 'Start date cannot be in the past.';
$wb['autoresponder_end_date_txt'] = 'End by';
$wb['autoresponder_end_date_isgreater'] = 'End date must be set and be later than start date.';
$wb['move_junk_txt'] = 'Move Spam Emails to Junk directory';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Név';
$wb['name_optional_txt'] = '(Opcionális)';
$wb['autoresponder_active'] = 'Automatikus válasz engedélyezése';
......
......@@ -32,6 +32,9 @@ $wb['disablepop3_txt'] = 'Nonaktifkan POP3';
$wb['duplicate_alias_or_forward_txt'] = 'Sudah ada alias atau forward untuk alamat email ini.';
$wb['quota_error_value'] = 'Nilai kuota tidak valid. Nilai yang diperbolehkan adalah: 0 untuk tak terbatas atau angka > 1';
$wb['move_junk_txt'] = 'Pindahkan Email Spam ke direktori Junk';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Nama Lengkap';
$wb['name_optional_txt'] = '(Opsional)';
$wb['autoresponder_active'] = 'Aktifkan Penjawab Otomatis';
......
......@@ -31,6 +31,9 @@ $wb['autoresponder_start_date_ispast'] = 'La data di avvio no può essere anterg
$wb['autoresponder_end_date_txt'] = 'Termina il';
$wb['autoresponder_end_date_isgreater'] = 'La data termine deve essere impostata e successiva al giorno di inizio.';
$wb['move_junk_txt'] = 'Sposta Email di Spam nella cartella di spam Junk';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Nome vero';
$wb['name_optional_txt'] = '(Opzionale)';
$wb['autoresponder_active'] = 'Abilita autorisponditore';
......
......@@ -32,6 +32,9 @@ $wb['autoresponder_start_date_ispast'] = 'Start date cannot be in the past.';
$wb['autoresponder_end_date_txt'] = 'End by';
$wb['autoresponder_end_date_isgreater'] = 'End date must be set and be later than start date.';
$wb['move_junk_txt'] = 'Move Spam Emails to Junk directory';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Realname';
$wb['name_optional_txt'] = '(Optional)';
$wb['autoresponder_active'] = 'Enable the autoresponder';
......
......@@ -31,6 +31,9 @@ $wb['disablepop3_txt'] = 'Uitschakelen POP3';
$wb['duplicate_alias_or_forward_txt'] = 'Er is al een alias of forward met dir e-mailadres.';
$wb['quota_error_value'] = 'Ongeldige quota waarde. Toegestane waarden zijn: 0 = ongelimiteerd of nummerieke waarde > 1';
$wb['move_junk_txt'] = 'Verplaats SPAM e-mails naar junk folder';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Echte naam';
$wb['name_optional_txt'] = '(Optioneel)';
$wb['autoresponder_active'] = 'Inschakelen autobeantwoorden';
......
......@@ -32,6 +32,9 @@ $wb['autoresponder_start_date_ispast'] = 'Data uruchomienia nie może być w prz
$wb['autoresponder_end_date_txt'] = 'Zakończ do';
$wb['autoresponder_end_date_isgreater'] = 'Data zakończenia musi być późniejsza od daty rozpoczęcia';
$wb['move_junk_txt'] = 'Przenoś SPAM do folderu Junk';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Nazwa rzeczywista';
$wb['name_optional_txt'] = '(Opcjonalnie)';
$wb['autoresponder_active'] = 'Uruchom autorespondera';
......
......@@ -32,6 +32,9 @@ $wb['autoresponder_start_date_ispast'] = 'A data de ínicio não pode estar no p
$wb['autoresponder_end_date_txt'] = 'Termino:';
$wb['autoresponder_end_date_isgreater'] = 'A data de início deve ser menor que a data de termino.';
$wb['move_junk_txt'] = 'Mover Spam para a pasta JUNK';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Realname';
$wb['name_optional_txt'] = '(Optional)';
$wb['autoresponder_active'] = 'Enable the autoresponder';
......
......@@ -32,6 +32,9 @@ $wb['autoresponder_end_date_isgreater'] = 'End date must be set and be later tha
$wb['duplicate_alias_or_forward_txt'] = 'There is already an alias or forwrd with this email address.';
$wb['quota_error_value'] = 'Invalid quota value. Allowed values are: 0 for unlimited or numbers > 1';
$wb['move_junk_txt'] = 'Move Spam Emails to Junk directory';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Realname';
$wb['name_optional_txt'] = '(Optional)';
$wb['autoresponder_active'] = 'Enable the autoresponder';
......
......@@ -32,6 +32,9 @@ $wb['autoresponder_start_date_ispast'] = 'Дата запуска не може
$wb['autoresponder_end_date_txt'] = 'Останавливать';
$wb['autoresponder_end_date_isgreater'] = 'Дата окончания должна быть позже даты запуска.';
$wb['move_junk_txt'] = 'Перемещать спам в каталог Junk';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Реальное имя';
$wb['name_optional_txt'] = '(Опционально)';
$wb['autoresponder_active'] = 'Включить автоответчик';
......
......@@ -32,6 +32,9 @@ $wb['autoresponder_start_date_ispast'] = 'Startdatum kan inte vara i det förflu
$wb['autoresponder_end_date_txt'] = 'Sluta den';
$wb['autoresponder_end_date_isgreater'] = 'End date must be set and be later than start date.';
$wb['move_junk_txt'] = 'FLytta spamepost till spammappen';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Riktigt namn';
$wb['name_optional_txt'] = '(Frivilligt)';
$wb['autoresponder_active'] = 'Aktivera autosvaret';
......
......@@ -32,6 +32,9 @@ $wb['autoresponder_start_date_ispast'] = 'Start date cannot be in the past.';
$wb['autoresponder_end_date_txt'] = 'End by';
$wb['autoresponder_end_date_isgreater'] = 'End date must be set and be later than start date.';
$wb['move_junk_txt'] = 'Move Spam Emails to Junk directory';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Realname';
$wb['name_optional_txt'] = '(Optional)';
$wb['autoresponder_active'] = 'Enable the autoresponder';
......
......@@ -36,6 +36,9 @@ $wb['disablepop3_txt'] = 'POP3 Kullanılmasın';
$wb['duplicate_alias_or_forward_txt'] = 'Bu e-posta adresi zaten takma ya da yönlendirilmiş.';
$wb['quota_error_value'] = 'Kota değeri geçersiz. Değer sınırsız için 0 ya da 1 değerinden büyük olmalı';
$wb['move_junk_txt'] = 'Önemsiz İletiler Junk Klasörüne Taşınsın';
$wb["move_junk_y_txt"] = 'Move first, before custom filters.';
$wb["move_junk_a_txt"] = 'Move last, after custom filters.';
$wb["move_junk_n_txt"] = 'Do not move Spam Emails to Junk folder.';
$wb['name_txt'] = 'Ad';
$wb['name_optional_txt'] = '(İsteğe bağlı)';
$wb['autoresponder_active'] = 'Otoyanıtlayıcı kullanılsın';
......
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='move_junk_txt'}</label>
<div class="col-sm-9">{tmpl_var name='move_junk'}</div>
<div class="col-sm-9"><select name="move_junk" id="move_junk" class="form-control">
{tmpl_var name='move_junk'}
</select></div>
</div>
<div class="form-group">
......
......@@ -38,7 +38,7 @@
<p class="margin"> autoresponder_end_date&nbsp;&nbsp;(<span class="paratype">datetime</span>)</p>
<p class="margin"> autoresponder_text&nbsp;&nbsp;(<span class="paratype">mediumtext</span>)</p>
<p class="margin"> autoresponder_subject&nbsp;&nbsp;(<span class="paratype">varchar(255)</span>)</p>
<p class="margin"> move_junk&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
<p class="margin"> move_junk&nbsp;&nbsp;(<span class="paratype">enum('y','a','n')</span>)</p>
<p class="margin"> custom_mailfilter&nbsp;&nbsp;(<span class="paratype">mediumtext</span>)</p>
<p class="margin"> postfix&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
<p class="margin"> access&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
......
......@@ -36,7 +36,7 @@
<p class="margin"> autoresponder_start_date&nbsp;&nbsp;(<span class="paratype">datetime</span>)</p>
<p class="margin"> autoresponder_end_date&nbsp;&nbsp;(<span class="paratype">datetime</span>)</p>
<p class="margin"> autoresponder_text&nbsp;&nbsp;(<span class="paratype">mediumtext</span>)</p>
<p class="margin"> move_junk&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
<p class="margin"> move_junk&nbsp;&nbsp;(<span class="paratype">enum('y','a','n')</span>)</p>
<p class="margin"> custom_mailfilter&nbsp;&nbsp;(<span class="paratype">mediumtext</span>)</p>
<p class="margin"> postfix&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
<p class="margin"> access&nbsp;&nbsp;(<span class="paratype">enum('n','y')</span>)</p>
......
......@@ -23,6 +23,15 @@ if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes",
keep;
<tmpl_if name="move_junk" op="==" value="a">
# Move spam to spam folder
if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes", header :contains "subject" "*** SPAM ***", header :contains "subject" "***SPAM***") {
fileinto "Junk";
# Stop here so that we do not reply on spams
stop;
}
</tmpl_if>
<tmpl_if name="autoresponder" op="==" value="y">
#################################################################
# Autoreply
......
......@@ -23,6 +23,15 @@ redirect "<tmpl_var name='address'>";
keep;
<tmpl_if name="move_junk" op="==" value="a">
# Move spam to spam folder
if anyof (header :contains "X-Spam-Flag" "YES", header :contains "X-Spam" "Yes", header :contains "subject" "*** SPAM ***", header :contains "subject" "***SPAM***") {
fileinto "Junk";
# Stop here so that we do not reply on spams
stop;
}
</tmpl_if>
<tmpl_if name="autoresponder" op="==" value="y">
#################################################################
# Autoreply
......
......@@ -100,14 +100,18 @@ class maildeliver_plugin {
$sieve_file = $data["new"]["maildir"].'/.sieve';
$sieve_file_svbin = $data["new"]["maildir"].'/.sieve.svbin';
$old_sieve_file_isp = $data["new"]["maildir"].'/sieve/ispconfig.sieve';
$sieve_file_isp = $data["new"]["maildir"].'/.ispconfig.sieve';
$sieve_file_isp_svbin = $data["new"]["maildir"].'/.ispconfig.svbin';
$sieve_file_isp_before = $data["new"]["maildir"].'/.ispconfig-before.sieve';
$sieve_file_isp_before_svbin = $data["new"]["maildir"].'/.ispconfig-before.svbin';
$sieve_file_isp_after = $data["new"]["maildir"].'/.ispconfig-after.sieve';
$sieve_file_isp_after_svbin = $data["new"]["maildir"].'/.ispconfig-after.svbin';
if(is_file($old_sieve_file_isp)) unlink($old_sieve_file_isp) or $app->log("Unable to delete file: $old_sieve_file_isp", LOGLEVEL_WARN);
// cleanup .sieve file if it is now a broken link
if(is_link($sieve_file) && !file_exists($sieve_file)) unlink($sieve_file) or $app->log("Unable to delete file: $sieve_file", LOGLEVEL_WARN);
if(is_file($sieve_file_svbin)) unlink($sieve_file_svbin) or $app->log("Unable to delete file: $sieve_file_svbin", LOGLEVEL_WARN);
if(is_file($sieve_file_isp)) unlink($sieve_file_isp) or $app->log("Unable to delete file: $sieve_file_isp", LOGLEVEL_WARN);
if(is_file($sieve_file_isp_svbin)) unlink($sieve_file_isp_svbin) or $app->log("Unable to delete file: $sieve_file_isp_svbin", LOGLEVEL_WARN);
if(is_file($sieve_file_isp_before)) unlink($sieve_file_isp_before) or $app->log("Unable to delete file: $sieve_file_isp_before", LOGLEVEL_WARN);
if(is_file($sieve_file_isp_before_svbin)) unlink($sieve_file_isp_before_svbin) or $app->log("Unable to delete file: $sieve_file_isp_before_svbin", LOGLEVEL_WARN);
if(is_file($sieve_file_isp_after)) unlink($sieve_file_isp_after) or $app->log("Unable to delete file: $sieve_file_isp_after", LOGLEVEL_WARN);
if(is_file($sieve_file_isp_after_svbin)) unlink($sieve_file_isp_after_svbin) or $app->log("Unable to delete file: $sieve_file_isp_after_svbin", LOGLEVEL_WARN);
$app->load('tpl');
//* Select sieve filter file for dovecot version
......@@ -224,15 +228,24 @@ class maildeliver_plugin {
$app->system->mkdirpath($data["new"]["maildir"].'/sieve/', 0700, $mail_config['mailuser_name'], $mail_config['mailuser_group']);
}
file_put_contents($sieve_file_isp, $tpl->grab()) or $app->log("Unable to write sieve filter file", LOGLEVEL_WARN);
if ( is_file($sieve_file_isp) ) {
$app->system->chown($sieve_file_isp,$mail_config['mailuser_name'],false);
$app->system->chgrp($sieve_file_isp,$mail_config['mailuser_group'],false);
$app->system->exec_safe("sievec ?", "$sieve_file_isp");
if ( is_file($sieve_file_isp_svbin) ) {
$app->system->chown($sieve_file_isp_svbin,$mail_config['mailuser_name'],false);
$app->system->chgrp($sieve_file_isp_svbin,$mail_config['mailuser_group'],false);
if ($data["new"]["move_junk"] == "y") {
$sieve_file_isp = $sieve_file_isp_before;
$sieve_file_isp_svbin = $sieve_file_isp_before_svbin;
} elseif ($data["new"]["move_junk"] == "a") {
$sieve_file_isp = $sieve_file_isp_after;
$sieve_file_isp_svbin = $sieve_file_isp_after_svbin;
}
if (isset($sieve_file_isp)) {
file_put_contents($sieve_file_isp, $tpl->grab()) or $app->log("Unable to write sieve filter file", LOGLEVEL_WARN);
if ( is_file($sieve_file_isp) ) {
$app->system->chown($sieve_file_isp,$mail_config['mailuser_name'],false);
$app->system->chgrp($sieve_file_isp,$mail_config['mailuser_group'],false);
$app->system->exec_safe("sievec ?", "$sieve_file_isp");
if ( is_file($sieve_file_isp_svbin) ) {
$app->system->chown($sieve_file_isp_svbin,$mail_config['mailuser_name'],false);
$app->system->chgrp($sieve_file_isp_svbin,$mail_config['mailuser_group'],false);
}
}
}
......@@ -247,14 +260,18 @@ class maildeliver_plugin {
$sieve_file = $data["old"]["maildir"].'/.sieve';
$sieve_file_svbin = $data["old"]["maildir"].'/.sieve.svbin';
$old_sieve_file_isp = $data["old"]["maildir"].'/sieve/ispconfig.sieve';
$sieve_file_isp = $data["old"]["maildir"].'/.ispconfig.sieve';
$sieve_file_isp_svbin = $data["old"]["maildir"].'/.ispconfig.svbin';
$sieve_file_isp_before = $data["old"]["maildir"].'/.ispconfig-before.sieve';
$sieve_file_isp_before_svbin = $data["old"]["maildir"].'/.ispconfig-before.svbin';
$sieve_file_isp_after = $data["old"]["maildir"].'/.ispconfig-after.sieve';
$sieve_file_isp_after_svbin = $data["old"]["maildir"].'/.ispconfig-after.svbin';
if(is_file($old_sieve_file_isp)) unlink($old_sieve_file_isp) or $app->log("Unable to delete file: $old_sieve_file_isp", LOGLEVEL_WARN);
// cleanup .sieve file if it is now a broken link
if(is_link($sieve_file) && !file_exists($sieve_file)) unlink($sieve_file) or $app->log("Unable to delete file: $sieve_file", LOGLEVEL_WARN);
if(is_file($sieve_file_svbin)) unlink($sieve_file_svbin) or $app->log("Unable to delete file: $sieve_file_svbin", LOGLEVEL_WARN);
if(is_file($sieve_file_isp)) unlink($sieve_file_isp) or $app->log("Unable to delete file: $sieve_file_isp", LOGLEVEL_WARN);
if(is_file($sieve_file_isp_svbin)) unlink($sieve_file_isp_svbin) or $app->log("Unable to delete file: $sieve_file_isp_svbin", LOGLEVEL_WARN);
if(is_file($sieve_file_isp_before)) unlink($sieve_file_isp_before) or $app->log("Unable to delete file: $sieve_file_isp_before", LOGLEVEL_WARN);
if(is_file($sieve_file_isp_before_svbin)) unlink($sieve_file_isp_before_svbin) or $app->log("Unable to delete file: $sieve_file_isp_before_svbin", LOGLEVEL_WARN);
if(is_file($sieve_file_isp_after)) unlink($sieve_file_isp_after) or $app->log("Unable to delete file: $sieve_file_isp_after", LOGLEVEL_WARN);
if(is_file($sieve_file_isp_after_svbin)) unlink($sieve_file_isp_after_svbin) or $app->log("Unable to delete file: $sieve_file_isp_after_svbin", LOGLEVEL_WARN);
}
......
......@@ -204,7 +204,7 @@ class maildrop_plugin {
$app->log("Added CC address ".$data["new"]["cc"].' to mailfilter file.', LOGLEVEL_DEBUG);
}