Edit archived email? Is it possible?
Hello,
Does anyone know how to edit an archived email in Mailman3? It is possible in Mailman2 ( https://wiki.list.org/DOC/How%20do%20I%20edit%20the%20archives%20of%20a%20Ma...). Is there any option similar to this in Mailman3?
Kind regards, Prasanth
On 9/28/21 6:02 AM, Prasanth Nair wrote:
Hello,
Does anyone know how to edit an archived email in Mailman3? It is possible in Mailman2 ( https://wiki.list.org/DOC/How%20do%20I%20edit%20the%20archives%20of%20a%20Ma...). Is there any option similar to this in Mailman3?
In some sense the process is the same but possibly even simpler in Mailman 3. You need to modify the underlying data which requires appropriate access to the server.
In Mailman 3, the data are in the hyperkitty_email table in Mailman's database. You can get the Message-ID hash from the URL to the archived message, e.g. for the message to which I'm replying, the URL is https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/... and the hash is 7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA. Then if you have access, you can do database queries like
SELECT subject, content FROM hyperkitty_email WHERE message_id_hash =
'7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA';
and
UPDATE hyperkitty_email SET content = '<new content>' WHERE
message_id_hash = '7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA';
UPDATE hyperkitty_email SET subject = '<new subject>' WHERE
message_id_hash = '7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA';
If the message has attachments, they are in the hyperkitty_attachment
table and can be referenced by email_id
which is the corresponding
id
from the hyperkitty_email entry.
You can also do similar things via django-admin shell
. E.g.
$ django-admin shell
Python ...
(InteractiveConsole)
>>> from hyperkitty.models.email import Email
>>> x =
Email.objects.filter(message_id_hash='7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA')
>>> print(x[0].content)
but this requires some knowledge of HyperKitty's models and Django's ORM.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
Thank you for your help. Let me try this.
Kind regards, Prasanth
On Tue, 28 Sept 2021 at 18:03, Mark Sapiro <mark@msapiro.net> wrote:
Hello,
Does anyone know how to edit an archived email in Mailman3? It is
On 9/28/21 6:02 AM, Prasanth Nair wrote: possible
in Mailman2 (
https://wiki.list.org/DOC/How%20do%20I%20edit%20the%20archives%20of%20a%20Ma... ).
Is there any option similar to this in Mailman3?
In some sense the process is the same but possibly even simpler in Mailman 3. You need to modify the underlying data which requires appropriate access to the server.
In Mailman 3, the data are in the hyperkitty_email table in Mailman's database. You can get the Message-ID hash from the URL to the archived message, e.g. for the message to which I'm replying, the URL is
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/... and the hash is 7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA. Then if you have access, you can do database queries like
SELECT subject, content FROM hyperkitty_email WHERE message_id_hash = '7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA';
and
UPDATE hyperkitty_email SET content = '<new content>' WHERE message_id_hash = '7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA'; UPDATE hyperkitty_email SET subject = '<new subject>' WHERE message_id_hash = '7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA';
If the message has attachments, they are in the hyperkitty_attachment table and can be referenced by
email_id
which is the correspondingid
from the hyperkitty_email entry.You can also do similar things via
django-admin shell
. E.g.$ django-admin shell Python ... (InteractiveConsole) >>> from hyperkitty.models.email import Email >>> x = Email.objects.filter(message_id_hash='7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA') >>> print(x[0].content)
but this requires some knowledge of HyperKitty's models and Django's ORM.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Hi Mark,
Many thanks for your help. I have managed to modify some of the messages after following your instructions.
Kind regards, Prasanth
On Wed, 29 Sept 2021 at 08:08, Prasanth Nair <prasanth.nair@linaro.org> wrote:
Hi Mark,
Thank you for your help. Let me try this.
Kind regards, Prasanth
On Tue, 28 Sept 2021 at 18:03, Mark Sapiro <mark@msapiro.net> wrote:
Hello,
Does anyone know how to edit an archived email in Mailman3? It is
On 9/28/21 6:02 AM, Prasanth Nair wrote: possible
in Mailman2 (
https://wiki.list.org/DOC/How%20do%20I%20edit%20the%20archives%20of%20a%20Ma... ).
Is there any option similar to this in Mailman3?
In some sense the process is the same but possibly even simpler in Mailman 3. You need to modify the underlying data which requires appropriate access to the server.
In Mailman 3, the data are in the hyperkitty_email table in Mailman's database. You can get the Message-ID hash from the URL to the archived message, e.g. for the message to which I'm replying, the URL is
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/... and the hash is 7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA. Then if you have access, you can do database queries like
SELECT subject, content FROM hyperkitty_email WHERE message_id_hash = '7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA';
and
UPDATE hyperkitty_email SET content = '<new content>' WHERE message_id_hash = '7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA'; UPDATE hyperkitty_email SET subject = '<new subject>' WHERE message_id_hash = '7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA';
If the message has attachments, they are in the hyperkitty_attachment table and can be referenced by
email_id
which is the correspondingid
from the hyperkitty_email entry.You can also do similar things via
django-admin shell
. E.g.$ django-admin shell Python ... (InteractiveConsole) >>> from hyperkitty.models.email import Email >>> x = Email.objects.filter(message_id_hash='7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA') >>> print(x[0].content)
but this requires some knowledge of HyperKitty's models and Django's ORM.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Hi Mark,
As you know, we can edit the individual messages using the message_id_hash. Is there any possibility that we can edit the original message which then updates all of the threads it has (for example, if someone already replied to the original message)? Or do we need to edit each message manually?
Kind regards, Prasanth
On Wed, 29 Sept 2021 at 15:46, Prasanth Nair <prasanth.nair@linaro.org> wrote:
Hi Mark,
Many thanks for your help. I have managed to modify some of the messages after following your instructions.
Kind regards, Prasanth
On Wed, 29 Sept 2021 at 08:08, Prasanth Nair <prasanth.nair@linaro.org> wrote:
Hi Mark,
Thank you for your help. Let me try this.
Kind regards, Prasanth
On Tue, 28 Sept 2021 at 18:03, Mark Sapiro <mark@msapiro.net> wrote:
Hello,
Does anyone know how to edit an archived email in Mailman3? It is
On 9/28/21 6:02 AM, Prasanth Nair wrote: possible
in Mailman2 (
https://wiki.list.org/DOC/How%20do%20I%20edit%20the%20archives%20of%20a%20Ma... ).
Is there any option similar to this in Mailman3?
In some sense the process is the same but possibly even simpler in Mailman 3. You need to modify the underlying data which requires appropriate access to the server.
In Mailman 3, the data are in the hyperkitty_email table in Mailman's database. You can get the Message-ID hash from the URL to the archived message, e.g. for the message to which I'm replying, the URL is
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/... and the hash is 7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA. Then if you have access, you can do database queries like
SELECT subject, content FROM hyperkitty_email WHERE message_id_hash = '7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA';
and
UPDATE hyperkitty_email SET content = '<new content>' WHERE message_id_hash = '7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA'; UPDATE hyperkitty_email SET subject = '<new subject>' WHERE message_id_hash = '7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA';
If the message has attachments, they are in the hyperkitty_attachment table and can be referenced by
email_id
which is the correspondingid
from the hyperkitty_email entry.You can also do similar things via
django-admin shell
. E.g.$ django-admin shell Python ... (InteractiveConsole) >>> from hyperkitty.models.email import Email >>> x = Email.objects.filter(message_id_hash='7PVJL23DLSWMXXL44ALQUO6VSYBRZ4OA') >>> print(x[0].content)
but this requires some knowledge of HyperKitty's models and Django's ORM.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
Prasanth Nair writes:
As you know, we can edit the individual messages using the message_id_hash. Is there any possibility that we can edit the original message which then updates all of the threads it has (for example, if someone already replied to the original message)? Or do we need to edit each message manually?
What do you mean by "update threads"? If you mean, "make the same edit to quoted material in later posts in the same thread", you have to do that manually. Because of the variety of quoting styles, the fact that well-trained users will trim or edit much of the content, and the fact that some MUAs will refill paragraphs, you'd have to check every message anyway to ensure that the desired edit was actually made. It's not something that can be done automatically.
If it's something that cause security exposure or legal liability for the host, don't forget to edit all alternative parts, by the way. Eg, the message has both text/plain and text/html alternatives, and you don't strip the HTML, the text you want to change will be duplicated in both parts.
If that's not what you meant, please explain in more detail.
Steve
On 10/7/21 6:31 AM, Prasanth Nair wrote:
Hi Mark,
As you know, we can edit the individual messages using the message_id_hash. Is there any possibility that we can edit the original message which then updates all of the threads it has (for example, if someone already replied to the original message)? Or do we need to edit each message manually?
You need to edit each message. A reply which quotes some or all of another message contains that quoted text as opposed to some reference to the text in the original message. Thus, editing the text in the original message has no effect on quoted text in the reply.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Mark Sapiro
-
Prasanth Nair
-
Stephen J. Turnbull