#464 closed enhancement (wontfix)
[merge]Support e-mail notifications for local users
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | ticket system | Version: | devel |
Severity: | normal | Keywords: | |
Cc: | hpk@…, tom@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal 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)
Change History (17)
comment:1 by , 21 years ago
Milestone: | → 0.8 |
---|
comment:2 by , 20 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
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 , 20 years ago
Cc: | 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 , 20 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
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
comment:5 by , 20 years ago
Summary: | Support e-mail notifications for local users → [merge]Support e-mail notifications for local users |
---|
comment:6 by , 20 years ago
Milestone: | 0.8 → 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…
comment:7 by , 20 years ago
Here is a further patch to send emails to a local ticket *owner* as well as the reporter.
by , 20 years ago
Attachment: | trac_notify_owner.diff added |
---|
Notify a local ticket owner as well as the reporter
comment:8 by , 20 years ago
Cc: | added |
---|
comment:10 by , 20 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 , 20 years ago
Notify patch that maps usernames to email using the session information
comment:11 by , 20 years ago
comment:12 by , 20 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
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 , 19 years ago
Milestone: | 0.9 |
---|
comment:14 by , 19 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.
We could possibly use the new session mgmt capability to get email addresses of authenticated users.