A quick question: is there any problem known regarding sending mails vie the maildev service? I can't get it to work. Mails are simply stored as files on the containers volume but not sent out. I think that the auto-relay feature is off (by default) and enabling it via an environment variable does not work since the set value (like true) is then taken as the receiver mail address. I opened an issue here https://github.com/maildev/maildev/issues/501 but no answer yet.
Maybe I am doing something wrong ;)
The mails are here
root@ecap-s051:/raid/km3net-dataverse/mail# ls -al
total 48
drwxr-xr-x 2 tgal tgal 4096 Sep 20 16:01 .
drwxr-xr-x 10 root root 4096 Jul 3 22:56 ..
-rw-r--r-- 1 tgal tgal 799 Sep 13 15:11 6CCFTjjF.eml
-rw-r--r-- 1 tgal tgal 738 Sep 13 10:23 8nszk2Cu.eml
-rw-r--r-- 1 tgal tgal 797 Sep 20 16:01 AdhVA5rZ.eml
-rw-r--r-- 1 tgal tgal 752 Sep 13 10:46 cnpXNCO8.eml
and look OK-ish (apart that the link to Dataverse is shown as localhost:8080)
Do you mean you don't see emails at http://localhost:1080 like this?
I did not expose that port. I thought it would send the mals automatically ;) I assume that if the mails are stored locally, they are not sent yet.
to be clear: I meant that nothing is arriving at the user. The instance has a valid URL with proper SSL certificate. I don’t know why it still puts “localhost” in the mail body but the mail header itself looks fine with the correct noreply email address etc. They are simply not arriving in anyone’s inbox. I can only see those mails as files in the mail folder of the maildev container.
Please don't use maildev as an MTA. You should look into either use some MTA of your institution or, if you need to mangle the mail before it's sent to a user (e.g. for SMIME signing), into deploying Postfix or other small-scale MTAs and use it as a relay.
Maildev really is meant to be used within a development scenario, where you don't want mails to be sent to arbitrary places. We use maildev also in integration tests to verify the sending process, etc.
In 6.2 the mail subsystem configuration of Dataverse has been reworked and should be pretty easy to use with any MTA out there.
Also keep in mind that for real usage, you should make sure you use servers as your final MTAs when leaving your organization that are added to the DNS based SPF records. Otherwise alot of receiving mailservers of your users will start rejecting/discarding the mails you're sending as Spam.
(I'm not even starting to talk about DANE and DKIM. SPF is the most crucial one these days.)
Hmm, you're making me think that when we declare our containers ready for production, in the compose file we should swap out Maildev for a real SMTP server. :thinking:
To be honest, i was already wondering :sweat_smile:
alright, i will amend ;)
Maildev is very handy in dev! I used it this week! :grinning:
Actually we probably should leave any MTA out or just have a commented out Postfix example. People need to make up their minds about this stuff for production.
I agree @Oliver Bertuch !
Now that I use the GMail SMTP server directly, I get a
jakarta.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted. For more information, go to
535 5.7.8 https://support.google.com/mail/?p=BadCredentials 5b1f17b1804b1-42e754a69a7sm69421145e9.34 - gsmtp
which is strange since the credentials are definitely correct.
I am using these environment variables
DATAVERSE_MAIL_MTA_HOST: "smtp.gmail.com"
DATAVERSE_MAIL_MTA_PORT: "465"
DATAVERSE_MAIL_MTA_SSL_ENABLE: "true"
DATAVERSE_MAIL_MTA_AUTH: "true"
DATAVERSE_MAIL_MTA_USER: "foo@gmail.com"
DATAVERSE_MAIL_MTA_PASSWORD: "..."
According to the docs, the settings should be named correctly. :confused:
Did you activate SMTP in your Gmail Account?
Did you use an application password? (In case you're using 2FA)
Can you use the same credentials and connection details from some other app, like an email program?
Ah, that's a new Google Account and I just realised that they restricted the authentication methods
I now need to activate 2FA and create an App password
Please note that you might also need to enable SMTP access!
yep, now going through all the hassle ;)
thanks for the hint
this also means I will need to update a few other services with Gmail SMTP, since end of september they drop the basic auth method
You could try using Sasl Oauth2
It should be possibly to configure this since v6.2
aah that's also an option
very nice
It would also be helpful to document your findings in the guide
So others can benefit, too
yes, definitely
Keep in mind that there is a debug switch in the mail settings. It will make the logs more verbose in case you need to do some diggin'
ok
Happy hacking!
currently the only annoying thing is that i need to restart the full service, which takes about 10 minutes to start up
thanks ;)
10 minutes????
yes roughly
:exploding_head:
I see the Payara page for a very long time until the actual Dataverse appears
Man you need some beef on that machine!
oh i have
It usually takes about 2 minutes
128 corese, 512GB RAM
10 is very odd!
currently not restricted at all
Can you say from the timestamps in the logs where it slows down?
There might be some timeout for sth
Usually I redeploy on my laptop in under 2 minutes, full cycle
ah wait, i am an idiot, i have restricted it to 2GB RAM and 1 CPU :laughing:
Screenshot-2024-09-21-at-10.11.37.png
That's the default for the container, yes
i totally missed that...
ok so it will utilise all the CPUs if i give more, or is there a maximum?
If you don't give any restrictions, it will take and run with what's there
perfect
Beware that you really should limit the Ram
Otherwise it will allocate a very large heap, 70% of what the container has available
You won't want that to happen :sweat_smile:
A reasonable size to getting started would be 4g or 8g. Probably @Don Sizemore ears are burning now
yes don't worry :D
i started with 8GB and 4CPUs, initialises much faster
SMTP works too
one last thing: the URL is still localhost:8080
Screenshot-2024-09-21-at-10.14.57.png
i could not figure out yet where to change that ;)
i have a commented out _CT_DATAVERSE_SITEURL env var
but don't remember anymore what it was commented out :sweat_smile:
If you're running 6.3 with Payara 6.2024.6 you don't need the _ct thing anymore
https://guides.dataverse.org/en/latest/installation/config.html
ok so i use that with DATAVERSE_SITEURL as env var,
You can just use Dataverse_siteurl and dataverse_fqdn now
ok
All uppercase please. Too hard to type on mobile
yesyes :) thanks, just confirming
Tamas Gal has marked this topic as resolved.
One last thing: if you would like to see a reload admin api endpoint to trigger re-init of subsystems like mail etc, please create an issue! I've been thinking about this for some time. Not sure when it would get implemented, but it certainly would help. Might become relevant for SPA work which makes it more likely to be implemented quicker
Yes that might be something but not sure if it's worth the hassle. I mean, it might save one or two hours of deployment work but that's usually a one-time thing ;)
everything works now :) deployed in Docker Swarm successfully
sorry for being off-topic but the bootstrap service is still trying every few seconds, I guess i can simply remove it now? i understood that it's only needed for the very first deployment
Screenshot-2024-09-21-at-10.28.44.png
It might be nice to put down your experiences with Swarm. It's a nice compromise between compose and k8s
i will check out how to contribute to your docs in the next days
The bootstrap will detect it doesn't need to do anything and quit. If it bothers you, drop it.
bootstrap:
image: gdcc/configbaker:alpha
environment:
- TIMEOUT=3m
command:
- bootstrap.sh
- dev
that's the service right now. not sure if dev is correct in production
No it usually isn't 1:laughing:
ok ;) so remove dev and let it cycle? ;)
You really shouldn't :grimacing:
No, you need to provide a different profile
IIRC the demo guides page had something about this documented
ok i will check
We are officially not yet production ready with all of this. Still a long way to go to make it easily accessible and polished enough
You're breaking new ground :wink:
ahah ok ;)
i only found this about bootstrap: https://guides.dataverse.org/en/latest/container/running/demo.html# and it lists dev and demo
i am a bit confused but I think demois now the correct choice? or is bootstrapping not needed at all since settings are already settled? maybe I just don't understand if "boostrapping" is related to the very first deployment (setting up databases, directories etc.) or the actual start of the docker service stack...
especially this sentence:
One of the main differences between the “dev” persona and our new “demo” persona is that we are now running the setup-all script without the
--insecureflag. This makes our installation more secure, though it does block “admin” APIs that are useful for configuration.
So if I now switch to demo, will it "reset" the settings or is no setup-all triggered anymore?
sorry for the dumb questions ;)
Once bootstrapped, it will not do it again
The main difference is the securing of certain api endpoints
ok so now i need to manually secure everything through the admin API
You can do that manually
alright, thanks!
i will then leave it as it is
You should think about creating your own persona with all your settings, etc
That way it's easy to spin up a new instance with the same configuration
The configbaker image guides page has more details on that IIRC
Wrote it myself but keep forgetting these details :big_smile:
Yes, please open issues to document things. Or if it's easier, you can start a thread in #docs
Last updated: Oct 30 2025 at 05:14 UTC