Replace multiple items in email notification header

thimplicity

Member
Feb 4, 2022
86
13
13
44
Hi everyone,
I have successfully set up email notifications for my proxmox servers and I have also replaced the from-address successfully via /^From:.*/ REPLACE From: Proxmox <homelab@myaddress.com> in the file smtp_header_checks. Now I am trying to als replace the subject, but have not been successful yet. I have tried two lines in the mentioned file and I have also tried multiple files and then added them in the postfix main config file.

Would appreciate any tips! Have not been successful finding a solution on Google yet.
 
Hi everyone,
I have successfully set up email notifications for my proxmox servers and I have also replaced the from-address successfully via /^From:.*/ REPLACE From: Proxmox <homelab@myaddress.com> in the file smtp_header_checks. Now I am trying to als replace the subject, but have not been successful yet. I have tried two lines in the mentioned file and I have also tried multiple files and then added them in the postfix main config file.

Would appreciate any tips! Have not been successful finding a solution on Google yet.
Screenshot_20230706-231342.pngScreenshot_20230706-231321.pngScreenshot_20230706-231307.png

I don't tryed to change the subject, so dunno there, but it should be possible somehow.

However, i attached the screenshots, because im not sure if you really want that, since the subject is always different.

Cheers and have luck finding a solution:)
 
View attachment 52659View attachment 52660View attachment 52661

I don't tryed to change the subject, so dunno there, but it should be possible somehow.

However, i attached the screenshots, because im not sure if you really want that, since the subject is always different.

Cheers and have luck finding a solution:)
Thanks - Actually I am trying to adjust the subject. How did you get the resilvering etc messages? Do you have a smart monitoring message as well?
 
Thanks - Actually I am trying to adjust the subject. How did you get the resilvering etc messages? Do you have a smart monitoring message as well?
No they come automatically, what i mean they are preconfigured by default with zed.

Did you seen Techno Tims Proxmox Video on YouTube?
Basically i did only that + added my mail to mdadm

But i doubt that anyone is using mdadm other as me, because i need mdadm only for an ext4 raid10 Array, where i store my Docker containers (inside lxc) xD

Once Proxmox adopts openzfs 2.2, once openzfs 2.2 is stable and out of rc, im going to abandon mdadm and ext4 anyway completely.
Since Docker inside lxc containers won't be an issue anymore on zfs.

However, basically i did nothing else as Techno Tims Video + checked Zed, but Zed was already fine here, so i didn't had to touch it and that's it.

I think that [Server] tag in the subject, im adding with my mailserver, not Proxmox.

One thing you can't change is the From email address, i mean you do change it but it has no effect, i mean the from mailaddress inside the <> brackets.
But that's very simply, you can set that in the GUI, in the Options of the Data center view.

Hard to explain but with the rewrite from tims Video, you are actually setting only the Display name "My Server <noreply@mydomain.com>"
The "My Server" part gets changed, but the email in the <> brackets don't. The email you need to set in the GUI.

This is the only weird bit that i remember.

And for the subjects, that's Proxmox defaults, from multiple services that sends email to root simply.
As there are a ton of services that sends to root, there are possibly a ton of different subjects.

Cheers
 
How did you get the ZFS emails and resilver stuff? I only found it for backups. Is that zed? I followed the techno Tim video for setting up postfix
 
How did you get the ZFS emails and resilver stuff? I only found it for backups. Is that zed? I followed the techno Tim video for setting up postfix
Pull a drive out... Let it fail... It will send an email...
Put the drive back in, it will resilver instantly and send an email...

Just test it, im pretty sure you're getting the same emails.

Pretty sure even Techno Tim got those emails in the video :)

Edit: and yes that's Zed, but pretty sure it's perfectly configured already, i didn't had to change the Zed config here.
 
Last edited:
Pull a drive out... Let it fail... It will send an email...
Put the drive back in, it will resilver instantly and send an email...

Just test it, im pretty sure you're getting the same emails.

Pretty sure even Techno Tim got those emails in the video :)

Edit: and yes that's Zed, but pretty sure it's perfectly configured already, i didn't had to change the Zed config here.
Thanks - will try that out
 

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!