Email notification customization for Debian unattended-upgrades package
Hi,
Is there a way to customize email notifications for Debian unattended-upgrades package, especially the subject part? I haven't found how so far... Thanks in advance :) |
Quote:
It's especially laughable that the first line of your signature asks people to Please be specific in your thread title & your question Try actually doing that in your posts. |
^ You're right in substance but I'm not very sure there could be a possible confusion here as I can't see any reference to "OS, package manager, self-hosted Wordpress" named unattended-upgrades in the first results of any search engine... ;)
Anyway, yes, let's be more specific: I'm talking in this thread about Debian/Ubuntu/... unattended-upgrades package NB: I've edited my OP to be crystal-clear. |
unattended-upgrades uses apt-listchanges for the mail side if things
https://wiki.debian.org/UnattendedUp...pt-listchanges skimming through manpage and peaking at some of its installed files Nothing is jumping out at me that would change the subject line. but I have only skimmed, you could try Code:
apt -s source apt-listchanges might be overkill but sometimes that is the quickest way :D |
Hello,
Quote:
Quote:
Evo2. |
Strangely, unattended-upgrades email notifications seems to yield plenty of relevant-looking results...
|
Quote:
|
Quote:
Both packages have their config files which specify the email configuration part. Quote:
A config file would be soo much handy! :) Quote:
|
Quote:
if not, create a new branch, make modifications. when you get an update, rebase your modified branch against "upstream" and if your modification adds this "new feature" cleanly you could submit a patch for upstream to adopt. this is the way of FOSS |
I had a look at the source - unattended-upgrade is a python script, and the subject seems hardcoded, with no option of overriding the format afaics.
Fairly trivial to change the script but yeah, it wouldn't survive updates. Then again you could create a diff from the changes you made and apply it after every upgrade, I believe apt has hooks that allow that. I wonder if it's worth the effort though. |
indeed
in /etc/apt/apt.conf.d/ here is one I use to remove compress from logrotate ( I have transparent compression on zfs ) Code:
DPkg::Post-Invoke {"echo checking logrotate;for i in /etc/logrotate.d/*;do if grep -q compress ${i};then echo removing compress option from ${i};sed -i '/compress/d' ${i};fi;done";} Code:
apt -s source unattended-upgrades Code:
git clone https://github.com/mvo5/unattended-upgrades.git Code:
COPYING:191:original licensor to copy, distribute or modify the Program subject to Code:
1315 subject = _( what do you want the subject to be? |
Thank you very much Firerat and ondoho for your valuable answers. Nice thorough help :)
I will keep in mind your tip about apt source -s to identify the latest source code location! |
All times are GMT -5. The time now is 02:22 PM. |