Howto set smtp sender address?

Hi,

I noticed I don’t get emails from my fresh installation of indico 2.0. The reason is our smtp server rejects emails when the sender address is unknown, and indico tries to send emails as logger@serverxx.com.

My indico configuration has

SUPPORT_EMAIL = 'support@xxx.xxx'
PUBLIC_SUPPORT_EMAIL = ''
NO_REPLY_EMAIL = 'support@xxx.xxx'

I thought the no-reply address would be used by the logger but it’s not. Is there a configuration option for this ?

The full error block in /var/log/messages is:

May 14 10:56:02 server uwsgi: Traceback (most recent call last):
May 14 10:56:02 server uwsgi: File "/opt/indico/.venv/lib/python2.7/site-packages/indico/core/logger.py", line 89, in emit
May 14 10:56:02 server uwsgi: smtp.sendmail(self.fromaddr, self.toaddrs, msg.as_string()) 
May 14 10:56:02 server uwsgi: File "/usr/lib64/python2.7/smtplib.py", line 746, in sendmail
May 14 10:56:02 server uwsgi: raise SMTPRecipientsRefused(senderrs)
May 14 10:56:02 server uwsgi: SMTPRecipientsRefused: {u'support@xxx.xxx': (554, '5.7.1 <logger@serverxx.com>: Sender address rejected: Access denied')}

Thanks !

You can set a fromaddr in logging.yaml for the email handler. By default indico uses logger@WORKER_NAME as the sender for log emails.