Simple Script to get Mails from Free Veeam Agent for Linux
vee-mail uses the sqlite database which get's filled from Veeam Agent for Linux Free in /var/lib/veeam/veeam_db.sqlite. The Linux version from Veeam Agent does not send notification e-mails like the windows version. So this script reads the data from the sqlite database and fills it into the template file which get's sent per mail to you.
veeam
sqlite3 (>= 3.7.0)
curl (to send mail and/or to check for updates)
sendmail (your system should be able to send mails with sendmail command - postfix, bsd-mailx, nullmailer,...)
By default sendmail is used to send the report.
If you choose to use curl to send the report (USECURL=1 in config file) then sendmail is not necessary and won't be installed.
git clone https://github.com/grufocom/vee-mail
move the directory "vee-mail" to /opt or any other directory you would like to install it into
change vee-mail.config file to your needs.
chmod +x vee-mail.sh
You can use the vee-mail script as a post-backup script directly in veeam (Configure - select Job, Advanced/Scripts/Post-Job) or start it manualy after the veeam backup has run:
/opt/vee-mail/vee-mail.sh
base64 subject fixes problem with utf8 quoted subject on some mail servers
use SLEEP variable from config file to wait for veeamjob to finish
check the version of veeam with veeamconfig command and not dpkg or rpm
fix for UUID error on SessionID since veeam version 6 release
fix for new veeam release version 6 (database structure change)
fixes empty mail body
get jobname from veeam database and fix disk statistics
df does not understand regex, so we need a grep to get only the path we need
df without grep and going into background directly after reading config file
Fix password issue
Bugfix version check
fix message blank line ending header following RFC (fix reception by outlook.com)
offer use of curl instead of sendmail (sendmail is still the default)
remove dateutils dependancy
remove bc dependancy
new version check against github
Improve finding session id
bugfix duration time when it's bigger than 24h
sendmail get's installed if not already done
add sender address to sendmail command
remove trailing slahes from target path (cifs/smb)
added check for FST is smb - not only cifs
bugfix latin character in mail subject, switched to 8-bit and utf8
bugfix SENDM needs to be set
New parameter for info-mails, you can now set when you would like to get an infomail from vee-mail
Reintegrated background mode
Just cosmetics
Increased the time the script waits until veeam backup is finished
Removed background mode from script
Added debug messages via syslog (logger-tag: vee-mail)
Changed the way "df" is used for free space on backup device
Added more debugging output
Bugfix Release - don't mount local device
Bugfix Release
Check for root user before execution
First release on Github with new name "vee-mail"