apache / apache/ponymail

Bug: edit-list.py--mid parameter is not handled correctly

Open
#339 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
80
Forks
32
PR merge metrics
No merged PRs in 30d

Description

The --mid parameter is documented in the help message as follows:

"Source Message-ID to edit"

However, when it is used in the query, it is matched against the 'mid' property, rather than 'message-id'. In other words, the help text is incorrect.

Furthermore, since the 'mid' property is analysed, and its values contain break characters, it's not actually possible to retrieve a message by its full mid.

It is possible to retrieve a message by using a part of the mid, e.g. if mid='abcd@' then one can match on 'abcd'. But this may not be unique; there may be matching messages on multiple mailing lists.

It would be possible to change the code to match against 'message-id', because that is not analyzed. This would agree with the Help message. However, message-ids are not unique - e.g. if a message is sent to multiple lists they will all have the same message-id, and the message-ids may not be unique. So this should not be the only way to select a message.

Another solution is to match against the internal '_id'.
This is guaranteed to be unique, and is the same as the 'mid'.
In which case the Help message needs to be adjusted accordingly.

Or perhaps the code should support both message-id and _id as selectors.

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect edit-list.py's handling of --mid, including the help text and the query match against mid, message-id, or _id. Compare the selector semantics and uniqueness trade-offs described in the issue; done means the selected behavior is implemented consistently and the help message accurately describes it.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.