Closed (fixed)
Project:
Project issue tracking
Version:
5.x-2.x-dev
Component:
Mail
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Nov 2005 at 02:25 UTC
Updated:
15 Jan 2008 at 21:12 UTC
Jump to comment: Most recent file
Comments
Comment #1
dopry commentedComment #2
dwwYeah, this is very weird. It's definitely doing this on purpose, but I don't think it's a good idea.
I think I'd like to change the UI for the setting when you add/edit a project. Probably on d.o, we should just replace *all* of them in the DB with "noreply@drupal.org", and form_alter the page to take that setting off the form complete. It says "email address where project maintainer can be reached", but it really means "from address for issue subscription e-mails"...
Comment #3
hunmonk commentedi'm confused where this is originating from. no invocatioin of
drupal_mail()in mail.inc has a custom from address, which means it should be usingvariable_get('site_mail', ini_get('sendmail_from'));for the from address. what am i missing?Comment #4
aclight commentedI think this is happening in project_issue/mail.inc in
project_mail_notify()around line 274:$project->mail is set in the setting dww mentions in comment #2 above.
Maybe this belongs in the project_issue queue, but the setting that's relevant is created in project.inc, so I'll leave the issue here for now.
Comment #5
hunmonk commentedthis issue seems to have fallen prey to crossed wires. dopry's initial report didn't really have anything to do with the fact that the $project->mail variable isn't clearly described, but rather that the issue email name and email address are inconsistent.
i've addressed these two issues as follows:
the other issue dww mentioned in #2 really needs an infra issue filed, as it's a problem specific to d.o, not project*
changes applied to HEAD in project and project issue, and also project issue 5.x-1.x. not going to backport this change to 4.7
Comment #6
(not verified) commentedComment #7
aclight commentedAfter ifac was released on d.o, several people (myself included) complained about how this had been fixed in #5 (see, for example, http://drupal.org/node/188850).
hunmonk and I discussed this on irc and came up with the following plan:
we would have
project_issue_form_alter()we need to make an adjustment to the description text of the Project e-mail setting that indicates if the address will be overridden by a system wide setting (ie. #1). Otherwise it will be confusing for users who enter an address here but find issues in their project coming from another address.X-Drupal-Project: project_issueIt would be nice to get comments from anyone (especially dww) before going ahead with this.
Comment #8
aclight commentedThis really belongs in project_issue, not project.
Comment #9
aclight commentedComment #10
webchickThis is what I would do:
a) Make the from address:
$username < $black_hole_email ? $black_hole_email : $project->mail >
So,
webchick < noreply@drupal.org >
or
webchick < merlin@blhasdhalsdhkasd >
b) Make the subject:
[$project->short_name] [$project->category]
So:
[views] [task] Write documentation for foodybar.
Why?
a) The "from" should be "who?" which means the person who posted the issue. Not about the project. The project is "what?" which should be part of the subject.
b) If we use the project short name, we don't end up with "[Drupal.org infrastructure super team] [task] I get cut of-" as the subject.
Comment #11
webchickOk. We had a long (long, long, LONG) discussion about this issue in #drupal tonight. Here were the outcomes:
1. It's almost universally agreed that the from address should be the author of the issue/follow-up, not a static value that doesn't change. More weight is given to replies from certain individuals than others, we might want to kill-file certain users, etc. It's just more natural for it to be the post author.
2. However, hunmonk also doesn't want it to be indistinguishable from a "normal" e-mail from said person. We need some way of indicating that this is a reply from Project module, and not from that person individually.
3. If we remove the project info from the from address, we need to put it somewhere. The subject is a logical place.
4. The original post in this issue wasn't communicated properly, due to a missing & lt; -- dopry's complaint was that it makes no sense to have Jonathan's From address next to Darrel's name, and he's right. Furthermore, it is a privacy violation to send out maintainers' e-mail addresses with every post. Yes, I know the e-mail field on node/#/edit on project nodes now says "This will be used as the from address on all issue replies" or something to that effect, but this is only as of 3 weeks ago. In the meantime, many people (myself included) who didn't subscribe to issue mails were completely unaware of the consequence of filling out a valid e-mail address here. And they will continue to be unaware until they create a new project (if even then). All a spammer has to do is subscribe to all projects, write a small bot to create some random issue in each project's queue, and reap the benefits of a nice, targeted e-mail list. This totally sucks. Contributors are our most valued treasures -- we should NOT be giving out their e-mail addresses willy-nilly (or at all, really :P). And finally, if the privacy issues aren't enough to convince you this is a bad idea, the current behaviour also just plain doesn't make any sense. You'd wouldn't want people to respond to issues out-of-band, and even if you did, they'd be responding to the project maintainer, not the author of the post.
So. The consensus reached was:
From: $username [$site_name] < $global_reply_to >
Subject: [$project_short_name] [$issue_category] $issue_title
This patch does that.
Note that this touches both project and project_issue, because I needed to remove the recent description change on the project mail field.
I re-used the project_issue_reply_to variable which was already there from mailhandler integration, and just changed the code around slightly so that mailhandler integration still should work as it always did (assuming it does work ;)). I had to build the $from in a separate variable, not as part of the headers, because otherwise it would blank it out in devel module's mail logging, since project_issue was passing in NULL here. I'm actually not sure how this is working at all currently. Maybe a PHP 4 vs. PHP 5 thing?
Comment #12
webchickwwwebernet pointed out that I don't need Reply-To anymore.
Comment #13
aclight commentedThis patch changes the from to look like this:
This works better in Gmail.
One thing I noticed is that if both site_mail and project_issue_reply_to are set to empty strings, the emails will be sent with a from line that looks like this:
but from within Gmail the name and site name are basically swapped and so this is displayed as:
webchick and I discussed what to do about this but didn't come up with a good solution. She says that site-mail is required in D6 (it's actually marked as a required field in D5, but I guess that's only if you try to submit the Site Information form). We could add an implementation of hook_requirements() that gave a warning if neither site-mail nor project_issue_reply_to were set, but webchick didn't think that would be entirely effective. So for now we've punted on the issue.
We've both tested the patch and it works as advertised.
Comment #14
webchickI talked with hunmonk, and he felt that a note in UPGRADE.txt about the change was sufficient. So this has been added now. We also were dubious about the quoting of the from name, but according to http://www.faqs.org/rfcs/rfc2822.html this looks right in the case where you have special characters in the name.
Comment #15
aclight commentedFunctionally this is the same patch as #14 but with an added comment explaining the use of double quotes around $sender->name.
Comment #16
hunmonk commentedi see both 'project_issue_reply_to' and 'project_reply_to' referenced for the global black hole email, which needs to be fixed. i'd say go with 'project_issue_reply_to', since this is in project_issue module.
the description of the change in UPGRADE.txt is a bit vague and confusing i think. can we try to make it more clear exactly what the change is, what it's for, and how to set it?
Comment #17
aclight commentedIn IRC, hunmonk suggested splitting this patch into 2 issues, one that would make the changes to the name in the From: header and the Subject: changes, and a separate issue that will add the project_issue_reply_to setting for a from/reply to blackhole address.
so the attached patch takes care of the name and subject changes. I've tested on a local install and it works as expected.
We can handle the second part of this (email blackhole) at http://drupal.org/node/189210
Comment #18
hunmonk commentedi'm pretty sure we don't want the name and the subject t()'d, right? definitely not the name (sitename) part...
Comment #19
aclight commentedI don't know that the t() is necessary, but I don't think it hurts anything. And it makes it easier for a site admin to do something else, at least if they are already using locale.
I've attached a patch that removes the t(). I haven't tested this specific patch yet, however.
Comment #20
hunmonk commentedfixed in HEAD, applied to drupal.org -- let the angels rejoice!!
Comment #21
profix898 commentedSeems that I missed the discussion here (again), but I'm very happy with the outcome. Its good to have the 'From' back :) Thanks to everyone.
Comment #22
dwwa) I just fixed a minor bug in the previous patch: http://drupal.org/cvs?commit=87152
b) We should commit all of this to DRUPAL-5 for project_issue, too.
Comment #23
hunmonk commentedhere's the port for 5.x-1.x, including the touch up mentioned in #22.
i don't have a 5.x-1.x install handy -- can someone run a quick test to make sure this sucker works?
Comment #24
hunmonk commentedtested, and committed to 5.x-1.x
Comment #25
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.