#7499 closed defect (wontfix)
Notification mail header "Precedence" should be configurable
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | |
Component: | notification | Version: | 0.11 |
Severity: | trivial | Keywords: | notification |
Cc: | Thijs Triemstra | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
I want to use Trac to notify a mailing list of ticket change.
Every time when Trac send email I got this error/success in the mail log:
delivery 1118: success: Precedence:_junk_-_message_ignored/did_0+0+1/
To bypass this we have to comment in notification.py
headers['Precedence'] = 'bulk'
It should be great if you can include this as a config option in feature version.
Thanks
Attachments (0)
Change History (15)
comment:1 by , 16 years ago
Keywords: | ui javascript added |
---|---|
Owner: | changed from | to
Severity: | trivial → normal |
Status: | new → assigned |
comment:3 by , 16 years ago
Description: | modified (diff) |
---|---|
Keywords: | notification added; ui javascript removed |
Milestone: | → 0.13 |
Owner: | removed |
Severity: | normal → trivial |
Status: | assigned → new |
An improved notification system is scheduled for 0.13.
comment:6 by , 15 years ago
follow-up: 9 comment:7 by , 15 years ago
I have tested replacing
headers['Precedence'] = 'bulk'
with
headers['Precedence'] = 'list'
and the mail is correctly delivered. So instead of my previous patch in #8609 I suggest to set precedence header to list.
I suggest to change milestone from 0.13 to 0.11.6 too
comment:9 by , 14 years ago
Replying to dandre@…:
I have tested replacing
headers['Precedence'] = 'bulk'with
headers['Precedence'] = 'list'
Patch for 0.12-stable:
-
trac/notification.py
409 409 headers['X-Trac-Version'] = __version__ 410 410 headers['X-Trac-Project'] = projname 411 411 headers['X-URL'] = self.env.project_url 412 headers['Precedence'] = ' bulk'412 headers['Precedence'] = 'list' 413 413 headers['Auto-Submitted'] = 'auto-generated' 414 414 headers['Subject'] = self.subject 415 415 headers['From'] = (self.from_name or projname, self.from_email)
comment:10 by , 12 years ago
Precedence "list" is also bad, as it should be filtered out by a proper mailing list manager. I definitely suggest making the header configurable in trac.ini.
comment:11 by , 12 years ago
Type: | enhancement → defect |
---|
comment:12 by , 8 years ago
Could now be implemented as a plugin? Untested:
from trac.core import Component, implements from trac.notification.api import IEmailDecorator from trac.notification.mail import set_header class ListPrecedenceEmailDecorator(Component): implements(IEmailDecorator) # IEmailDecorator methods def decorate_message(self, event, message, charset): set_header(message, 'Precedence', 'list', charset)
comment:13 by , 8 years ago
Milestone: | next-major-releases |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
comment:14 by , 8 years ago
I can confirm the mail message has precendence set to 'list' when the plugin is enabled.
comment:15 by , 8 years ago
Thanks for testing!
What is the Precedence:
header good for anyway?
Sometimes used as a priority value which can influence,transmission speed and delivery. Common values are "bulk" and "first-class". Other uses is to control automatic replies and to control return-of-content facilities, and to stop mailing list loops. Non-standard (This header is not specified in any of referenced RFCs which define Internet protocols, including Internet Standards, draft standards or proposed standards. The header appears here because it often appears in e-mail or Usenet News. Usage of these headers is not in general recommended. Some header proposed in ongoing IETF standards development work, but not yet accepted, are also marked in this way.) controversial (The meaning and usage of this header is controversial, i.e. different implementors have chosen to implement the header in different ways. Because of this, such headers should be handled with caution and understanding of the different possible interpretations. ) and discouraged (This header is known to create problems and should not be generated. Handling of such headers in incoming mail should be done with great caution.).
rfc:3834#section-3.1.8 about the Precedence:
header:
A response MAY include a Precedence field in order to discourage responses from some kinds of responders which predate this specification. The field-body of the Precedence field MAY consist of the text "junk", "list", "bulk", or other text deemed appropriate by the responder. Because the Precedence field is non-standard and its interpretation varies widely, the use of Precedence is not specifically recommended by this specification, nor does this specification recommend any particular value for that field.
Gmail Bulk Senders Guidelines:
Messages should indicate that they are bulk mail, using the 'Precedence: bulk' header field.
Introduced to Trac in #5288.
#7499