llLet’s Encrypt SSL on Ubuntu 24
apt install apache2 -yInstall Certbot and the Apache Plugin
apt install certbot python3-certbot-apache -yvim /etc/apache2/sites-available/worldcm.net.conf---------<VirtualHost *:80> ServerAdmin webmaster@worldcm.net ServerName worldcm.netServerAlias www.worldcm.netDocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>---------Enable the site and necessary modules with:a2ensite worldcm.net.conf a2enmod rewrite a2enmod sslVerify the Apache configuration:apache2ctl configtestsystemctl reload apache2Obtain and Install an SSL Certificate
certbot --apache -d worldcm.net -d www.worldcm.netORcertbot --apache -d worldcm.net -d mail.worldcm.net# crontab -e0 */12 * * * certbot renew --quietPostfixvim /etc/postfix/main.cfConfigure Postfix to use TLS encryption:smtpd_use_tls = yessmtpd_tls_security_level = maysmtpd_tls_protocols = !SSLv2, !SSLv3smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crtConfigure User Authentication (Optional): Install SASL Packagessudo apt install libsasl2-modules sasl2-bin -yConfigure SASL: Open the SASL configuration file:sudo vi /etc/postfix/sasl/smtpd.confAdd:pwcheck_method = saslauthdmech_list = plain loginEnable and start the SASL authentication daemon:sudo systemctl enable saslauthdsudo systemctl start saslauthdConfigure Postfix to use SASLsudo vim /etc/postfix/main.cfAdd:smtpd_sasl_type = dovecotsmtpd_sasl_auth_enable = yessmtpd_sasl_security_options = noanonymoussystemctl restart postfixll