Closed Bug 624755 Opened 14 years ago Closed 13 years ago

[traceback] SMTPRecipientsRefused errors during registration

Categories

(support.mozilla.org :: Users and Groups, task)

task
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jsocol, Assigned: paulc)

References

Details

(Whiteboard: [qa-])

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
Summary: [traceback] Email errors during registration → [traceback] SMTPRecipientsRefused errors during registration
Target Milestone: --- → 2.5
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: nobody → paulc
Target Milestone: 2011Q1 → 2.6
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
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
Forgot to delete the user after email sending fails to free up username. Patch up for review.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Now deletes user as well:
https://github.com/jsocol/kitsune/commit/c697b73b4f45f685bb4b54dabdcc21aa6ae2f1ec
Status: REOPENED → RESOLVED
Closed: 13 years ago13 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.