mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 00:35:51 +03:00
[GH-ISSUE #253] Plus Addressing for tags #168
Labels
No labels
awaiting feedback
bug
docker
documentation
enhancement
github_actions
invalid
pull-request
question
stale
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/mailpit#168
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mitchellkellett on GitHub (Feb 28, 2024).
Original GitHub issue: https://github.com/axllent/mailpit/issues/253
Google, and now Office 365, supports plus addressing. It would be awesome if we could use plus addresses for tags as an alternative option via the header.
@axllent commented on GitHub (Feb 28, 2024):
That's a great idea, thanks!
@axllent commented on GitHub (Mar 2, 2024):
Plus addressing has now been added to v1.14.1.
I have also added an option (
--tags-title-caseorMP_TAGS_TITLE_CASE=true) to automatically TitleCase newly-created tags (manual or automatic) which may be useful here, meaninguser+tag@example.comwould create a tag calledTag(nottag). This option will not change any existing tags, only new ones.Please confirm this works as you expect? Thanks.
@mitchellkellett commented on GitHub (Mar 7, 2024):
Hey, sorry I didn't get to test this sooner.
It seems to work fine with one tag

But not with 2 (I don't know what Google and the likes do if you use multiple plus addresses).

Interestingly, it also applies the logic to the from as well. Not sure if that's intentional. I do like it, though.

Title case worked as I expected it to.

@axllent commented on GitHub (Mar 7, 2024):
Thanks for the testing & feedback @mitchellkellett. I don't think there is a standard for this type of thing as whilst Gmail (for instance) supports the
test+tag1+tag2syntax, it's not "translating" that into tags, it's just an address which you can do what you like with.So your expectation is that
test+tag1+tag2would apply bothtag1andtag2? I'm sure that shouldn't be a problem, just not until next week as I'm away for a few days. I'll look into this though.You are correct about the plus addressing detecting not only the To, but all fields (To, From, Cc and Bcc - this is intentional.
I'm also wondering if
yes-no-maybeshould becomeyes no maybe~ as in-replaced with a space. This would only apply to plus addressing as it's not possible to otherwise have tags with spaces. What are your thoughts?@mitchellkellett commented on GitHub (Mar 7, 2024):
My very quick test showed that Google was happy to accept multiple tags, but Outlook only liked one tag (it actually rejected the message when I used two).
Following the Google logic, yes, apply both tags.
I don't think it should have spaces, I think that you either combine multiple tags to get it or you concat them with hyphens.
@axllent commented on GitHub (Mar 7, 2024):
Are you meaning that
test+tag1+tag2should tag it astag1 tag2(one tag, two words), or as two separate tags?@mitchellkellett commented on GitHub (Mar 8, 2024):
Google tags it as two separate tags, so
tag1andtag2. So I think that's the way to proceed personally.@axllent commented on GitHub (Mar 9, 2024):
The latest release adds support for adding multiple tags. I'm away for a few days so I haven't tested this as much as I would like to have, but could you please test this and confirm it is working as you expect now? Thanks.
@mitchellkellett commented on GitHub (Mar 9, 2024):
I found a bit of an unusual bug when I have
MP_TAGS_TITLE_CASE=true. But otherwise, the tags are created correctly when the message is received.I sent these 6 messages, which all worked fine.

I then went in and read the first one I sent, when I go back to the inbox, they've all be dropped down to lower case.

@axllent commented on GitHub (Mar 9, 2024):
Thanks for testing. Title casing only applies to new tags, but you already had the lowercase tags in the database from the previous tests. This is just a "cosmetic issue", not a functional one, so for the purpose of this I'm not worried about it. One day I'll try to find an elegant solution to this without having to query the database twice (set this tag, and then what tags do you actually have) as this would add a lot of unnecessary database queries for every new message.
Cool, I'll close this issue now as I'd say it's working.