Edit subject of mail when finishing a backup

ocerda

Member
Jan 2, 2018
58
1
8
32
Good afternoon,

I am looking for how to edit the subject that proxmox sends me when a backup ends, that configuration where it is, to be able to edit the subject that it sends, and thus be able to customize the emails that proxmox sends me?
 
Hi,

the subject of the backup mail is hardcode so you can't edit per config.
 
Hi, it's been a long time, but I needed to sort this out too. Since I use postfix to send emails, it's not a problem to modify the mail in any way. In this case a very simple change of the header.

In version 8.1.5 I use the subject is set to "vzdump backup status (*): *" and I want to change it to e.g. 'Proxmox backup'.
  1. Edit the Postfix main configuration file
    Code:
    vim /etc/postfix/main.cf
  2. Add or modify the header_checks directive:
    Code:
    header_checks = regexp:/etc/postfix/header_checks
  3. Create or edit the header_checks file: Create or edit the /etc/postfix/header_checks file, which contains the rules for modifying headers.
    Code:
    /^Subject: vzdump backup status.*$/ REPLACE Subject: Proxmox backup
  4. Restart Postfix
Now, any email with the subject vzdump backup status (*) will have its subject replaced with Proxmox backup before being sent.

You can play with the regular pattern and achieve any form you want.

Maybe it will help someone else.
 
Last edited:
  • Like
Reactions: UdoB

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!