DEV Community

nabbisen
nabbisen

Posted on

1 2

Mailman: How to update subject prefix number (post id)

Summary

This post is about GNU Mailman and shows how to update the post id which appers in subject_prefix as prefix number.
It might be useful if you migrated Mailman servers using subject_prefix option.

* "Mailman" in this post means not Mailman3 but Mailman2, because I use OpenBSD.

Tutorial

Use withlist, "the most powerful and flexible script in Mailman", to manage the database.

# /usr/local/lib/mailman/bin/withlist $LIST_NAME
Loading list $LIST_NAME (unlocked)
The variable `m` is the $LIST_NAME MailList instance
Enter fullscreen mode Exit fullscreen mode

Lock the database files and update the post id.

>>> # check it
>>> m.post_id
current number

>>> # update
>>> m.Lock()
>>> m.post_id = 9999
>>> m.Save()

>>> # validate it
>>> m.post_id
updated number
Enter fullscreen mode Exit fullscreen mode

Quit the prompt.

>>> quit()
Unlocking (but not saving) list: $LIST_NAME
Finalizing
Enter fullscreen mode Exit fullscreen mode

Done :)

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

πŸ‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay