Roundup Tracker - Issues

Message6932

Author rouilj
Recipients Ivan Pozdeev, ber, pefu, richard, rouilj, stefan, tekberg
Date 2020-07-29.01:31:01
Message-id <1595986262.41.0.485096500525.issue2550564@roundup.psfhosted.org>
In-reply-to
In response to msg3809 I have made mailgw.py treat any Auto-Submitted 
header with a value other than no the same as we treat precedence bulk 
email. rev6247:ca0915457761

I would like to solve the original issue as well. I see two things we 
need:

1) by default add Auto-Submitted: auto-generated to outgoing mail
2) provide method(s) to set headers Auto-Submitted and Precedence to
   another value or remove the headers entirely.

I was considering in mailer.py creating:

  Mailer::outgoing_headers = { "Precedence": "bulk",
                                "Auto-Submitted": "auto-generated"
                             }

this will be used by set_message_attributes:

  for header, value in self.outgoing_headers:
     if value is not None:
        message[header] = value
     else:
        del(message[header])

to replace current code that sets Precedence to bulk.

Now the question is how does somebody set this?

Can it be set in the tracker's interfaces.py:

  from roundup.mailer import outgoing_headers
  outgoing_headers['Precedence'] = None

does this work?

Can it be set somehow in a detector so IssueClass::nosymessage
which calls IssueClass::send_message which calls 
Mailer::set_message_attributes does the RightThing(TM)?

Currently nosymessage includes add_headers and passes it to 
send_message. If we move the processing for add_headers after 
set_message_attributes is called in send_message and modify
processing to allow the value to be None to indicate deletion
of a header. I think we have a better way to modify the headers.

I kind of like using add_headers as well as outgoing_headers
for Mailer.

A user may want different settings for nosy messages as opposed to 
admin notification messages sent due to a roundup crash.

This allows those two cases to be handled separately.

Thoughts?

-- rouilj
History
Date User Action Args
2020-07-29 01:31:02rouiljsetmessageid: <1595986262.41.0.485096500525.issue2550564@roundup.psfhosted.org>
2020-07-29 01:31:02rouiljsetrecipients: + rouilj, richard, stefan, ber, pefu, tekberg, Ivan Pozdeev
2020-07-29 01:31:02rouiljlinkissue2550564 messages
2020-07-29 01:31:01rouiljcreate