mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 08:45:54 +03:00
[GH-ISSUE #332] Documentation about tags #220
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#220
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 @blackshot on GitHub (Jul 9, 2024).
Original GitHub issue: https://github.com/axllent/mailpit/issues/332
I'm currently trying to implement mailpit as a developer centralized mail sandbox for all my mails, in order to effectively do that i need to implement automatic tags, i made a yaml file as documentation says, it loads the tags but none of the emails are being tagged.
i couldn't find any documentation of how to build a matcher. even i tried to find it in source code but couldn't find anything.
EDIT: I somehow made it work using matcher "addressed:..." but "from:..." is not working.
@axllent commented on GitHub (Jul 9, 2024):
Hi @blackshot.
I cannot really make any comment without seeing the exact filter syntax you are using.
The following types of filter rules should work (you'll see both uses of
addressed:andfrom:which work as expected for me):This is documented here. The match is exactly the same as you would use in the web UI to search/filter messages, which is documented here.
Edit: I wonder if it had to do with the quotes that were in the documentation (it had quotes around the
matchvariables) ... it works perfectly fine for me without quotes (which I have now removed from the documentation).@blackshot commented on GitHub (Jul 9, 2024):
i just copied and pasted the documentation then removed the subject and addressed examples and left only the "from" example and changed the mail. didn't work, obviously i checked yaml syntax and enabled --verbose to check if it was loaded. it was.
could it be that "from" is in format
"Name Surname" <example@domain.tld>?@axllent commented on GitHub (Jul 10, 2024):
Yes, that could be it. Please try your search first in the web UI to make sure it works we you would expect. I think in your case you probably want
from:example@domain.tld.@blackshot commented on GitHub (Jul 17, 2024):
did exactly that and didn't work haha, i opted just to use "addressed:example@domain.tld" and controlling it by recipient which is working.
@axllent commented on GitHub (Jul 17, 2024):
Sorry, then I'm totally out of ideas as it's just guesswork here because I don't know the exact syntax you originally used in your yaml config, nor exactly what your email headers say. I realise the sensitivity of the information though (not to put it on GitHub etc).
Given that you have a working solution using
addressed:, I'm going to close this issue as it doesn't look like something that can be solved unless I have all that information,. As I also mentioned earlier, I usefrom:and it is working for me, so I don't believe it is a bug either 👍@bthall commented on GitHub (Aug 16, 2024):
Commenting in hopes that it will help others.
I encountered a similar issue in which none of my filters would work on a docker instance. I had previously set up this container and tried to add the
MP_TAGS_CONFIGenvironment variable and configuration file afterward. Even after running adocker compose downanddocker compose up, the tag filters were not loaded even though I verified the files were available within the container.I had to
docker compose downand thendocker image rm axllent/mailpitbefore executingdocker compose upagain. It seems like the tags configurationMP_TAGS_CONFIGis only loaded on the first run of the container. With that said, I probably would have been fine by just runningdocker compose downanddocker compose up --build --force-recreate.@axllent commented on GitHub (Aug 16, 2024):
That is strange @bthall, and definitely not a limitation within Mailpit. Each time Mailpit restarts it will load whatever environment settings (or flags) are passed to it, and there should be no need to delete the docker image at all.
What may however be happening here is that when you
docker compose upwith an existing container it just starts the container with previously set variables? I'm not 100% sure though as I'm not a big user ofdocker compose(I use docker a lot though, but always delete the old container when redeploying). If this is the case then I do not think this is normal Docker (compose) behaviour either, unless you were usingrestartinstead ofdownand thenup.The easy way to test is to log into your running docker container, assuming it's name is "mailpit":
docker exec -it mailpit shand then typeenvwhich will print out the current environment variables.