Remove SMTP Env Variables

This commit is contained in:
iamEvan 2024-05-28 12:39:40 +01:00
parent 7c0c1e6cf8
commit d4f6a86a57
2 changed files with 0 additions and 78 deletions

View File

@ -478,14 +478,6 @@ public function extraFields()
$DATABASE_URL = $this->environment_variables()->where('key', 'DATABASE_URL')->first();
$ADMIN_TOKEN = $this->environment_variables()->where('key', 'SERVICE_PASSWORD_64_ADMIN')->first();
$SMTP_HOST = $this->environment_variables()->where('key', 'SMTP_HOST')->first();
$SMTP_FROM_EMAIL = $this->environment_variables()->where('key', 'SMTP_FROM_EMAIL')->first();
$SMTP_FROM_NAME = $this->environment_variables()->where('key', 'SMTP_FROM_NAME')->first();
$SMTP_USERNAME = $this->environment_variables()->where('key', 'SMTP_USERNAME')->first();
$SMTP_PASSWORD = $this->environment_variables()->where('key', 'SMTP_PASS')->first();
$SMTP_SECURITY = $this->environment_variables()->where('key', 'SMTP_SECURITY')->first();
$SMTP_PORT = $this->environment_variables()->where('key', 'SMTP_PORT')->first();
$PUSH_ENABLED = $this->environment_variables()->where('key', 'PUSH_ENABLED')->first();
$PUSH_INSTALLATION_ID = $this->environment_variables()->where('key', 'PUSH_SERVICE_ID')->first();
$PUSH_INSTALLATION_KEY = $this->environment_variables()->where('key', 'PUSH_SERVICE_KEY')->first();
@ -508,68 +500,6 @@ public function extraFields()
]);
}
if ($SMTP_HOST) {
$data = $data->merge([
'Mail Host' => [
'key' => data_get($SMTP_HOST, 'key'),
'value' => data_get($SMTP_HOST, 'value'),
'rules' => 'nullable|url',
],
]);
}
if ($SMTP_FROM_EMAIL) {
$data = $data->merge([
'From Email' => [
'key' => data_get($SMTP_FROM_EMAIL, 'key'),
'value' => data_get($SMTP_FROM_EMAIL, 'value'),
'rules' => 'nullable|email',
],
]);
}
if ($SMTP_FROM_NAME) {
$data = $data->merge([
'From Name' => [
'key' => data_get($SMTP_FROM_NAME, 'key'),
'value' => data_get($SMTP_FROM_NAME, 'value'),
],
]);
}
if ($SMTP_USERNAME) {
$data = $data->merge([
'Mail User' => [
'key' => data_get($SMTP_USERNAME, 'key'),
'value' => data_get($SMTP_USERNAME, 'value'),
],
]);
}
if ($SMTP_PASSWORD) {
$data = $data->merge([
'Maill Password' => [
'key' => data_get($SMTP_PASSWORD, 'key'),
'value' => data_get($SMTP_PASSWORD, 'value'),
'isPassword' => true,
],
]);
}
if ($SMTP_SECURITY) {
$data = $data->merge([
'Mail Security' => [
'key' => data_get($SMTP_SECURITY, 'key'),
'value' => data_get($SMTP_SECURITY, 'value'),
'rules' => 'nullable|string|in:starttls,force_tls,off',
],
]);
}
if ($SMTP_PORT) {
$data = $data->merge([
'Mail Port' => [
'key' => data_get($SMTP_PORT, 'key'),
'value' => data_get($SMTP_PORT, 'value'),
'rules' => 'nullable|integer',
],
]);
}
if ($PUSH_ENABLED) {
$data = $data->merge([
'Push Enabled' => [

View File

@ -12,14 +12,6 @@ services:
- DATABASE_URL=${VAULTWARDEN_DB_URL:-data/db.sqlite3}
- SIGNUPS_ALLOWED=${SIGNUP_ALLOWED:-true}
- ADMIN_TOKEN=${SERVICE_PASSWORD_64_ADMIN}
- SMTP_HOST=${SMTP_HOST}
- SMTP_FROM=${SMTP_FROM_EMAIL}
- SMTP_FROM_NAME=${SMTP_FROM_NAME:-Vaultwarden}
- SMTP_USERNAME=${SMTP_USER}
- SMTP_PASSWORD=${SMTP_PASS}
- SMTP_SECURITY=${SMTP_SECURITY:-starttls}
- SMTP_PORT=${SMTP_PORT}
- SMTP_TIMEOUT=15
- IP_HEADER=X-Forwarded-For
- PUSH_ENABLED=${PUSH_ENABLED:-false}
- PUSH_INSTALLATION_ID=${PUSH_SERVICE_ID}