[SOLVED] use smtp to send ALL notifications

X4V1

New Member
Feb 5, 2024
15
5
3
Hello,

I added an SMTP "Notification Target" from the notification screen it works fine (tested and mail received).
I disabled the "mail-to-root" target as I wanted to use the SMTP target for all notifications.
I also updated the notification matcher to use the SMTP target instead of the "mail-to-root".

But I'm a bit surprised that I still see logs that it's not possible to send mail using port 25 (it's blocked by my ISP):
Code:
Mar 01 18:34:52 pve postfix/smtp[1808563]: DB68E24135E: to=<*************@gmail.com>, relay=none, delay=90, delays=0.02/0/90/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[142.251.9.27]:25: Connection timed out)

How can I be sure that all notifications (system wise) will be using the SMTP target?
It seems that proxmox still tries to send notifications by using postfix mail server and it's not what I want.
Example: Backup notifications (notification mode: Default (Auto)) is failing to send mail using port 25 (WHY?)

How are we supposed to configure proxmox to stop sending emails other than using the SMTP target?
I would like to never send mail using port 25 as it's never going to work.
 
Last edited:
It's solved. If someone else pass by here for the same problem, if an email is set in the backup config, it will fallback to mail-to-root. I configured postfix to allow sending mail via a smtp relay, I'll see if I receive some other notifications from mail-to-root. But at least for backup notifications, it's now solved :)

Note: the always or on-failure option is not doing anything if using the notification system as it must be configured with notification matcher.
 
Last edited:
Hello created smtp account but mail starts with the internal smtp
After preparing that "Notification Target" in the upper half of that screen you need to adjust the lower half "Notification Matchers" to fit your needs.

Disclaimer: I do not use this. I've left the "default-matcher" active unmodified - and this means my "old" shell-level Postfix stays active...
 
  • Like
Reactions: alexdelprete
Hello created smtp account but mail starts with the internal smtp
Normally you can do everything from the gui. You are trying to send email notifications with smtp? If yes check at your backup scheduler configuration. There you don't want to have any notification options as everything will be done with notification matcher. I did everything from the gui and it works fine. If what you want is to configure postfix from the gui, that I don't think is possible.
 
I don't believe through the Proxmox GUI there is a way to force sendmail emails through the SMTP server. You would have to configure Postfix directly as before for any system emails such as smartctl automatic emails.
 
Just had this today, my backup is setup to use the Notification System, yet it's still trying to use the send mail (despite the notification system having smtp setup correctly and working with a default matcher to catch all)

They way I found out, is that the notification system is telling me that the sendmail is failing for the backup job emails, so I know that notifications are working, just despite being set it doesn't use the notification system.

1733333491361.png
 

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!