mainSavannah Administration - Support: sr #108243, bad From: address in project email


sr #108243: bad From: address in project email

Submitter:  Karl Berry <karl>
Submitted:  Fri 01 Feb 2013 07:13:18 PM UTC
Category:  Savannah website Priority:  5 - Normal
Severity:  3 - Normal Status:  None
Privacy:  Public Assigned to:  None
Operating System:  None Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup

Jump to the original submission

Wed 26 Apr 2017 04:07:20 AM UTC, comment #14: 


I've added this item to our 'savannah hacking ideas' page
(  item #33).

This is still happening. If someone is interesting in hacking on this,
I'm happy to provide full SMTP headers of such a message.

But for now, I'm closing this item.

 - assaf

Assaf Gordon <agn>
Site Administrator
Mon 26 Aug 2013 10:29:44 PM UTC, comment #13: 

No.  @localhost is how your mailer is configured (as used by this php call, anyway).  On my system, the mail would come as  For others, it would be -email is unavailable- or -email is unavailable- (per the original report,, etc.

The From: address in the mail should obviously not depend on anything local, instead it should be hardwired to be <> like most of the other mail we send out.

Karl Berry <karl>
Site Administrator
Mon 26 Aug 2013 10:14:19 PM UTC, comment #12: 

So, traversing through the rather confusing process of project approval, I received the approval mail.  Here are the headers, which includes "From: root@localhost":

Basically, is root@localhost not what we want?

Delivered-To: -email is unavailable-
Subject: Project Approved
X-PHP-Originating-Script: 0:sendmail.php
From: root@localhost
X-Savane-Server: []

John Schmidt <johnschmidt4>
Mon 26 Aug 2013 06:39:42 PM UTC, comment #11: 

It doesn't look that I have the permissions to set the project as active, even when logged in as superuser.  Can someone change the status of this task to active so I can continue my testing?

task #12790: Submission of John Schmidt2

Thank you

John Schmidt <johnschmidt4>
Sat 24 Aug 2013 10:37:26 PM UTC, comment #10: 

- change state to active
- click green check mark icon
- click screwdriver+wrench icon

(we could also ask the next person to have a project approved to send us a copy of the email.  actually, perhaps the email should always be bcc-d to an internal address for archiving.  anyway)

i hope to have the documentation readable again sometime tomorrow.

Karl Berry <karl>
Site Administrator
Thu 22 Aug 2013 10:32:34 PM UTC, comment #9: 

Tried approving it, but I don't receive an email.  I am sure that I am doing something incorrect.  But the documentation that you provided ( returns 503 right now, so I cannot check the documentation to see the process.

John Schmidt <johnschmidt4>
Thu 15 Aug 2013 11:01:33 PM UTC, comment #8: 

The msg you attached is the notification to the user that the project has been submitted.  The message with the problem (according to Eric's report) is the approval email -- the one sent after the project is approved. 

So I'd go back to your testemail project and approve it in the normal way (my attempt at documenting that is  Apparently that mail should come From: -email is unavailable- in your case. 

Also, I am not sure if the erroneous address is the From: header, the envelope address ("From "), or both ...

Thanks for pursuing,

Karl Berry <karl>
Site Administrator
Thu 15 Aug 2013 01:17:55 AM UTC, comment #7: 

So submitting a test project, I see in the email headers from the confirmation email that I received the following information:

From: -email is unavailable-

I have attached the entire email to this ticket, but it seems to be behaving as desired.

(file #28847)

John Schmidt <johnschmidt4>
Tue 13 Aug 2013 09:16:09 PM UTC, comment #6: 

there is no url, per se, but if you submit a test project ("register new project" in the left-hand menu bar on every page) and then approve it, you should see that the approval email sent to the submitter has a From: address of the submitter, rather than some savannah address.

The real user report is linked in my initial submission, namely

Karl Berry <karl>
Site Administrator
Tue 13 Aug 2013 06:45:47 PM UTC, comment #5: 


What is an example URL where this is happening?  If you can share that, I can try to see if there is a more localized change that I can make to just this area.

John Schmidt

John Schmidt <johnschmidt4>
Mon 12 Aug 2013 10:33:19 PM UTC, comment #4: 

Thanks for getting to this point, John.  I think this would affect more than just the approval mail, though -- after all, there is a lot of email generated from trackers, etc., which really should appear as from the user.  ?

(Just eyeballing your patch, didn't actually do any experiments.)


Karl Berry <karl>
Site Administrator
Mon 12 Aug 2013 07:28:34 PM UTC, comment #3: 

Here is a first stab at thie problem.  I have patched savane/frontend/php/include/sendmail.php from

That is where the PHP code appears to be constructing the headers of the email.  Below is my diff (also, the patch is attached to this ticket).  I would like some feedback before I commit to the savane repo.

diff sendmail.php sendmail_patch.php
<   # If $from is a login name, write nice From: field
<   $fromuid = user_getid($from);
<   if (user_exists($fromuid))
<     {
<       $from = user_getrealname($fromuid, 1)." <".user_getemail($fromuid).">";
<     }

>   $from = ""

(file #28825)

John Schmidt <johnschmidt4>
Sat 10 Aug 2013 10:19:48 PM UTC, comment #2: 

Hi John.  As you may have gathered from my replies yesterday, few precise details about the Savannah architecture have made it into my brain's permanent storage. (more discussion in

What I would do is start with grep -r proj_email.txt in all the source hierarchies you can find, starting on frontend.  Clearly, something somewhere has to be using that file, and presumably that same something is also generating the headers.

If I knew exactly where to look, I would have just fixed it in the first place.  Finding the place to fix is the "hard" part ...


Karl Berry <karl>
Site Administrator
Fri 09 Aug 2013 08:59:22 PM UTC, comment #1: 


I am new to this project.  Can you give me some additional information to point me in the right direction?

John Schmidt

John Schmidt <johnschmidt4>
Fri 01 Feb 2013 07:13:18 PM UTC, original submission:  

Hi Michael (if you're still there), or anyone - it seems the From: line in the Savannah approval email uses the domain from the submitter, instead of something @savannah.(non)  See the report from Eric Hutchins in the "By the way" at

The body of the email is generated from administration/content/gnu-content/admin/proj_email.txt, but not the headers.  I didn't check around to see how the email gets sent.

If anyone is interested in helping with the savannah backend, I think this would be an excellent little job to start with, since presumably the actual change is trivial.  There is stuff in the wiki, past email, etc., about where exactly all the source repositories and their live checkouts are ... figuring out where to look is probably the hardest part :).


Karl Berry <karl>
Site Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #28847:  test_email.txt added by johnschmidt4 (2KiB - text/plain - Test email from project registration.)
file #28825:  sendmail_patch.php added by johnschmidt4 (16KiB - application/x-php - A patch of savane/frontend/php/include/sendmail.php from


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by agn (Posted a comment)
  • -email is unavailable- added by karl (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-04-26 agn Open/ClosedOpen Closed
    2014-08-15 karl Assigned tojohnschmidt4 None
    2013-08-15 johnschmidt4 Attached File- Added test_email.txt, #28847
    2013-08-13 johnschmidt4 Assigned toNone johnschmidt4
    2013-08-12 johnschmidt4 Attached File- Added sendmail_patch.php, #28825

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code