Commit 61e24d9d authored by Georgios Gousios's avatar Georgios Gousios
Browse files

Email related changes

-Use Django's DEFAULT_FROM_EMAIL configuration setting instead of custom setting
-Send invitations from the DEFAULT_FROM_EMAIL account
parent 1fde71f5
......@@ -3,20 +3,26 @@ README.Upgrade
This file documents the upgrade to newer versions of the Synnefo software.
v0.5.2 -> v0.5.3
NEW SETTINGS
* 30-ui.conf:LOGOUT_URL
* 00-admins.conf:DEFAULT_FROM_EMAIL
* 90-okeanos.conf.sample:LOGOUT_URL
REMOVE SETTINGS
* 00-admins.conf:SYSTEM_EMAIL_ADDR
* 90-okeanos.conf.sample:APP_INSTALL_URL
v0.5.1 -> v0.5.2
NEW SETTINGS
* 10-backend.py:GANETI_CREATEINSTANCE_KWARGS
REMOVE SETTINGS
* 10-backend.conf/GANETI_OS_PROVIDER
* 20-apo.conf/GANETI_DISK_TEMPLATE
* 10-backend.conf:GANETI_OS_PROVIDER
* 20-api.conf:GANETI_DISK_TEMPLATE
BACKEND CHANGES
* Need to patch Ganeti, file:
lib/python2.6/site-packages/ganeti/rapi/rlib2.py
to honor the wait_for_sync flag, see Synnefo #835.
Patch provided under contrib/patches/ganeti-rlib2.py-v0.5.2
v0.5.2 -> v0.5.3
NEW SETTINGS
* 30-ui.conf:LOGOUT_URL
......@@ -245,7 +245,7 @@ def send_invitation(invitation):
_logger.debug("Invitation URL: %s" % email['url'])
send_async(
frm = "%s <%s>"%(invitation.source.realname,invitation.source.uniq),
frm = "%s"%(settings.DEFAULT_FROM_EMAIL),
to = "%s <%s>"%(invitation.target.realname,invitation.target.uniq),
subject = _('Invitation to IaaS service Okeanos'),
body = data
......
......@@ -39,7 +39,7 @@ from synnefo.logic import log
_logger = log.get_logger("synnefo.logic")
def send_async(frm = settings.SYSTEM_EMAIL_ADDR,
def send_async(frm = settings.DEFAULT_FROM_EMAIL,
to = None, subject = None, body = None):
"""
Queue a message to be sent sometime later
......@@ -56,7 +56,7 @@ def send_async(frm = settings.SYSTEM_EMAIL_ADDR,
amqp_connection.send(json.dumps(msg), settings.EXCHANGE_API, routekey)
def send (sender = settings.SYSTEM_EMAIL_ADDR,
def send (sender = settings.DEFAULT_FROM_EMAIL,
recipient = None, subject = None, body = None):
attempts = 0
......
......@@ -16,4 +16,4 @@ EMAIL_HOST_PASSWORD = ""
DEFAULT_CHARSET = 'utf-8'
# Address to use for outgoing emails
SYSTEM_EMAIL_ADDR = "nobody@grnet.gr"
DEFAULT_FROM_EMAIL = "~okeanos <no-reply@grnet.gr>"
\ No newline at end of file
......@@ -23,7 +23,7 @@ FEEDBACK_CONTACTS = (
)
# Email from which the feedback emails will be sent from
FEEDBACK_EMAIL_FROM = SYSTEM_EMAIL_ADDR
FEEDBACK_EMAIL_FROM = DEFAULT_FROM_EMAIL
# URL to redirect user to when he logs out from the ui (if not set
# settings.LOGIN_URL will be used)
......
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