Howdy all! Just finished my implementation guide for 1.24.2 and 9.10 over on the wiki, and I thought now would be a good time to pick your brain.
One extreme limitation is that the events of the system can only be emailed to one user.
In my scenario, I have different groups of cameras responsible for different things, and I have shell scripts that basically just send an email that says "Hey you... Look at the camera" when something happens via the "execute command" option.
What I'd like to do is use the email functionality in ZM, but be able to chose a different email for each filter. I would like to use all the variables available, but choose the proper email address based on which filter was triggered.
Does anyone have a solution like this in place?
EMail Script different users
If nobody can help with that, another workaround might be to use mailing list software or redirectors that accept the incoming email and redistribute it according to the content to the required parties.
I'm no postfix expert, but I imagine it would not be overwhelmingly difficult to parse emails using that and spread them around, or some other mail software.
I'm no postfix expert, but I imagine it would not be overwhelmingly difficult to parse emails using that and spread them around, or some other mail software.
E-Mail Script
I e-mail messages to my phone and gmail account.
I found this script on the internet and used it with Motion. When I migrated to Zoneminder I tried it and it worked. I use it in the filter for each camera.
#!/bin/sh
DATE=$(date +"%Y%m%d%H%M%S")
ALARM_EMAIL="zoneminder_2.cam"
echo "Subject: Basement Motion Detected - $DATE" > $ALARM_EMAIL
echo "" >> $ALARM_EMAIL
echo "Basement Motion Detected - check $DATE" >> $ALARM_EMAIL
cat $ALARM_EMAIL | /usr/sbin/ssmtp User1@gmail.com User2@vtext.com
Works well for me. Maybe you will find it helpful or useful.
Forgot to mention that I also have SSMTP loaded and use that. Easy configuration.
I found this script on the internet and used it with Motion. When I migrated to Zoneminder I tried it and it worked. I use it in the filter for each camera.
#!/bin/sh
DATE=$(date +"%Y%m%d%H%M%S")
ALARM_EMAIL="zoneminder_2.cam"
echo "Subject: Basement Motion Detected - $DATE" > $ALARM_EMAIL
echo "" >> $ALARM_EMAIL
echo "Basement Motion Detected - check $DATE" >> $ALARM_EMAIL
cat $ALARM_EMAIL | /usr/sbin/ssmtp User1@gmail.com User2@vtext.com
Works well for me. Maybe you will find it helpful or useful.
Forgot to mention that I also have SSMTP loaded and use that. Easy configuration.
-
- Posts: 116
- Joined: Wed Mar 11, 2009 8:32 pm