Hi Frank,
On Fri, May 10, 2019 at 07:34:20AM +0000, Frank, Matthias wrote:
my Debian machine running lava-server (2019.04) sends mails via msmtp/ msmtp-mta. Mails from cron or apt work fine. But I got no mails from lava. Even when I submit a test job with a notify statement.
notify: criteria: status: finished recipients:
- to: method: email user: default
verbosity: verbose
The user default uses my real mail address not a system mail address.
This is the Django log:
INFO 2019-05-10 07:18:15,546 notifications [1343] sending email notification to XXXXXXX@YYYYYY.com ERROR 2019-05-10 07:18:15,557 notifications [Errno 99] Cannot assign requested address
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/lava_scheduler_app/notifications.py", line 303, in send_notifications title, body, settings.SERVER_EMAIL, [recipient.email_address] File "/usr/lib/python3/dist-packages/django/core/mail/__init__.py", line 62, in send_mail return mail.send() File "/usr/lib/python3/dist-packages/django/core/mail/message.py", line 348, in send return self.get_connection(fail_silently).send_messages([self]) File "/usr/lib/python3/dist-packages/django/core/mail/backends/smtp.py", line 104, in send_messages new_conn_created = self.open()
File "/usr/lib/python3/dist-packages/django/core/mail/backends/smtp.py", line 64, in open
self.connection = self.connection_class(self.host, self.port, **connection_params)
File "/usr/lib/python3.5/smtplib.py", line 251, in __init__
(code, msg) = self.connect(host, port)
File "/usr/lib/python3.5/smtplib.py", line 335, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "/usr/lib/python3.5/smtplib.py", line 306, in _get_socket
self.source_address)
File "/usr/lib/python3.5/socket.py", line 712, in create_connection
raise err
File "/usr/lib/python3.5/socket.py", line 703, in create_connection
sock.connect(sa)
OSError: [Errno 99] Cannot assign requested address
WARNING 2019-05-10 07:18:15,558 notifications [1343] failed to send email notification to XXXXXXX@YYYYYY.com
Lava has a problem with smtp. Is it necessary to have a complete smtp server on the local machine? Or is there a special smtp configuration?
LAVA expects to use a local MTA of some sort. If you have msmtp installed, then that should do the job as far as I know. Does it have any logs to show what's going on?
My *first* guess would be that you might need to specifically configure things to allow the "lavaserver" user to send mail. For example,
https://wiki.archlinux.org/index.php/Msmtp
talks about per-user config.