Skip to content

Commit

Permalink
Merge pull request #15 from NethServer/sdl-6895-no_automatic_Importation
Browse files Browse the repository at this point in the history
Remove import-email-to-piler service and script NethServer/dev#6895
  • Loading branch information
stephdl authored May 14, 2024
2 parents 5a8271a + 8f1385a commit f6b34b4
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 62 deletions.
9 changes: 0 additions & 9 deletions imageroot/actions/configure-module/91import-email

This file was deleted.

3 changes: 0 additions & 3 deletions imageroot/actions/get-configuration/20read
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ is_found_auditor = "$1$SLIIIS$JMBwGqQg4lIir2P2YU1y.0" in output.stdout
config['is_default_password_admin'] = True if is_found_admin else False
config['is_default_password_auditor'] = True if is_found_auditor else False

import_running = subprocess.run(['systemctl', '--user', 'is-active', "import-email-to-piler.service"], capture_output=True, text=True)
config['import_email_is_running'] = True if import_running.stdout.strip() == 'active' else False

# get the mail server module uuid
providers = agent.list_service_providers(rdb, 'imap', 'tcp', {
'module_uuid': os.getenv("MAIL_SERVER", ""),
Expand Down
11 changes: 2 additions & 9 deletions imageroot/actions/get-configuration/validate-output.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"lets_encrypt": true,
"mail_server": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"is_default_password_admin": false,
"is_default_password_auditor": false,
"import_email_is_running": false
"is_default_password_auditor": false
}
],
"type": "object",
Expand All @@ -21,8 +20,7 @@
"lets_encrypt",
"mail_server",
"is_default_password_admin",
"is_default_password_auditor",
"import_email_is_running"
"is_default_password_auditor"
],
"properties": {
"host": {
Expand Down Expand Up @@ -54,11 +52,6 @@
"type": "boolean",
"title": "Default password",
"description": "True if the password is the default one"
},
"import_email_is_running": {
"type": "boolean",
"title": "Import email is running",
"description": "True if the import email is running"
}
}
}
12 changes: 0 additions & 12 deletions imageroot/systemd/user/import-email-to-piler.service

This file was deleted.

3 changes: 0 additions & 3 deletions ui/public/i18n/language.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
"password_warning": "Change {user} password",
"password_warning_description": "The default password \"{password}\" of \"{user}\" must be changed",
"open_piler": "Open Piler",
"import_email_is_running_warning": "Import emails is running",
"import_email_is_running_description": "Please wait until the import emails action is finished",
"import_email_to_piler": "Import emails to Piler",
"advanced": "Advanced",
"import_old_emails_to_piler_description": "Import old emails to Piler, this process may take a long time",
"always_bcc_is_already_set": "Always BCC is already set in the server, you need to manually remove it (POSTFIX_ALWAYS_BCC)",
Expand Down
26 changes: 0 additions & 26 deletions ui/src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,6 @@
/>
</cv-column>
</cv-row>
<cv-row v-if="import_email_is_running">
<cv-column>
<NsInlineNotification
kind="warning"
:title="$t('settings.import_email_is_running_warning')"
:description="$t('settings.import_email_is_running_description')"
:showCloseButton="false"
/>
</cv-column>
</cv-row>
<cv-row>
<cv-column>
<cv-tile light>
Expand Down Expand Up @@ -134,16 +124,6 @@
{{ $t("settings.choose_the_mail_server_to_use") }}
</template>
</NsComboBox>
<cv-row v-if="error.importEmailToPiler">
<cv-column>
<NsInlineNotification
kind="error"
:title="$t('action.importEmailToPiler')"
:description="error.importEmailToPiler"
:showCloseButton="false"
/>
</cv-column>
</cv-row>
<cv-row v-if="error.configureModule">
<cv-column>
<NsInlineNotification
Expand Down Expand Up @@ -172,7 +152,6 @@
<script>
import to from "await-to-js";
import { mapState } from "vuex";
import Play20 from "@carbon/icons-vue/es/play--outline/20";
import {
QueryParamService,
UtilService,
Expand All @@ -198,12 +177,10 @@ export default {
q: {
page: "settings",
},
Play20,
urlCheckInterval: null,
host: "",
mail_server: "",
mail_server_URL: [],
import_email_is_running: false,
piler_is_running: false,
always_bcc_correctly_set: false,
is_default_password_admin: false,
Expand All @@ -213,10 +190,8 @@ export default {
loading: {
getConfiguration: false,
configureModule: false,
importEmailToPiler: false,
},
error: {
importEmailToPiler: "",
getConfiguration: "",
configureModule: "",
host: "",
Expand Down Expand Up @@ -300,7 +275,6 @@ export default {
this.mail_server_URL = config.mail_server_URL;
this.is_default_password_admin = config.is_default_password_admin;
this.is_default_password_auditor = config.is_default_password_auditor;
this.import_email_is_running = config.import_email_is_running;
this.piler_is_running = config.piler_is_running;
this.always_bcc_correctly_set = config.always_bcc_correctly_set;
this.loading.getConfiguration = false;
Expand Down

0 comments on commit f6b34b4

Please sign in to comment.