patch2mail – patch notification via mail


January 3, 2008 4:35 pm





Server admins know the problem: There’s no good and simple tool available to get an email notification when new security updates are available.

patch2mail is a simple tool that fills this gap and mails you whenever new updates are available.

In theory, you could use

zypper lu | mail -s updates root

but this will also send a mail if no update is available.

I was annoyed by that and therefore wrote this little tool, consisting of a shell script and a XSLT file to transform the zypper XML output to text.

Usage is easy: Download the RPM from and install it on your server. Make sure you receive mails for root (for example setup mail forwarding in /etc/aliases). That’s it. The script directly installs to /etc/cron.daily and will inform you when new updates are available.

patch2mail is available for openSUSE 10.2 and 10.3.

If you want to know in advance how the update notification mails look, have a look at this example mail:

Subject:  updates

=== foobar-libs - Patch 1234-0 (security) ===

foobar-libs: fixed security issue when doing foo.

This patch contains the fix for a security problem when 
doing foo. [... long patch description continues ...]

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.

Categories: Free Tools, Technical Solutions

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.