Edgewall Software
Modify

Opened 16 years ago

Closed 8 years ago

Last modified 8 years ago

#7499 closed defect (wontfix)

Notification mail header "Precedence" should be configurable

Reported by: i.bardarov@… 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 Remy Blank)

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 anonymous, 16 years ago

Keywords: ui javascript added
Owner: changed from Emmanuel Blot to anonymous
Severity: trivialnormal
Status: newassigned

comment:2 by anonymous, 16 years ago

  1. abc

1. def

  1. 233

comment:3 by Remy Blank, 16 years ago

Description: modified (diff)
Keywords: notification added; ui javascript removed
Milestone: 0.13
Owner: anonymous removed
Severity: normaltrivial
Status: assignednew

An improved notification system is scheduled for 0.13.

comment:4 by Emmanuel Blot, 15 years ago

#8609 flagged as duplicate

comment:5 by Christian Boos, 15 years ago

(#8609 has a patch)

in reply to:  5 comment:6 by Emmanuel Blot, 15 years ago

Replying to cboos:

(#8609 has a patch)

Note that disabling this header is a bad workaround that may lead to other issues, such as the ones for which these headers have been initially introduced. I'm not sure Trac should send 'limited' emails to circumvent issues in other software…

comment:7 by dandre@…, 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:8 by Thijs Triemstra, 14 years ago

Cc: Thijs Triemstra added
Type: defectenhancement

+1 for making this configurable.

in reply to:  7 comment:9 by Thijs Triemstra, 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

     
    409409        headers['X-Trac-Version'] =  __version__
    410410        headers['X-Trac-Project'] =  projname
    411411        headers['X-URL'] = self.env.project_url
    412         headers['Precedence'] = 'bulk'
     412        headers['Precedence'] = 'list'
    413413        headers['Auto-Submitted'] = 'auto-generated'
    414414        headers['Subject'] = self.subject
    415415        headers['From'] = (self.from_name or projname, self.from_email)

comment:10 by anonymous, 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 anonymous, 12 years ago

Type: enhancementdefect

comment:12 by Peter Suter, 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 Peter Suter, 8 years ago

Milestone: next-major-releases
Resolution: wontfix
Status: newclosed

comment:14 by Ryan J Ollos, 8 years ago

I can confirm the mail message has precendence set to 'list' when the plugin is enabled.

comment:15 by Peter Suter, 8 years ago

Thanks for testing!


What is the Precedence: header good for anyway?

rfc:2076#section-3.9:

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.

Last edited 8 years ago by Peter Suter (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) 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.