Debian 11

apt install mariadb-server nginx php-fpm

# ensure this part is uncommented in /etc/nginx/sites-available/default

#location ~ \\.php$ {
#                include snippets/fastcgi-php.conf;
#
#                # With php-fpm (or other unix sockets):
#                fastcgi_pass unix:/run/php/php7.4-fpm.sock;
#        }

apt install postfix postfix-mysql dovecot-imapd dovecot-lmtpd dovecot-pop3d dovecot-mysql roundcube
# Roundcube will cause TUI to show up, and root unix auth == just hit enter
mkdir -p /etc/postfix/sql

echo "
user = postfixadmin
password = P4ssvv0rD
hosts = 127.0.0.1
dbname = postfixadmin
query = SELECT domain FROM domain WHERE domain='%s' AND active = '1'
" > /etc/postfix/sql/mysql_virtual_domains_maps.cf