email doesn't work in 4.0.10 ?

48 views
Skip to first unread message

Shubha Ramani

unread,
Sep 14, 2022, 8:16:26 PM9/14/22
to Review Board Community
I used the exact same settings in 4.0.4. When a  " Send a test e-mail after saving" i do not get mail. It seems like ReviewBoard email is broken on 4.0.10. 

To test it I did the following:
Changed the mailserver to localhost and the port to 9025 under E-MAIL SERVER SETTINGS, then

socat -v TCP-LISTEN:9025,fork TCP:<my_mail_server>:25

I see zero traffic. 

As I said the same settings used to work in 4.0.4.

Thanks,

Shubha


Christian Hammond

unread,
Sep 15, 2022, 8:11:09 PM9/15/22
to revie...@googlegroups.com
Hi Shubha,

We haven't seen reports of e-mail being broken, or encountered it ourselves. Does it only fail with the test e-mails, or are you also seeing a lack of e-mails from review request activity?

What e-mail server software are you using?

Do you have a support contract with us, so we can work with you on some debug builds?

Christian

--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/3c418c55-f406-4ac5-ad07-ec905851efcen%40googlegroups.com.


--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Shubha Ramani

unread,
Sep 15, 2022, 9:38:39 PM9/15/22
to Review Board Community
Hi Christian. I figured out what the problem was by setting breakpoints in https://github.com/reviewboard/reviewboard/blob/aa089e9ec3140076c18c85a160744b833008662c/reviewboard/admin/forms/email_settings.py

(I set breakpoints in the email_settings.py in my 4.0.10 virtual environment)

Here is what I found:
 request.user.email is blank !
We are using LDAP for authentication.

Below is my pdb debug:

if request and request.user.is_authenticated:

(Pdb) next

> /webapp/PYTHON_VENVS/ReviewBoard-4.0.10-venv/lib/python3.7/site-packages/reviewboard/admin/forms/email_settings.py(131)save()

-> to_user = request.user.email

(Pdb) dir(request.user)

['DoesNotExist', 'EMAIL_FIELD', 'Meta', 'MultipleObjectsReturned', 'REQUIRED_FIELDS', 'USERNAME_FIELD', '__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_check_column_name_clashes', '_check_field_name_clashes', '_check_fields', '_check_id_field', '_check_index_together', '_check_local_fields', '_check_long_column_names', '_check_m2m_through_same_relationship', '_check_managers', '_check_model', '_check_model_name_db_lookup_clashes', '_check_ordering', '_check_swappable', '_check_unique_together', '_do_insert', '_do_update', '_get_FIELD_display', '_get_next_or_previous_by_FIELD', '_get_next_or_previous_in_order', '_get_pk_val', '_get_unique_checks', '_meta', '_password', '_perform_date_checks', '_perform_unique_checks', '_profile', '_profile_set_cache', '_save_parents', '_save_table', '_set_pk_val', '_state', 'accesstoken_set', 'application_set', 'changedescription_set', 'check', 'check_password', 'clean', 'clean_fields', 'date_error_message', 'date_joined', 'default_review_paths', 'delete', 'directed_drafts', 'directed_review_requests', 'draft', 'email', 'email_user', 'file_attachments', 'first_name', 'from_db', 'full_clean', 'get_absolute_url', 'get_all_permissions', 'get_deferred_fields', 'get_email_field_name', 'get_full_name', 'get_group_permissions', 'get_next_by_date_joined', 'get_previous_by_date_joined', 'get_profile', 'get_session_auth_hash', 'get_short_name', 'get_site_profile', 'get_username', 'grant_set', 'groups', 'has_module_perms', 'has_perm', 'has_perms', 'has_usable_password', 'id', 'is_active', 'is_admin_for_user', 'is_anonymous', 'is_authenticated', 'is_profile_visible', 'is_staff', 'is_superuser', 'last_login', 'last_name', 'local_site', 'local_site_admins', 'logentry_set', 'natural_key', 'normalize_username', 'oauth2_provider_application', 'oauth_application', 'objects', 'password', 'pk', 'prepare_database_save', 'profile_set', 'refresh_from_db', 'refreshtoken_set', 'repositories', 'review_groups', 'review_request_visits', 'review_requests', 'reviews', 'save', 'save_base', 'serializable_value', 'set_password', 'set_unusable_password', 'should_send_email', 'should_send_own_updates', 'site_profiles', 'status_updates', 'storedconsentdata', 'trophies', 'unique_error_message', 'user_permissions', 'username', 'username_validator', 'validate_unique', 'webapi_tokens']

(Pdb) request.user

<SimpleLazyObject: <User: shramani>>

(Pdb) request.user.email

''

Shubha Ramani

unread,
Sep 15, 2022, 9:43:17 PM9/15/22
to Review Board Community
oh forgot to answer. Yes it happens with test emails (this is what I debugged) and also 
with regular review activity. I suspect that the request.user.email field is always coming in as blank.

Shubha

Message has been deleted

Shubha Ramani

unread,
Sep 16, 2022, 12:01:05 PM9/16/22
to Review Board Community

One more thing Christian.  Our mail server software is working fine. Remember I told you about the socat trick ?

when I did nc localhost 9025 from another terminal I got output on the waiting  --> socat -v TCP-LISTEN:9025,bind=localhost,fork TCP: <my_mail_server>:25

 

This proves that the connectivity between our mail server and our unix host is working just fine. However when ReviewBoard 

was set to localhost 9025 and a test email was configured, nothing showed up on the socat terminal. This means

that ReviewBoard didn't even attempt to send the email. And stepping through pdb debug this is actually the case. The

failure was silent - no exception, nothing. So regardless of criticality level in ReviewBoard logs nothing whatsoever showed

up in the logs.

 

As I mentioned the request.user.email was empty.

 

Thanks for listening !

Shubha Ramani

unread,
Sep 20, 2022, 11:26:09 PM9/20/22
to Review Board Community
I thought I'd update. We finally got things working in 4.0.10. The  Custom LDAP User Search Filter:  was set incorrectly.

Thanks,

Shubha

Reply all
Reply to author
Forward
0 new messages