ossobv / pstore

Python Protected Password Store (django server + cli interface) using client side GPG encryption
42 stars 3 forks source link

SMTP error when adding public key #20

Open wdoekes opened 7 years ago

wdoekes commented 7 years ago
  File "/srv/virtualenvs/pstore/local/lib/python2.7/site-packages/django/contrib/admin/options.py", line 742, in save_model
    obj.save()

  File "./pstore/models.py", line 104, in save
    notify_publickey_change(self.original, self)

  File "./pstore/notify.py", line 184, in notify_publickey_change
    send_mail(subject, flatbody, fromaddr, toaddrs)
...
  File "/srv/virtualenvs/pstore/local/lib/python2.7/site-packages/django/core/mail/backends/smtp.py", line 110, in _send
    email_message.message().as_string())

  File "/usr/lib/python2.7/smtplib.py", line 747, in sendmail
    raise SMTPRecipientsRefused(senderrs)

SMTPRecipientsRefused: {'': (501, '5.1.3 Bad recipient address syntax')}

when changing a public key / setting description for a public key that does not have a user with a valid email address (User.email='')