#6249 Use a stable Sender: header in email notifications [ss4075]

v1.1.0
closed
nobody
General
2015-08-20
2013-05-17
No

Email notifications have varying From addresses (e.g. the ticket submitter). Notifications should have a Sender: header specified which refers to the system sending rather than the end-user we're doing it on behalf of.

This should be a stable value so that it can be used in mail filters (e.g. mailman). Perhaps the tool's email address would work well. Test how common clients (e.g. gmail) display it and if it affects replies at all.

Related

Tickets: #6249

Discussion

1 2 > >> (Page 1 of 2)
  • Dave Brondsema

    Dave Brondsema - 2013-09-13

    The incorrect From: address is also causing mail filters (e.g. gmail) to regard it as not verifiably from the sender.

     
  • Dave Brondsema

    Dave Brondsema - 2013-09-24
    • labels: support, p3 --> support, p3, 42cc
     
  • Igor Bondarenko - 2013-09-25
    • status: open --> in-progress
     
  • Igor Bondarenko - 2013-09-25

    Is there a way to configure sandbox to send an emails, so that we could test how gmail and other would display this?

    Created #447: [#6249] Use a stable Sender: header in email notifications (2cp)

     

    Related

    Tickets: #6249

  • Igor Bondarenko - 2013-10-07
    • status: in-progress --> code-review
     
  • Igor Bondarenko - 2013-10-07

    Closed #447. je/42cc_6249

    Don't sure what you've meant by "tool's email address", I did find only emails for individual tickets in the code, so I'm constructing tool's address similar to that.

    For this to work you need to change exim configuration slightly (by default exim strips Sender: header from emails). The following worked for me on a sandbox:

    local_sender_retain = true
    local_from_check = false
    
     
    • QA: Tim Van Steenburgh
    • Milestone: forge-backlog --> forge-oct-18
     
    • status: code-review --> in-progress
     
  • Looks good, but I would like to see a doc string and test for Application.email_address. Keep in mind that it's possible (as far as I can tell from reading the code) that the Application's url might not start with a / (it could be an absolute url).

     
  • Igor Bondarenko - 2013-10-15

    Take a look at Ticket.email_address (ForgeTracker/forgetracker/model/ticket.py:def email_address). It takes similar approach to construct email address, it also assumes that url starts with a /. Should we add logic to handle absolute url there too?

    Created #453: [#6249] Add docstring and test for Application.email_address (1cp)

     

    Related

    Tickets: #6249

  • Good point, I didn't realize this logic was already in use. Let's leave the logic as-is, but still add a test and docstring.

    I've created [#6756] for removing Neighborhood absolute urls.

     

    Related

    Tickets: #6756

  • Igor Bondarenko - 2013-10-17
    • status: in-progress --> code-review
     
  • Igor Bondarenko - 2013-10-17

    Closed #453. je/42cc_6249

     
  • Dave Brondsema

    Dave Brondsema - 2013-10-21
    • Milestone: forge-oct-18 --> forge-nov-01
     
    • status: code-review --> in-progress
     
  • Well the tests all pass, but I'm not seeing a Sender: header in any of my notification emails when testing. A couple examples:

    To: "[test6549:wiki] " <Home@wiki.test6549.p.tvansteenburgh-1024.sb.sf.net>
    From: "Administrator 1" <admin1@users.sf.net>
    Reply-To: "[test6549:wiki] " <Home@wiki.test6549.p.tvansteenburgh-1024.sb.sf.net>
    Subject: [test6549:wiki] Discussion for Home page
    Message-ID: </p/test6549/wiki/Home/e7ddc77dc4cdd73732d30daac76113e12316af44.wiki@test6549.p.sourceforge.net>
    Date: Wed, 23 Oct 2013 14:08:58 +0000
    
    To: "[test6549:gfarm] " <730@gfarm.test6549.p.tvansteenburgh-1024.sb.sf.net>
    From: "Administrator 1" <admin1@users.sf.net>
    Reply-To: "[test6549:gfarm] " <730@gfarm.test6549.p.tvansteenburgh-1024.sb.sf.net>
    Subject: [test6549:gfarm] #730 A test ticket
    Message-ID: </p/test6549/gfarm/730/a951b84c07a67d35c8204e605824ba258cc609f1.gfarm@test6549.p.sourceforge.net>
    Date: Wed, 23 Oct 2013 13:56:09 +0000
    

    Not sure if I'm missing something...can you provide instructions for how you tested?

    One more thing - I noticed some direct calls to sendmail.post() in forgetracker/model/ticket.py. Seems like those wouldn't ever get the new Sender: header?

     
  • Igor Bondarenko - 2013-10-23

    Did you make changes to exim config, as I pointed out here?

    Yep, they wouldn't. We can set Sender: to some site-wide address inside mail_util.SMTPClient.sendmail, if sender parameter isn't specified, or go ahead and fix all manual calls to sendmail and sendsimplemail to include sender parameter. Not sure which way is better.

     
  • Igor Bondarenko - 2013-10-23
    • status: in-progress --> code-review
     
  • Gah, sorry, I missed the exim config changes - will retest.

    I think we should pass sender to those direct sendmail calls, since we'll want to use c.app.email_address and not a generic site address.

     
    • status: code-review --> in-progress
     
  • Igor Bondarenko - 2013-10-24

    Created #464: [#6249] Set sender to app's email address in direct sendmail calls (1cp)

     

    Related

    Tickets: #6249

  • Igor Bondarenko - 2013-10-25
    • status: in-progress --> code-review
     
  • Igor Bondarenko - 2013-10-25

    Closed #464.

    Rebased on master and force pushed je/42cc_6249

     
    • status: code-review --> validation
     
  • Validation: test replies in prod after push.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.