If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[traceback] SMTPRecipientsRefused errors during registration

VERIFIED FIXED in 2.6

Status

support.mozilla.org
Users and Groups
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: jsocol, Assigned: paulc)

Tracking

unspecified

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

(Reporter)

Description

7 years ago
I know we get SMTPRecipientsRefused errors from almost anywhere that sends email, but in the case of registration, I think we should specifically handle it with an error message and a note that the email address used could not be reached.

Maybe we should show an error and delete the record, to free up the username. It's pretty complex to explain why it failed, and if there was a typo in the email address, it can't be fixed without admin intervention.

Deleting the User object lets the user try again with a different email address.

=========

Here's the stack trace again:

Traceback (most recent call last):

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/support.mozilla.com/kitsune/apps/sumo/decorators.py", line 15, in _checkssl
    return view_func(request, *args, **kwargs)

  File "/data/www/support.mozilla.com/kitsune/apps/access/decorators.py", line 46, in _wrapped_view
    return view_fn(request, *args, **kwargs)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/views/decorators/http.py", line 37, in inner
    return func(request, *args, **kwargs)

  File "/data/www/support.mozilla.com/kitsune/apps/users/views.py", line 55, in register
    form = handle_register(request)

  File "/data/www/support.mozilla.com/kitsune/apps/users/utils.py", line 31, in handle_register
    form.cleaned_data['email'])

  File "/data/www/support.mozilla.com/kitsune/apps/users/models.py", line 135, in create_inactive_user
    [new_user.email])

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/core/mail/__init__.py", line 61, in send_mail
    connection=connection).send()

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/core/mail/message.py", line 175, in send
    return self.get_connection(fail_silently).send_messages([self])

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/core/mail/backends/smtp.py", line 85, in send_messages
    sent = self._send(message)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/core/mail/backends/smtp.py", line 101, in _send
    email_message.message().as_string())

  File "/usr/lib64/python2.6/smtplib.py", line 709, in sendmail
    raise SMTPRecipientsRefused(senderrs)

SMTPRecipientsRefused
(Reporter)

Updated

7 years ago
Summary: [traceback] Email errors during registration → [traceback] SMTPRecipientsRefused errors during registration
(Reporter)

Updated

7 years ago
Target Milestone: --- → 2.5
(Reporter)

Comment 1

7 years ago
As much as it pains me to do this, we need to focus on notifications right now.

SMTPRecipientsRefused => 2011Q1.

/sigh
Target Milestone: 2.5 → 2011Q1
(Assignee)

Updated

7 years ago
Assignee: nobody → paulc
Target Milestone: 2011Q1 → 2.6
(Assignee)

Comment 2

7 years ago
https://github.com/jsocol/kitsune/commit/211b95e048355f159da99da233f6e15f4a762aa5

I've no idea how to QA these, except perhaps try some of the emails we've seen as rejected, but what if it does work and we're accidentally registering users??

We'll know it works if the stack traces stop.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
(Assignee)

Comment 3

7 years ago
Forgot to delete the user after email sending fails to free up username. Patch up for review.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(Assignee)

Comment 4

7 years ago
Now deletes user as well:
https://github.com/jsocol/kitsune/commit/c697b73b4f45f685bb4b54dabdcc21aa6ae2f1ec
Status: REOPENED → RESOLVED
Last Resolved: 7 years ago7 years ago
Resolution: --- → FIXED
Closed as [qa-]
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.