I have made a patch for opsi-product-updater which permit to add a custom subject for email notification :
Here it is :
/usr/bin/opsi-product-updater
Code: Alles auswählen
--- opsi-product-updater 2015-01-06 13:40:32.752175175 +0100
+++ opsi-product-updater-custom 2015-01-06 13:42:23.368178138 +0100
@@ -216,6 +216,8 @@
self.config["smtpport"] = forceInt(value.strip())
elif (option.lower() == 'sender'):
self.config["sender"] = forceEmailAddress(value.strip())
+ elif (option.lower() == 'subject'):
+ self.config["subject"] = value.strip()
elif (option.lower() == 'receivers'):
self.config["receivers"] = []
receivers = value.split(u",")
@@ -389,6 +391,7 @@
smtpport = self.config["smtpport"],
sender = self.config["sender"],
receivers = self.config["receivers"],
+ subject = self.config["subject"],
)
try:
try:
@@ -1028,6 +1031,7 @@
"configFile": '/etc/opsi/opsi-product-updater.conf',
"notification": False,
"smtphost": u'localhost',
+ "subject": u'opsi-product-updater',
"smtpport": 25,
"sender": u'opsi@localhost',
"receivers": [],
Code: Alles auswählen
....
[notification]
active = true
smtphost = 127.0.0.1
subject = [opsi-product-updater] opsi045xxxxxx
smtpport = 25
use_starttls = False
sender = opsi045xxxxx@example.org
receivers = opsi-admin@example.org
...
Do you think it's possible to include this patch for your next release ?
Regards,
Antoine