mirror of
https://github.com/axllent/mailpit.git
synced 2026-04-26 16:56:00 +03:00
[GH-ISSUE #331] Configuring tags via config-file does not work #218
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#218
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 @ppasieka on GitHub (Jul 7, 2024).
Original GitHub issue: https://github.com/axllent/mailpit/issues/331
I'm trying to configure the automatic tags assignment to emails.
My docker-compose looks like:
And my
mailpit-config.yamllooks likeI tried different variations on the match phrases (no braces, only single words, etc.), but nothing worked.
In the Mailpit application logs, I can see the following:
When I use the environment variables to set tags, then tagging to works
Am I doing something wrong?
@ppasieka commented on GitHub (Jul 7, 2024):
short python script to help test this out
@ppasieka commented on GitHub (Jul 7, 2024):
Ok. I found what is wrong: the documentation is outdated.
The YAML parser for tags expects the
tagsas a key, notkeywordskey:Changing my
mailpit-config.yamlcontent to:And this makes it work!
@axllent commented on GitHub (Jul 7, 2024):
Ahh, damn, that keywords => tags is obviously my bad, I'll fix the documentation once I'm on my computer and can double check this. In addition to this, in yaml
[]has a special meaning (an array). Try to quote your match values, egmatch: "[error-internal-server-error]"@axllent commented on GitHub (Jul 7, 2024):
You are absolutely correct @ppasieka, that was a very bad documentation mistake, especially considering that I use this feature myself. I sincerely apologise! I have fixed the documentation and added quotes to the example to hopefully help prevent others from making a similar mistake (eg: using
[]). I will close this issue, however please feel free to re-open it if you have any other issues. Thanks for the bug report!