greenmail
greenmail copied to clipboard
Admin user feature (Second attempt)
Sorry about https://github.com/greenmail-mail-test/greenmail/pull/185 I removed CRLF to LF, now you could see admin functionality. I beleive, that admin users should be able to get all emails from all boxes. This will be very usefull for using greenmail in development.
Some thoughts about this:
- Is "admin" the correct name? User does not administrate. It is more of a sink or wildcard user.
- Current API would enable multiple admin users. This probably makes no sense?
- Instead of configuring such a user, what about one predefined special user with this behaviour, always available? By convention instead of having to add such a user?
I could think of additional predefined, special users:
- {greenmail.all}@greenmail for all mails, for all domains
- {greenmail.all}@<DOMAIN> for all mails for given DOMAIN
I also wanted to add that it's not clear to me why you need an admin user?
@Lewik can you explain to us what you're trying to accomplish?
- What is your use case?
- How would this functionality help you accomplish what you're trying to do.
I beleive, that admin users should be able to get all emails from all boxes. This will be very usefull for using greenmail in development. This will be very usefull for using greenmail in development.
This statement does not explain why you need this feature. Based on the PR it sounds like what you're trying to do is add an API to allow for easy access to any users email in a mailstore.
@buildscientist At the moment we (team) need to implement some sort of intelligence mail ... blast. Broadcast to multiple users. Each user have particular email. Like [email protected] [email protected] and so on. While developer works on that, he need to login (we use web ui for that) to [email protected] than login to [email protected] - it's not useful. We will be very happy, if we could have one account to get ALL emails. We will have more complicated mail blasts, so we really need this. Seems that @marcelmay got what I want, may be he can explain more verbose. "you're trying to do is add an API to allow for easy access to any users email in a mailstore" - yes I do.
@marcelmay I just found https://github.com/mbaechler/Greenmail/pull/14 and try to repeat admin (ALL emails) part
- Yes, admin user do not administrate. I'm not so good at English, please choose any name and I will rename it.
- Yes, after my PR there can be multiple admin users. Multiple is not necessary but there really no need to restrict number of admin. Devs/Test will configure users and they will have all info about that.
- Actually, I don't this that predefined wildcard users is good idea:
- Hardcode is not good.
- I can't come up with example, but I believe that there can be some existed naming convention within dev team. And our predefined user could mismatch with that.
- As I know, greenmail is only for devs/tests. Devs/tests do not need to made doman-wildcard-user. Either I can code configurable doman-wildcard-user. But I don't think that this is useful.
Any updates?
@Lewik Why do you need to configure this special user, what is the motivation/requirement vs. a preconfigured one?
@marcelmay I can't come up with 100% reason. Why preconfigured is better? =)
Because you do not require an API, and Convention over Configuration. No API maintenance, no increased complexity.