Commit 4ffce6ff authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis
Browse files

snf-deploy: Change email backend file location

Change Django's filebased email backend location
from '/var/log/gunicorn/synnefo-mail/' to
'/var/tmp/synnefo-mail/'. We do this due to permission
errors.
parent f209d164
......@@ -26,7 +26,7 @@ lib = /usr/lib/snf-deploy
# dir to store executed commands (to enforce sequential execution)
cmd = /var/run/snf-deploy/cmd
# dir to be used by Django for file-based mail backend
mail_dir = /var/log/gunicorn/synnefo-mails
mail_dir = /var/tmp/synnefo-mails
[keys]
# whether to create new keys
......
......@@ -26,7 +26,7 @@ lib = /usr/lib/snf-deploy
# dir to store executed commands (to enforce sequential execution)
cmd = /var/run/snf-deploy/cmd
# dir to be used by Django for file-based mail backend
mail_dir = /var/log/gunicorn/synnefo-mails
mail_dir = /var/tmp/synnefo-mails
[keys]
# whether to create new keys
......
......@@ -26,7 +26,7 @@ lib = /usr/lib/snf-deploy
# dir to store executed commands (to enforce sequential execution)
cmd = /var/run/snf-deploy/cmd
# dir to be used by Django for file-based mail backend
mail_dir = /var/log/gunicorn/synnefo-mails
mail_dir = /var/tmp/synnefo-mails
[keys]
# whether to create new keys
......
......@@ -583,8 +583,7 @@ def setup_common():
}
custom = customize_settings_from_tmpl(tmpl, replace)
try_put(custom, tmpl, mode=0644)
try_run("mkdir -p {0}; chown root:www-data {0}; chmod 775 {0}".format(
env.env.mail_dir))
try_run("mkdir -p {0}; chmod 777 {0}".format(env.env.mail_dir))
try_run("/etc/init.d/gunicorn restart")
......
ADMINS = (
('okeanos', 'feedback@%DOMAIN%'),
('synnefo', 'feedback@%DOMAIN%'),
)
MANAGERS = ADMINS
HELPDESK = ADMINS
EMAIL_SUBJECT_PREFIX = "['%EMAIL_SUBJECT_PREFIX%'] "
DEFAULT_FROM_EMAIL = "feedback@%DOMAIN%"
SERVER_EMAIL = "root@%HOST%"
CONTACT_EMAIL = "support@%DOMAIN%"
EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
EMAIL_FILE_PATH = "%MAIL_DIR%"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment