Setting up SMTP email results in error

Nov 29, 2023
9
4
3
I recently sat down to finally fix email notifications. SMTP is the way I usually do such things, and I was happy to see it as an option in the gui. However I cant get it to work, even though I believe I have set things up correctly I only get the following error (and no emails):

Could not test target: could not notify via endpoint(s): smtp-webmaster: network error: Resource temporarily unavailable (os error 11) (500)

My /etc/pve/notifications.cfg:
Code:
sendmail: mail-to-root
        comment Send mails to root@pam's email address
        disable true
        mailto-user root@pam

matcher: default-matcher
        comment Route all notifications to mail-to-root
        mode all
        target mail-to-root

smtp: smtp-webmaster
        from-address webmaster@example.com
        mailto-user root@pam
        mode starttls
        port 587
        server smtp.emailprovider.no
        username loginusername
with the correct password set up in /etc/pve/priv/notifications.cfg..

I did set up Datacenter -> settings: "email from address" to the same webmaster@example.com because I saw it in some forum thread..

What am I missing? Where can I find logs about this?
 
+1 here too. Trying to send to SMTP relay on LXC under proxmox, which works with other containers on other VM's and LXC's no issue.
Any clues welcome here, as I've spent too much time trying to hammer this one in.
On 8.4.1 running pretty standard Ubuntu LXC's and VM's. No tricky stuff involved other than a non standard non-secure port other than 25. No auth, no encrypt. Firewalls and DNS checked and opened appropriately.
 
Last edited:
Trying to simply set up notification from Proxmox to an Outlook account via smtp.
Why should this be so difficult?
 
I ran into this issue, the problem is that Microsoft no longer allows basic authentication on private accounts.

This thread confirms with more detail, and a possible workaround but it will not work with personal accounts.

There might be a workaround with gmail by creating an app password, explained here but until oauth is added to pve it will not be as easy as a few clicks.

I have a website hosting account so I used credentials from that mail server which allows basic authentication.
 
For this kind of thing, what I do is set up postfix locally on the server, and configure it to deliver to the outbound mail relay service -- Outlook, Azure, Sendgrid, or whatever. Of course, postfix can be easily configured to use standard authentication methods like OAUTH.

Then all you have to do is have your local apps on the box deliver to the local postfix SMTP server, where authentication is not required.
 
Proxmox seems to not support oAuth2. Lots of gyrations to get that working - good luck.
Our security folk gave it a fail since it wouldn't pass auditing or SecOps.
 
I'm pretty sure the OP stated error is not OAUTH related. Please correct if I'm wrong.
My attempt results in the same OS error 11, had no usr/password or encryption/security on at all, going direct to a relay running on a PVE LXC, single node, same box.
Perhaps the underlying issue is OAUTH or security related up the chain, but it's difficult to assert with the vague error it throws.
 
Proxmox doesn't have to support any kind of authentication. That is handled via the postfix program that you also configure on the server.

For Proxmox, it just dumps whatever it has onto postfix without any authentication whatsoever, and then it's up to postfix to actually deliver the message in question.