I need to write a procmail rule or rules that's a bit beyond the basics. I have Bacula installed and I want all mail where the subject begins with Bacula: Backup OK for
to be moved into a folder named backups
-- these are good backups so I don't need to regularly read these messages, but I want to keep them for posterity. This much is, of course, easy.
Now the harder part. I need to know that backups are indeed running (as opposed to failing with ERROR
in the subject) and I don't trust myself to ensure that the unread mail count of my backups
folder is increasing daily. So I see a couple of different options:
- Allow one specific OK message through to my in-box. For example,
Bacula: Backup OK for FOO
goes to my in-box (and ideallybackups
too so I can just delete the copy in my in-box while still having a copy also inbackups
for posterity reasons). MeanwhileBacula: Backup OK for BAR
(and anything other thanFOO
already mentioned) always goes tobackups
and never disturbs my in-box. - Get more clever with a helper script that keeps track of the date/time for the last successful backups and if more than 24 hours has gone by without one inject a new mail message warning that something is awry.
- Or both of the above for the ultra paranoid/realist, 'cuz crap happens :-)