Mails über eigenen Server mit TLS Verschlüsselung

sudo apt install sendmail
hostnamectl set-hostname myhostname.com

sudo nano /etc/hosts
127.0.0.1 localhost myhostname.com
sudo sendmailconfig

confirm all mit y for yes

sudo service nginx restart

lokaler test:

sendmail -v someone@email.com

From: you@yourdomain.com
Subject: This is the subject field of the email
This is the message to be sent.
.

sudo nano /etc/php/7.4/fpm/php.ini

strg + w
sendmail

sendmail_path= /usr/sbin/sendmail -t -i

sudo service php7.4-fpm restart