Script to run from cron to send daily messages to IETF Announce showing the email header field change.

This should be run from Jan 6 to Jan 20, after which point we need to deploy analagous changes to the code that constructs last call announcements.

This is related to bug #811

Commit ready for merge.
 - Legacy-Id: 6857
This commit is contained in:
Robert Sparks 2013-12-09 19:01:44 +00:00
parent ac799a9874
commit c500184eee
2 changed files with 70 additions and 0 deletions

37
ietf/bin/announce-header-change Executable file
View file

@ -0,0 +1,37 @@
#!/usr/bin/env python
import datetime
from django.core import management
from django.template.loader import render_to_string
from ietf import settings
from ietf.utils.mail import send_mail_preformatted
from ietf.utils.mail import send_mail
management.setup_environ(settings)
target_date=datetime.date(year=2014,month=1,day=20)
send_mail(request = None,
to = "IETF-Announce <ietf-announce@ietf.org>",
frm = "The IESG <iesg-secretary@ietf.org>",
subject = "Upcoming change to announcement email header fields (using old header)",
template = "utils/header_change_content.txt",
context = dict(oldornew='old', target_date=target_date),
extra = {'Reply-To' : 'ietf@ietf.org',
'Sender' : '<iesg-secretary@ietf.org>',
}
)
send_mail(request = None,
to = "IETF-Announce:;",
frm = "The IESG <noreply@ietf.org>",
subject = "Upcoming change to announcement email header fields (using new header)",
template = "utils/header_change_content.txt",
context = dict(oldornew='new', target_date=target_date),
extra = {'Reply-To' : 'IETF Discussion List <ietf@ietf.org>',
'Sender' : '<iesg-secretary@ietf.org>',
},
bcc = '<ietf-announce@ietf.org>',
)

View file

@ -0,0 +1,33 @@
{% filter wordwrap:73 %}
We will soon be changing the header fields used in IETF Last Call messages sent to the IETF Announce mailing list.
This message is to to inform you of the change and allow you to test that you are properly receiving messages using the new header fields.
We are making this change to make it more likely that replies go to the intended recipients.
This message will be repeated daily using both the old and new header.
This instance of the message was sent using the {{oldornew}} header.
Please ensure you receive both versions.
These messages will cease, and all Last Call messages to this list will switch to using the new header on or shortly after {{target_date}}.
The specific changes are:
{% endfilter %}
Old:
From: The IESG <iesg-secretary@ietf.org>
To: IETF-Announce <ietf-announce@ietf.org>
Reply-To: ietf@ietf.org
New:
From: The IESG <noreply@ietf.org>
To: IETF-Announce:;
Reply-To: IETF Discussion List <ietf@ietf.org>
and the message sent using the New header fields will also be
Bcc-ed to <ietf-announce@ietf.org>
Thanks for your patience as we make this adjustment,
The IESG