Backup Notifications - Email SMTP / STARTTLS

alasdairc

New Member
Jun 25, 2021
25
0
1
25
Hi all,

I have having a few issues with sending emails to a syslog email address I have created. I am getting an Undeliverable email bounceback due to auth being needed.


Recipient address rejected: SMTP AUTH is required for users under this sender domain


Is there any official/recommended way to configure STARTTLS authentication for Proxmox?


Thank you in advance
 

Dunuin

Famous Member
Jun 30, 2020
7,997
1,993
149
Germany
Google for postfix as a SMTP relay. What to do heavily depends on the email provider.


For my provider (netcup) it for example looks like this:

Code:
nano /etc/postfix/main.cf
sender_canonical_maps = regexp:/etc/postfix/sender_canonical
relayhost = [YOURNETCUPSERVER.netcup.net]:465
smtpd_tls_security_level = may
smtp_tls_security_level = encrypt
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls = yes
smtp_tls_wrappermode = yes

nano /etc/postfix/sasl_passwd
[YOURNETCUPSERVER.netcup.net]:465 YOURRELAY@YOURDOMAIN.TLD:PASSWORT

postmap /etc/postfix/sasl_passwd
chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
chmod 0600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db

nano /etc/postfix/sender_canonical
/.+@YOURFQDN/ YOURRELAY@OYURDOMAIN.TLD
/.+@YOURDOMAIN.TLD/ YOURRELAY@YOURDOMAIN.TLD

postmap /etc/postfix/sender_canonical
nano /etc/aliases
postmaster: root
webmaster: root
root: WHERE@ITSHOULD.GO

newaliases
service postfix restart

Here sasl is used for authentification. One big problem I had was that the mail provider rejected emails that weren't send from my own valid mail address. My SMTP account was "MyAdresss@email.tld" so the senders email address has to be "MyAdresss@email.tld" too or it will be blocked.
So I needed to tell Proxmox in the options which email address to use as sender address (Datacenter -> Options -> Email from address) so that it matches "MyAdresss@email.tld".
 
Last edited:
  • Like
Reactions: alasdairc

alasdairc

New Member
Jun 25, 2021
25
0
1
25
Google for postfix as a SMTP relay. What to do heavily depends on the email provider.


For my provider (netcup) it for example looks like this:

Code:
nano /etc/postfix/main.cf
sender_canonical_maps = regexp:/etc/postfix/sender_canonical
relayhost = [YOURNETCUPSERVER.netcup.net]:465
smtpd_tls_security_level = may
smtp_tls_security_level = encrypt
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls = yes
smtp_tls_wrappermode = yes

nano /etc/postfix/sasl_passwd
[YOURNETCUPSERVER.netcup.net]:465 YOURRELAY@YOURDOMAIN.TLD:PASSWORT

postmap /etc/postfix/sasl_passwd
chown root:root /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
chmod 0600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db

nano /etc/postfix/sender_canonical
/.+@YOURFQDN/ YOURRELAY@OYURDOMAIN.TLD
/.+@YOURDOMAIN.TLD/ OYURRELAY@YOURDOMAIN.TLD

postmap /etc/postfix/sender_canonical
nano /etc/aliases
postmaster: root
webmaster: root
root: WHERE@ITSHOULD.GO

newaliases
service postfix restart

Here sasl is used for authentification. One big problem I had was that the mail provider rejected emails that weren't send from my own valid mail address. My SMTP account was "MyAdresss@email.tld" so the senders email address has to be "MyAdresss@email.tld" too or it will be blocked.
So I needed to tell Proxmox in the options which email address to use as sender address (Datacenter -> Options -> Email from address) so that it matches "MyAdresss@email.tld".


I run my own mail server Postfix/Dovecot

Is it just a case of editing the Postfix configs on the Host itself then to get the mail notifications to work? I didn't think about this as an option. I will have a tinker and see what I can do

Is it just an SMTP Relay that I am looking to create on the Host?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!