Issue 1480: Dialog: Register E-Mail Address
Status:  Submitted
Owner: ----
Closed:  Jan 2013
Reported by christia...@googlemail.com, Jul 19, 2012
************************************************************
***** NOTE: THIS BUG TRACKER IS FOR GERRIT CODE REVIEW *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, INTERNAL *****
***** ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.    *****
***** THOSE ISSUE BELONG IN DIFFERENT ISSUE TRACKERS!  *****
************************************************************

Affected Version: 2.4

What steps will reproduce the problem?
1. Login using openid
2. Goto Settings --> Contact Information
3. Register New Email...
4. Enter mail address --> Press Register

What is the expected output? What do you see instead?

I would expect to get my new mail address registered. Instead I get:
Firebug output: {"jsonrpc":"2.0","id":4,"error":{"code":-32603,"message":"Server localhost rejected body"}}

These are the headers:

Response Headers
Cache-Control	no-cache, must-revalidate
Content-Disposition	attachment
Content-Length	91
Content-Type	application/json; charset=utf-8
Date	Thu, 19 Jul 2012 08:50:55 GMT
Expires	Fri, 01 Jan 1980 00:00:00 GMT
Pragma	no-cache
Request Headers
Accept	application/json,application/json,application/jsonrequest
Accept-Encoding	gzip, deflate
Accept-Language	en-us,en;q=0.5
Connection	keep-alive
Content-Length	123
Content-Type	application/json; charset=utf-8
Cookie	gerrit.last_openid=<I replaced my openid>; JSESSIONID.90413da1=f9243398311ab47a1802e345fa19bb44; screenResolution=1280x800; GerritAccount=aSceprtVkWdjUk8XxO8wU-LjPpfp5w6g-W
Host	<Replaced: this was the gerrit host address>:8080
Referer	<Replaced: this was the gerrit host address>:8080/
User-Agent	Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:13.0) Gecko/20100101 Firefox/13.0.1 FirePHP/0.7.1
x-insight	activate

Please provide any additional information below.

I am not sure if this is a bug or I might just have miss configure my Gerrit instance. Please help. For me it is critical because I would like to use Gerrit for our project and I have no ldap setup yet.



Jul 19, 2012
Project Member #1 edwin.ke...@gmail.com
When you register a new mail address, Gerrit tries to send a mail to this mail address in order to make the user confirm this address. In your case sending this mail fails because the mail server that you have configured is rejecting to send the mail with the error message "Server localhost rejected body". Do you actually run a mail server on localhost? Check the mail server configuration of your Gerrit server [1].

[1] https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#_a_id_sendemail_a_section_sendemail
Jul 19, 2012
#2 christia...@googlemail.com
Thank you for the quick answer. A better error message would be desirable.

Thanks very much again. Chris
Jan 3, 2013
Project Member #3 edwin.ke...@gmail.com
I've pushed a change for review the improves the error reporting:
  https://gerrit-review.googlesource.com/40800
Status: ChangeUnderReview
Jan 3, 2013
#4 sop@google.com
(No comment was entered for this change.)
Status: Submitted
Labels: FixedIn-2.6