Edgewall Software
Modify

Opened 15 years ago

Closed 14 years ago

Last modified 13 years ago

#464 closed enhancement (wontfix)

[merge]Support e-mail notifications for local users

Reported by: naked@… Owned by: Jonas Borgström
Priority: normal Milestone:
Component: ticket system Version: devel
Severity: normal Keywords:
Cc: hpk@…, tom@… Branch:
Release Notes:
API Changes:

Description

Some way to send e-mail notifications for unqualified local users would be useful. What I mean by this is that default logins on a web server are just plain usernames, such as "naked" - and emails could be either sent unqualified to "naked", or a domain could be configured for all the addresses that would be appended to the end, or there could be a more complex lookup operation for obtaining the e-mail addresses.

For me, a sufficient solution would be a configuration option "smtp_allow_local_names", that would also send email notifications to names that are returned by pwd.getpwnam(). This is, however, quite a specific solution.

Attachments (3)

patch_464.diff (883 bytes ) - added by tbrkic 15 years ago.
patch
trac_notify_owner.diff (1.1 KB ) - added by tom@… 15 years ago.
Notify a local ticket owner as well as the reporter
yan.diff (1.0 KB ) - added by David M. Lee <dmlee@…> 15 years ago.
Notify patch that maps usernames to email using the session information

Download all attachments as: .zip

Change History (17)

comment:1 by daniel, 15 years ago

Milestone: 0.8

We could possibly use the new session mgmt capability to get email addresses of authenticated users.

comment:2 by daniel, 15 years ago

Resolution: wontfix
Status: newclosed

Email addresses are now (starting in [617]) kept in a session variable (if entered in settings).

'local' users a'la UNIX is a bad idea since we can't rely on users putting anything reasonable in the reporter/email/cc fields, which could potentially result in alot of mail bounces.

comment:3 by holger krekel <hpk@…>, 15 years ago

Cc: hpk@… added

Sorry, you say "'local' users a'la UNIX is a bad idea since we can't rely on users putting anything reasonable in the reporter/email/cc".

Isn't the risk of mail bounces higher if people need to put in fully qualified email addresses?

And if a user sets an email address in his settings can i then reference it by simply specifying that users username?

Generally i am very interested in enhancing trac's email features so i am trying to understand where it is today.

comment:4 by tbrkic, 15 years ago

Resolution: wontfix
Status: closedreopened

Patch added.

The patch does:

If you in trac.ini have set

[notification] 
user_domain = domain.com

Then when trac send out emails it will:

  • check if the address contains @ ⇒ sends email to that address
  • If the address doesnt contain any @. Then check if it is a user on the local system. If so send out email to user@user_domain.

So if you dont set user_domain everything works as before.

The advantage you get is if you setup trac in a company where 'getpwnam' works and the trac username is the same as the unix username. In this case the user will get notification when tickets change. And in cc and assign fields it is enought to write the username which will probably lead less typing errors.

Cheers

Toni

by tbrkic, 15 years ago

Attachment: patch_464.diff added

patch

comment:5 by anonymous, 15 years ago

Summary: Support e-mail notifications for local users[merge]Support e-mail notifications for local users

comment:6 by Jonas Borgström, 15 years ago

Milestone: 0.80.9

This might be a good idea but we should use email addresses stored in the session if they exist before starting to construct them from user names.

Moving this to 0.9…

comment:7 by tom@…, 15 years ago

Here is a further patch to send emails to a local ticket *owner* as well as the reporter.

by tom@…, 15 years ago

Attachment: trac_notify_owner.diff added

Notify a local ticket owner as well as the reporter

comment:8 by anonymous, 15 years ago

Cc: tom@… added

comment:9 by Christopher Lenz, 15 years ago

#1286 has been marked as duplicate of this ticket.

comment:10 by David M. Lee <dmlee@…>, 15 years ago

Yet another notify patch. This one digs email addresses out of the session table, instead of assuming that users live in the same domain, relying on other system config, or other such unreliable information. This is (hopefully) more like what Daniel intended.

If a username has multiple email addresses from multiple sessions, only the first one is used.

Really, a name and email should be associated with the username, and not the session. The only time it makes sense for a session is for the user 'anonymous'. It would be nice if there were a 'Users' table for holding this sort of information.

The patch is made against 0.8-stable.

by David M. Lee <dmlee@…>, 15 years ago

Attachment: yan.diff added

Notify patch that maps usernames to email using the session information

comment:11 by Christopher Lenz, 15 years ago

David, this functionality has already been added to trunk in [1343]. See also #866.

This ticket remains open as a request to support notification to local users, in case they don't have an email address set in their session.

comment:12 by Christopher Lenz, 14 years ago

Resolution: wontfix
Status: reopenedclosed

As we now support mapping plain user names in the CC, reporter and owner fields to the email address set in the users settings, I don't think that trying to send mail to local users is really worth it.

comment:13 by Matthew Good, 14 years ago

Milestone: 0.9

comment:14 by anonymous, 14 years ago

I believe for the user_domain patch to work for cc users you need to redefine parse_cc to call get_email_addresses instead.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to as closed The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.