[SOLVED] Notifications configuration on local LAN

arnoproxmox

Member
Nov 23, 2020
16
0
6
22
Hi,

Proxmox running fine for a long time.
Now trying to configure notifications via E-mail:

Set mail address of root to root@localhost.
Set mall address of backup job to root@localhost (E-mail (Legacy)-Send Always).
No mail received.

Bash:
echo "Test mail from postfix" | mail -s "Test proxmox from postfix" root@localhost
Mail received.
Bash:
echo "test forward proxmox" | /usr/bin/proxmox-mail-forward
No mail received.

How are e-mail notifications configured?
What is the purpose of the E-mail address of user root when mail address is also set in backup jobs?

Now switched to the new notification system. When the next backup job has finished I will see if I got an e-mail.



Setup:
Proxmox installed on top of Debian 12 (GUI installer not used)
Code:
pve-manager/8.2.2/9355359cd7afbae4 (running kernel: 6.5.13-1-pve)
PVE and Postfix are on same server
 
Last edited:
Bash:
echo "test forward proxmox" | /usr/bin/proxmox-mail-forward
No mail received.

proxmox-mail-forward is invoked by Postfix and is passed the full mail contents, including the headers.

So the following should work:
Code:
$ proxmox-mail-forward <<EOF
Subject: Test

this is a test

EOF

How are e-mail notifications configured?
What is the purpose of the E-mail address of user root when mail address is also set in backup jobs?

For backup jobs, there are two ways to receive notifications, the legacy sendmail mode and the new notification system. The notification system was introduced in Proxmox VE 8.1. If you select the legacy mode, the backup job will just use sendmail to send an email configured in the backup job. If you use the notification system, a notification event will be emitted to the notification system where it will be routed based on notification matchers to notification targets. Mail-based notification targets, such as sendmail and SMTP can use the email-address from a user's config as a recipient. Please be sure to check out the chapters on notifications in the Proxmox VE documentation [1] .

[1] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#chapter_notifications
 
Thanks for setting on the right track. Your test worked after changing the mail address of root from root@localhost to root@<hostname>.
Probably a postfix configuration issue (out of scope for here) but at least I receive mail.

Before the change of mail address the backup job showed: INFO: notified via target `mail-to-root`.
No mail.
Let's see if I receive a mail after the next backup job.
Edit: Yes I did.
 
Last edited:

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 yours easily in our online shop.

Buy now!