Can't setup email account any more

My email notifications (through Sendgrid) have stopped working and I cannot seem to connect any account in the email account setup page anymore.

Hi @ishanloya,

when you say you cannot connect any account, do you see any error (error details?) or can you set all values but on testing no emails are sent?

Hi @lasalesi

There are no errors. When I set up a new account, nothing happens for a while and then the request times out.
Following is from the error log:

[Errno 110] Connection timed out
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/queue.py", line 420, in send_one
    smtpserver.sess.sendmail(email.sender, recipient.recipient, encode(message))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py", line 208, in sess
    raise_(frappe.ValidationError, e, traceback)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/email/smtp.py", line 181, in sess
    cint(self.port) or None)
  File "/usr/lib/python2.7/smtplib.py", line 256, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python2.7/smtplib.py", line 316, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/lib/python2.7/smtplib.py", line 291, in _get_socket
    return socket.create_connection((host, port), timeout)
  File "/usr/lib/python2.7/socket.py", line 575, in create_connection
    raise err
ValidationError: [Errno 110] Connection timed out  

Thanks

It it helps, I ran an apt-get update/upgrade followed by apt autoremove which seems to be causing this issue. Here is my apt/history.log output:

Start-Date: 2018-01-17  02:06:01
Commandline: apt-get upgrade
Requested-By: frappe (1000)
Upgrade: libseccomp2:amd64 (2.2.3-3ubuntu3, 2.3.1-2.1ubuntu2~16.04.1), libdrm-nouveau2:amd64 (2.4.76-1~ubuntu16.04.1, 2.4.83-1~16.04.1), grub-common:amd64 (2.02~beta2-36ubuntu3.14, 2.02~beta2-36ubuntu3.15), libglapi-mesa:amd64 (17.0.7-0ubuntu0.16.04.2, 17.2.4-0ubuntu1~16.04.2), squashfs-tools:amd64 (1:4.3-3ubuntu2, 1:4.3-3ubuntu2.16.04.1), nodejs:amd64 (6.12.2-1nodesource1, 6.12.3-1nodesource1), grub2-common:amd64 (2.02~beta2-36ubuntu3.14, 2.02~beta2-36ubuntu3.15), grub-pc:amd64 (2.02~beta2-36ubuntu3.14, 2.02~beta2-36ubuntu3.15), grub-pc-bin:amd64 (2.02~beta2-36ubuntu3.14, 2.02~beta2-36ubuntu3.15), distro-info-data:amd64 (0.28ubuntu0.6, 0.28ubuntu0.7), libgl1-mesa-glx:amd64 (17.0.7-0ubuntu0.16.04.2, 17.2.4-0ubuntu1~16.04.2), unattended-upgrades:amd64 (0.90ubuntu0.8, 0.90ubuntu0.9), libdrm-intel1:amd64 (2.4.76-1~ubuntu16.04.1, 2.4.83-1~16.04.1), libdrm-radeon1:amd64 (2.4.76-1~ubuntu16.04.1, 2.4.83-1~16.04.1)
End-Date: 2018-01-17  02:06:24

Start-Date: 2018-01-17  02:13:28
Commandline: apt autoremove
Requested-By: frappe (1000)
Remove: linux-headers-4.4.0-103:amd64 (4.4.0-103.126), linux-image-4.4.0-103-generic:amd64 (4.4.0-103.126), linux-image-4.4.0-98-generic:amd64 (4.4.0-98.121), linux-headers-4.4.0-98-generic:amd64 (4.4.0-98.121), linux-headers-4.4.0-98:amd64 (4.4.0-98.121), linux-headers-4.4.0-103-generic:amd64 (4.4.0-103.126)
End-Date: 2018-01-17  02:13:36

Seems to have been a problem with DigitalOcean