Yeah, this is totally unclear from Adobe.
One solution is to, as you said, install a smtp server. I did however solve this in two different ways which both worked for me.
Solution 1 Install Mark Shust module for disabling 2fa (really not recommended, but works).
Solution 2 Install a smtp module, i used Mageplazas Smtp-module and then configured it through bin/magento to use mailtrap
Solution 3 Another way would be to follow David Alger’s guide here docs.warden.dev/environments/initializing.html search for 2fa on that page.
Does require python and some other tools but pretty basic.
Solution 4 =D Just do “bin/magento module:disable Magento_TwoFactorAuth”, but like said before, not recommended, especially not in production.
So, having done this during the Live Stream, we worked out that you can get a very rudimentary SMTP service working on your Web Server by following these steps.
1. Install Postfix (I left all options as default values)
sudo apt install mailutils
2. Open postfix config file
sudo nano /etc/postfix/main.cf
3. Replace the following
inet_interfaces = all
with
inet_interfaces = loopback-only
4. Save your changes and Close the nano editor by pressing:
Ctrl+X to exit, Y to save and Enter to confirm.
5. Restart Postfix for changes to take affect
sudo systemctl restart postfix
Notes
Your 2FA email will go to your SPAM when you refresh the Magento backend login page
These steps are the bare minimum required to send out an email. There is much more to configure if you plan to use SMTP in a Production Environment
Thank you to those who spotted the typo during the stream to get this working
I believe adding SMTP capability to your web server is the preferred method that Magento want you to use because it doesn’t involve disabling 2FA at any point