Added 'do nothing' option as default for sub-addressing
commit
2291bdbeed
|
@ -31,7 +31,7 @@ rspamd_config:register_symbol({
|
||||||
|
|
||||||
local wants_subject_tag = task:get_symbol("RCPT_WANTS_SUBJECT_TAG")
|
local wants_subject_tag = task:get_symbol("RCPT_WANTS_SUBJECT_TAG")
|
||||||
|
|
||||||
if wants_subject_tag then
|
if wants_subject_tag == 1 then
|
||||||
rspamd_logger.infox("user wants subject modified for tagged mail")
|
rspamd_logger.infox("user wants subject modified for tagged mail")
|
||||||
local sbj = task:get_header('Subject')
|
local sbj = task:get_header('Subject')
|
||||||
new_sbj = '=?UTF-8?B?' .. tostring(util.encode_base64('[' .. tag .. '] ' .. sbj)) .. '?='
|
new_sbj = '=?UTF-8?B?' .. tostring(util.encode_base64('[' .. tag .. '] ' .. sbj)) .. '?='
|
||||||
|
@ -39,7 +39,7 @@ rspamd_config:register_symbol({
|
||||||
remove_headers = {['Subject'] = 1},
|
remove_headers = {['Subject'] = 1},
|
||||||
add_headers = {['Subject'] = new_sbj}
|
add_headers = {['Subject'] = new_sbj}
|
||||||
})
|
})
|
||||||
else
|
elseif wants_subject_tag == 2 then
|
||||||
rspamd_logger.infox("Add X-Moo-Tag header")
|
rspamd_logger.infox("Add X-Moo-Tag header")
|
||||||
task:set_milter_reply({
|
task:set_milter_reply({
|
||||||
add_headers = {['X-Moo-Tag'] = 'YES'}
|
add_headers = {['X-Moo-Tag'] = 'YES'}
|
||||||
|
|
|
@ -1307,6 +1307,18 @@ function mailbox($_action, $_type, $_data = null, $attr = null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (isset($_data['tagged_mail_handler']) && $_data['tagged_mail_handler'] == "subfolder") {
|
||||||
|
try {
|
||||||
|
$redis->hSet('RCPT_WANTS_SUBJECT_TAG', $username, 2);
|
||||||
|
}
|
||||||
|
catch (RedisException $e) {
|
||||||
|
$_SESSION['return'] = array(
|
||||||
|
'type' => 'danger',
|
||||||
|
'msg' => 'Redis: '.$e
|
||||||
|
);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
$redis->hDel('RCPT_WANTS_SUBJECT_TAG', $username);
|
$redis->hDel('RCPT_WANTS_SUBJECT_TAG', $username);
|
||||||
|
@ -2619,12 +2631,16 @@ function mailbox($_action, $_type, $_data = null, $attr = null) {
|
||||||
$_data = $_SESSION['mailcow_cc_username'];
|
$_data = $_SESSION['mailcow_cc_username'];
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if ($redis->hGet('RCPT_WANTS_SUBJECT_TAG', $_data)) {
|
$wants_subject_tag = $redis->hGet('RCPT_WANTS_SUBJECT_TAG', $_data);
|
||||||
|
if ($wants_subject_tag == 1) {
|
||||||
return "subject";
|
return "subject";
|
||||||
}
|
}
|
||||||
else {
|
elseif ($wants_subject_tag == 2) {
|
||||||
return "subfolder";
|
return "subfolder";
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
return "none";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (RedisException $e) {
|
catch (RedisException $e) {
|
||||||
$_SESSION['return'] = array(
|
$_SESSION['return'] = array(
|
||||||
|
@ -3709,4 +3725,4 @@ function mailbox($_action, $_type, $_data = null, $attr = null) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,6 +176,7 @@ $lang['user']['misc_delete_profile'] = 'Sonstige Kontoeinstellungen';
|
||||||
$lang['user']['tag_handling'] = 'Umgang mit getaggten E-Mails steuern';
|
$lang['user']['tag_handling'] = 'Umgang mit getaggten E-Mails steuern';
|
||||||
$lang['user']['tag_in_subfolder'] = 'In Unterordner';
|
$lang['user']['tag_in_subfolder'] = 'In Unterordner';
|
||||||
$lang['user']['tag_in_subject'] = 'In Betreff';
|
$lang['user']['tag_in_subject'] = 'In Betreff';
|
||||||
|
$lang['user']['tag_in_none'] = 'Nichts tun';
|
||||||
$lang['user']['tag_help_explain'] = 'Als Unterordner: Es wird ein Ordner mit dem Namen des Tags unterhalb der Inbox erstellt ("INBOX/Facebook").<br>
|
$lang['user']['tag_help_explain'] = 'Als Unterordner: Es wird ein Ordner mit dem Namen des Tags unterhalb der Inbox erstellt ("INBOX/Facebook").<br>
|
||||||
In Betreff: Der Name des Tags wird dem Betreff angefügt, etwa "[Facebook] Meine Neuigkeiten".';
|
In Betreff: Der Name des Tags wird dem Betreff angefügt, etwa "[Facebook] Meine Neuigkeiten".';
|
||||||
$lang['user']['tag_help_example'] = 'Beispiel für eine getaggte E-Mail-Adresse: ich<b>+Facebook</b>@example.org';
|
$lang['user']['tag_help_example'] = 'Beispiel für eine getaggte E-Mail-Adresse: ich<b>+Facebook</b>@example.org';
|
||||||
|
@ -576,6 +577,7 @@ $lang['admin']['merged_vars_hint'] = 'Ausgegraute Zeilen wurden aus der Datei <c
|
||||||
$lang['mailbox']['waiting'] = "Wartend";
|
$lang['mailbox']['waiting'] = "Wartend";
|
||||||
$lang['mailbox']['status'] = "Status";
|
$lang['mailbox']['status'] = "Status";
|
||||||
$lang['mailbox']['running'] = "In Ausführung";
|
$lang['mailbox']['running'] = "In Ausführung";
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
$lang['admin']['ui_texts'] = "UI Label und Texte";
|
$lang['admin']['ui_texts'] = "UI Label und Texte";
|
||||||
$lang['admin']['help_text'] = "Hilfstext unter Login-Maske (HTML zulässig)";
|
$lang['admin']['help_text'] = "Hilfstext unter Login-Maske (HTML zulässig)";
|
||||||
|
@ -652,3 +654,5 @@ $lang['mailbox']['bcc_to_rcpt'] = "Map empfängerabhängig verwenden";
|
||||||
$lang['mailbox']['add_bcc_entry'] = "BCC-Eintrag hinzufügen";
|
$lang['mailbox']['add_bcc_entry'] = "BCC-Eintrag hinzufügen";
|
||||||
$lang['mailbox']['bcc_info'] = "Eine empfängerabhängige Map wird verwendet, wenn die BCC-Map Eintragung auf den Eingang einer E-Mail auf das lokale Ziel reagieren soll. Senderabhängige Maps verfahren nach dem gleichen Prinzip.<br/>
|
$lang['mailbox']['bcc_info'] = "Eine empfängerabhängige Map wird verwendet, wenn die BCC-Map Eintragung auf den Eingang einer E-Mail auf das lokale Ziel reagieren soll. Senderabhängige Maps verfahren nach dem gleichen Prinzip.<br/>
|
||||||
Das lokale Ziel wird bei Fehlzustellungen an ein BCC-Ziel nicht informiert.";
|
Das lokale Ziel wird bei Fehlzustellungen an ein BCC-Ziel nicht informiert.";
|
||||||
|
=======
|
||||||
|
>>>>>>> subject_none
|
||||||
|
|
|
@ -175,6 +175,7 @@ $lang['user']['misc_delete_profile'] = 'Other profile settings';
|
||||||
$lang['user']['tag_handling'] = 'Set handling for tagged mail';
|
$lang['user']['tag_handling'] = 'Set handling for tagged mail';
|
||||||
$lang['user']['tag_in_subfolder'] = 'In subfolder';
|
$lang['user']['tag_in_subfolder'] = 'In subfolder';
|
||||||
$lang['user']['tag_in_subject'] = 'In subject';
|
$lang['user']['tag_in_subject'] = 'In subject';
|
||||||
|
$lang['user']['tag_in_none'] = 'Do nothing';
|
||||||
$lang['user']['tag_help_explain'] = 'In subfolder: a new subfolder named after the tag will be created below INBOX ("INBOX/Facebook").<br>
|
$lang['user']['tag_help_explain'] = 'In subfolder: a new subfolder named after the tag will be created below INBOX ("INBOX/Facebook").<br>
|
||||||
In subject: the tags name will be prepended to the mails subject, example: "[Facebook] My News".';
|
In subject: the tags name will be prepended to the mails subject, example: "[Facebook] My News".';
|
||||||
$lang['user']['tag_help_example'] = 'Example for a tagged email address: me<b>+Facebook</b>@example.org';
|
$lang['user']['tag_help_example'] = 'Example for a tagged email address: me<b>+Facebook</b>@example.org';
|
||||||
|
|
|
@ -144,6 +144,7 @@ $lang['user']['misc_delete_profile'] = 'Otras configuraciones de usuario';
|
||||||
$lang['user']['tag_handling'] = 'Establecer manejo para el correo etiquetado';
|
$lang['user']['tag_handling'] = 'Establecer manejo para el correo etiquetado';
|
||||||
$lang['user']['tag_in_subfolder'] = 'En subcarpeta';
|
$lang['user']['tag_in_subfolder'] = 'En subcarpeta';
|
||||||
$lang['user']['tag_in_subject'] = 'En asunto';
|
$lang['user']['tag_in_subject'] = 'En asunto';
|
||||||
|
$lang['user']['tag_in_none'] = 'Hacer nada';
|
||||||
$lang['user']['tag_help_explain'] = 'En subcarpeta: una nueva subcarpeta llamada como la etiqueta será creada debajo de INBOX ("INBOX/Facebook").<br>
|
$lang['user']['tag_help_explain'] = 'En subcarpeta: una nueva subcarpeta llamada como la etiqueta será creada debajo de INBOX ("INBOX/Facebook").<br>
|
||||||
En asunto: los nombres de las etiquetas serán añadidos al asunto de los correos, ejemplo: "[Facebook] Mis Noticias".';
|
En asunto: los nombres de las etiquetas serán añadidos al asunto de los correos, ejemplo: "[Facebook] Mis Noticias".';
|
||||||
$lang['user']['tag_help_example'] = 'Ejemplo de una dirección email etiquetada: mi<b>+Facebook</b>@ejemplo.org';
|
$lang['user']['tag_help_example'] = 'Ejemplo de una dirección email etiquetada: mi<b>+Facebook</b>@ejemplo.org';
|
||||||
|
|
|
@ -167,6 +167,7 @@ $lang['user']['misc_delete_profile'] = "Autre paramètres de profil";
|
||||||
$lang['user']['tag_handling'] = "Définir la gestion des courriel étiquetés";
|
$lang['user']['tag_handling'] = "Définir la gestion des courriel étiquetés";
|
||||||
$lang['user']['tag_in_subfolder'] = "Dans un sous-dossier";
|
$lang['user']['tag_in_subfolder'] = "Dans un sous-dossier";
|
||||||
$lang['user']['tag_in_subject'] = "Dans l'objet";
|
$lang['user']['tag_in_subject'] = "Dans l'objet";
|
||||||
|
$lang['user']['tag_in_none'] = "Ne fais rien";
|
||||||
$lang['user']['tag_help_explain'] = "Dans un sous-dossier : a nouveau sous-dossier portant le nom de l'étiquette sera crée sous INBOX (\"INBOX/Facebook\").<br>Dans l'objet : le nom de l'étiquette sera accolé à l'objet du courriel. Par exemple : \"[Facebook] Mes Nouvelles\".";
|
$lang['user']['tag_help_explain'] = "Dans un sous-dossier : a nouveau sous-dossier portant le nom de l'étiquette sera crée sous INBOX (\"INBOX/Facebook\").<br>Dans l'objet : le nom de l'étiquette sera accolé à l'objet du courriel. Par exemple : \"[Facebook] Mes Nouvelles\".";
|
||||||
$lang['user']['tag_help_example'] = "Exemple pour une adresse de courriel étiquetée : moi<b>+Facebook</b>@exemple.org";
|
$lang['user']['tag_help_example'] = "Exemple pour une adresse de courriel étiquetée : moi<b>+Facebook</b>@exemple.org";
|
||||||
$lang['user']['eas_reset'] = "Réinitialiser le cache de l'appareil ActiveSync";
|
$lang['user']['eas_reset'] = "Réinitialiser le cache de l'appareil ActiveSync";
|
||||||
|
|
|
@ -167,6 +167,7 @@ $lang['user']['misc_delete_profile'] = 'Impostazioni di altri profili';
|
||||||
$lang['user']['tag_handling'] = 'Imposta le gestione della mail evidenziate';
|
$lang['user']['tag_handling'] = 'Imposta le gestione della mail evidenziate';
|
||||||
$lang['user']['tag_in_subfolder'] = 'Nella sotto cartella';
|
$lang['user']['tag_in_subfolder'] = 'Nella sotto cartella';
|
||||||
$lang['user']['tag_in_subject'] = 'Nell\'oggetto';
|
$lang['user']['tag_in_subject'] = 'Nell\'oggetto';
|
||||||
|
$lang['user']['tag_in_none'] = "Fare niente";
|
||||||
$lang['user']['tag_help_explain'] = 'In sotto cartelle: Una nuova cartella dal nome del tag verrà creata sotto INBOX ("INBOX/Facebook").<br />
|
$lang['user']['tag_help_explain'] = 'In sotto cartelle: Una nuova cartella dal nome del tag verrà creata sotto INBOX ("INBOX/Facebook").<br />
|
||||||
Nell\'oggetto: Il nome del tag verrà aggiunto all\'inizio dell\'oggetto mail, esempio: "[Facebook] Meine Neuigkeiten".';
|
Nell\'oggetto: Il nome del tag verrà aggiunto all\'inizio dell\'oggetto mail, esempio: "[Facebook] Meine Neuigkeiten".';
|
||||||
$lang['user']['tag_help_example'] = 'Esempio di mail con tag: ich<b>+Facebook</b>@example.org';
|
$lang['user']['tag_help_example'] = 'Esempio di mail con tag: ich<b>+Facebook</b>@example.org';
|
||||||
|
|
|
@ -140,6 +140,7 @@ $lang['user']['misc_delete_profile'] = 'Andere profielinstellingen';
|
||||||
$lang['user']['tag_handling'] = 'Omgaan met e-mail tags';
|
$lang['user']['tag_handling'] = 'Omgaan met e-mail tags';
|
||||||
$lang['user']['tag_in_subfolder'] = 'In onderliggende map';
|
$lang['user']['tag_in_subfolder'] = 'In onderliggende map';
|
||||||
$lang['user']['tag_in_subject'] = 'In onderwerp';
|
$lang['user']['tag_in_subject'] = 'In onderwerp';
|
||||||
|
$lang['user']['tag_in_none'] = 'Niets doen';
|
||||||
$lang['user']['tag_help_explain'] = 'In onderliggende map: maakt onder INBOX een nieuwe map aan met de naam van de tag (bijv.: "INBOX/Facebook").<br>
|
$lang['user']['tag_help_explain'] = 'In onderliggende map: maakt onder INBOX een nieuwe map aan met de naam van de tag (bijv.: "INBOX/Facebook").<br>
|
||||||
In onderwerp: de tag wordt vóór het oorspronkelijke e-mail onderwerp geplaatst (bijv.: "[Facebook] Mijn nieuws").';
|
In onderwerp: de tag wordt vóór het oorspronkelijke e-mail onderwerp geplaatst (bijv.: "[Facebook] Mijn nieuws").';
|
||||||
$lang['user']['tag_help_example'] = 'Voorbeeld van een e-mailadres met tag: ik<b>+Facebook</b>@voorbeeld.org';
|
$lang['user']['tag_help_example'] = 'Voorbeeld van een e-mailadres met tag: ik<b>+Facebook</b>@voorbeeld.org';
|
||||||
|
|
|
@ -169,6 +169,7 @@ $lang['user']['misc_delete_profile'] = 'Ustawienia innego profilu';
|
||||||
$lang['user']['tag_handling'] = 'Ustaw obsługę znaczników pocztowych';
|
$lang['user']['tag_handling'] = 'Ustaw obsługę znaczników pocztowych';
|
||||||
$lang['user']['tag_in_subfolder'] = 'W podfolderze';
|
$lang['user']['tag_in_subfolder'] = 'W podfolderze';
|
||||||
$lang['user']['tag_in_subject'] = 'W temacie';
|
$lang['user']['tag_in_subject'] = 'W temacie';
|
||||||
|
$lang['user']['tag_in_none'] = 'Nic nie robić';
|
||||||
$lang['user']['tag_help_explain'] = 'W podfolderze: tworzy nowy podfolder z nazwą taką jak etykieta, który zostanie umieszczony pod Skrzynką odbiorczą ("Skrzynka odbiorcza/Facebook").<br>
|
$lang['user']['tag_help_explain'] = 'W podfolderze: tworzy nowy podfolder z nazwą taką jak etykieta, który zostanie umieszczony pod Skrzynką odbiorczą ("Skrzynka odbiorcza/Facebook").<br>
|
||||||
W temacie: nazwy etykiet zostaną dodane na początku tematów wiadomości, np.: "[Facebook] Moje wiadomości".';
|
W temacie: nazwy etykiet zostaną dodane na początku tematów wiadomości, np.: "[Facebook] Moje wiadomości".';
|
||||||
$lang['user']['tag_help_example'] = 'Przykład adresu email z etykietą: ja<b>+Facebook</b>@example.org';
|
$lang['user']['tag_help_example'] = 'Przykład adresu email z etykietą: ja<b>+Facebook</b>@example.org';
|
||||||
|
|
|
@ -167,6 +167,7 @@ $lang['user']['misc_delete_profile'] = 'Другие настройки проф
|
||||||
$lang['user']['tag_handling'] = 'Set handling for tagged mail';
|
$lang['user']['tag_handling'] = 'Set handling for tagged mail';
|
||||||
$lang['user']['tag_in_subfolder'] = 'В подпапку';
|
$lang['user']['tag_in_subfolder'] = 'В подпапку';
|
||||||
$lang['user']['tag_in_subject'] = 'В теме';
|
$lang['user']['tag_in_subject'] = 'В теме';
|
||||||
|
$lang['user']['tag_in_none'] = 'Ничего не делать';
|
||||||
$lang['user']['tag_help_explain'] = 'In subfolder: a new subfolder named after the tag will be created below INBOX ("INBOX/Facebook").<br>
|
$lang['user']['tag_help_explain'] = 'In subfolder: a new subfolder named after the tag will be created below INBOX ("INBOX/Facebook").<br>
|
||||||
In subject: the tags name will be prepended to the mails subject, example: "[Facebook] Meine Neuigkeiten".';
|
In subject: the tags name will be prepended to the mails subject, example: "[Facebook] Meine Neuigkeiten".';
|
||||||
$lang['user']['tag_help_example'] = 'Example for a tagged email address: ich<b>+Facebook</b>@example.org';
|
$lang['user']['tag_help_example'] = 'Example for a tagged email address: ich<b>+Facebook</b>@example.org';
|
||||||
|
|
|
@ -178,6 +178,13 @@ elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == '
|
||||||
data-api-url='edit/delimiter_action'
|
data-api-url='edit/delimiter_action'
|
||||||
data-api-attr='{"tagged_mail_handler":"subject"}'><?=$lang['user']['tag_in_subject'];?></button>
|
data-api-attr='{"tagged_mail_handler":"subject"}'><?=$lang['user']['tag_in_subject'];?></button>
|
||||||
|
|
||||||
|
<button type="button" class="btn btn-sm btn-default <?=($get_tagging_options == "none") ? 'active' : null; ?>"
|
||||||
|
id="edit_selected"
|
||||||
|
data-item="<?= $username; ?>"
|
||||||
|
data-id="delimiter_action"
|
||||||
|
data-api-url='edit/delimiter_action'
|
||||||
|
data-api-attr='{"tagged_mail_handler":"none"}'><?=$lang['user']['tag_in_none'];?></button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<p class="help-block"><?=$lang['user']['tag_help_explain'];?></p>
|
<p class="help-block"><?=$lang['user']['tag_help_explain'];?></p>
|
||||||
<p class="help-block"><?=$lang['user']['tag_help_example'];?></p>
|
<p class="help-block"><?=$lang['user']['tag_help_example'];?></p>
|
||||||
|
|
Loading…
Reference in New Issue