Edgewall Software

Ticket #464 (closed enhancement: wontfix)

Opened 5 years ago

Last modified 2 years ago

[merge]Support e-mail notifications for local users

Reported by: naked@… Owned by: jonas
Priority: normal Milestone:
Component: ticket system Version: devel
Severity: normal Keywords:
Cc: hpk@…, tom@…

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

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

Change History

Changed 5 years ago by daniel

  • milestone set to 0.8

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

Changed 4 years ago by daniel

  • status changed from new to closed
  • resolution set to wontfix

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.

Changed 4 years ago by holger krekel <hpk@…>

  • 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.

Changed 4 years ago by tbrkic

  • status changed from closed to reopened
  • resolution wontfix deleted

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

Changed 4 years ago by tbrkic

patch

Changed 4 years ago by anonymous

  • summary changed from Support e-mail notifications for local users to [merge]Support e-mail notifications for local users

Changed 4 years ago by jonas

  • milestone changed from 0.8 to 0.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...

Changed 4 years ago by tom@…

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

Changed 4 years ago by tom@…

Notify a local ticket owner as well as the reporter

Changed 4 years ago by anonymous

  • cc tom@… added

Changed 4 years ago by cmlenz

#1286 has been marked as duplicate of this ticket.

Changed 4 years ago by David M. Lee <dmlee@…>

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.

Changed 4 years ago by David M. Lee <dmlee@…>

Notify patch that maps usernames to email using the session information

Changed 4 years ago by cmlenz

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.

Changed 4 years ago by cmlenz

  • status changed from reopened to closed
  • resolution set to wontfix

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.

Changed 3 years ago by mgood

  • milestone 0.9 deleted

Changed 3 years ago by anonymous

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

Add/Change #464 ([merge]Support e-mail notifications for local users)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.