Notification mystery

rowihei

Well-Known Member
Jul 27, 2017
34
1
48
71
Hello,
... we changed our mail server and now we have to edit all mail clients, on proxmox too.
Under Datacenter > notification wie created a new SMTP and tested it : All OK, testmail arrieved the admins mail account.
But admin gets no notification from the inside backup. With our old mail server this was no problem.
What we have to do ?
 
When the test mail arrives, it is at least technically configured correctly for sending. Have you already looked at the settings for the matcher [1]? If you have direct access to the mail server, you could check the logs there to see what happens to the mails (if one is sent).
No log for debug is produced for the notifications on the Proxmox side.


[1] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#notification_matchers
 
When the test mail arrives, it is at least technically configured correctly for sending. Have you already looked at the settings for the matcher [1]? If you have direct access to the mail server, you could check the logs there to see what happens to the mails (if one is sent).
No log for debug is produced for the notifications on the Proxmox side.
[1] https://pve.proxmox.com/pve-docs/pve-admin-guide.html#notification_matchers
Thanks,
I readed this, but I don't understand the sense of this configuration. There is only another IP/name for the mail server. Notification-matcher we never touched , never had to configured....
 
Ok, if the matcher has not been configured, there should be no file here. Please check this:

Code:
cat /etc/pve/notifications.cfg
 
Ok, if the matcher has not been configured, there should be no file here. Please check this:

Code:
cat /etc/pve/notifications.cfg
This file exists and inside are the configuration of our smtp server and something more like sendmail ... (names are changed...)
Code:
root@pve:~# cat /etc/pve/notifications.cfg
matcher: default-matcher
        comment Route all notifications to mail-to-root
        mode all
        target mail-to-root

sendmail: mail-to-root
        comment Send mails to root@pam's email address
        mailto admin@xxx.lan
        mailto-user root@pam

smtp: via-msrv
        author PVE 1
        from-address user00@xxx.lan
        mailto-user root@pam
        mode tls
        server msrv.xxx-firma.de
        username user00
 
Last edited:
Your smtp is not defined as a target in the default matcher, so no mails are sent via your smtp. The target must be added: (example)

Screenshot_20240913_165112.png

mailto-user root@pam
The user must also have a valid e-mail address in their profile.
 
Your smtp is not defined as a target in the default matcher, so no mails are sent via your smtp. The target must be added: (example)

View attachment 74657


The user must also have a valid e-mail address in their profile.
Thanks,
root@pam has the mail address admin@xxx.lan.
We created a new matscher "smtp" and started again a backup by hand with mail to admin@xxx.lan - but no mail to see.
 

Attachments

  • proxmox-notification_matcher.png
    proxmox-notification_matcher.png
    21.9 KB · Views: 5
  • proxmox-notification_root.png
    proxmox-notification_root.png
    18.6 KB · Views: 5
Last edited:
Your smtp is not defined as a target in the default matcher, so no mails are sent via your smtp. The target must be added: (example)

View attachment 74657 I


The user must also have a valid e-mail address in their profile.
Good Afternoon,
Excuse me, but I don't like this kind of configuration ... it's too complicated.
In Proxmox5,6 and 7 I only edited /etc/postfix/main.cf and it's all OK.
Code:
nano /etc/postfix/main.cf
- changed relay host:
 # cd /etc/postfix/
 # mcedit main.cf
        relayhost = 10.2.2.9:587
 # postfix reload
    postfix/postfix-script: refreshing the Postfix mail system
 # service postfix restart
 
echo "test mail from proxmox" | mail -s test admin@xxx.lan

Now we only have another mailserver at IP 10.2.2.11:587
Isn't it possible to use the old configuration via main.cf ? Howto enable this old school message ? This I understand ...
We don't need special notifications, we only need a message for "updates avialable" and "Backup ready with error/succses" like before.
 
Please post your actual notifications.cfg.
Code:
matcher: default-matcher
        comment Route all notifications to mail-to-root
        mode all
        target mail-to-root

sendmail: mail-to-root
        comment Send mails to root@pam's email address
        from-address user00@firma.lan
        mailto admin@firma.lan
        mailto-user root@pam

smtp: via-msrv
        author PVE 1
        from-address user00@firma.lan
        mailto-user root@pam
        mode starttls
        port 587
        server msrv.firma.de
        username user00@firma.lan

matcher: smtp
        comment Mail zum admin
        mode all
        target via-msrv
root@pve:~#
 
Isn't it possible to use the old configuration via main.cf ? Howto enable this old school message ? This I understand ...
Of course, this can still be used. In the default, it will be used. The notification system is only an addition if, for example, you do not have your own mail server or if you want to make things a bit easier for yourself with auth to an Mailserver.

If you would, you can delete your notifications.cfg, after the old default for Postifx/main.cf is valid again.
 
Of course, this can still be used. In the default, it will be used. The notification system is only an addition if, for example, you do not have your own mail server or if you want to make things a bit easier for yourself with auth to an Mailserver.

If you would, you can delete your notifications.cfg, after the old default for Postifx/main.cf is valid again.
Thank you,
I renamed notification.cfg and started a backup of a little VM - but something went wrong - no mail in admins inbox...:
Code:
Sep 17 11:17:04 pve pvedaemon[746563]: INFO: Finished Backup of VM 100 (00:00:17)
Sep 17 11:17:04 pve pvedaemon[746563]: INFO: Backup job finished successfully
Sep 17 11:17:04 pve postfix/pickup[726764]: 3059C1B1A5: uid=0 from=<user00@firma.LAN>
Sep 17 11:17:04 pve pvedaemon[19799]: <root@pam> end task UPID:pve:000B6443:0C5B7A98:66E948FF:vzdump:100:root@pam: OK
Sep 17 11:17:04 pve postfix/cleanup[746774]: 3059C1B1A5: message-id=<20240917091704.3059C1B1A5@pve.firma.lan>
Sep 17 11:17:04 pve postfix/qmgr[17534]: 3059C1B1A5: from=<user00@firma.LAN>, size=4985, nrcpt=1 (queue active)
Sep 17 11:17:04 pve postfix/smtp[746776]: 3059C1B1A5: to=<admin@firma.lan>, relay=msrv.firma.de[10.2.2.11]:587, delay=0.13, delays=0.02/0.01/0.06/0.03, dsn=5.7.1, status=bounced (host msrv.firma.de[10.2.2.11] said: 554 5.7.1 <admin@firma.lan>: Recipient address rejected: access denied (in reply to RCPT TO command))
Sep 17 11:17:04 pve postfix/cleanup[746774]: 4D6CC1B2AF: message-id=<20240917091704.4D6CC1B2AF@pve.firma.lan>
Sep 17 11:17:04 pve postfix/bounce[746777]: 3059C1B1A5: sender non-delivery notification: 4D6CC1B2AF
Sep 17 11:17:04 pve postfix/qmgr[17534]: 4D6CC1B2AF: from=<>, size=6985, nrcpt=1 (queue active)
Sep 17 11:17:04 pve postfix/qmgr[17534]: 3059C1B1A5: removed
Sep 17 11:17:05 pve qmeventd[746762]: Starting cleanup for 100
Sep 17 11:17:05 pve qmeventd[746762]: Finished cleanup for 100
Sep 17 11:17:08 pve postfix/smtp[746776]: 4D6CC1B2AF: to=<user00@firma.LAN>, relay=msrv.firma.de[10.2.2.11]:587, delay=4.3, delays=0/0/0/4.3, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 5A441CE184D)
Sep 17 11:17:08 pve postfix/qmgr[17534]: 4D6CC1B2AF: removed
Sep 17 11:18:49 pve pveproxy[570890]: worker exit
Sep 17 11:18:49 pve pveproxy[2012]: worker 570890 finished
Sep 17 11:18:49 pve pveproxy[2012]: starting 1 worker(s)
 
Last edited:
Code:
Sep 17 11:17:04 pve postfix/smtp[746776]: 3059C1B1A5: to=<admin@firma.lan>, relay=msrv.firma.de[10.2.2.11]:587, delay=0.13, delays=0.02/0.01/0.06/0.03, dsn=5.7.1, status=bounced (host msrv.firma.de[10.2.2.11] said: 554 5.7.1 <admin@firma.lan>: Recipient address rejected: access denied (in reply to RCPT TO command))
Sep 17 11:17:04 pve postfix/bounce[746777]: 3059C1B1A5: sender non-delivery notification: 4D6CC1B2AF
Sep 17 11:17:04 pve postfix/qmgr[17534]: 3059C1B1A5: removed

In this case, the mail was rejected by the mail server. The next step would be to analyze the situation on your mail server to see why the mail was not accepted. A good place to start would be with Postfix, Rspamd, etc.
 

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!