msmtp + Zabbix + Gmail!

My company uses Gmail for all our email accounts. We’ve found that with the limited IT budget and staffing it’s easiest for us to use google to manage all our corporate email.

I’ve been trying to get Zabbix to send emails using Gmail, of course since gmail only uses TLS it’s been a bit of a problem since Zabbix does not support this out of the box. I decided to use msmtp and a Zabbix script to handle it all.

Note: We’re using VZ servers so some commands may be different.

First thing to do was to install all the correct packages:
vzyum 103 install gnutls gnutls-devel cyrus-sasl Libidn fetchmail

After those were installed I had to download MSMTP from the sourceforge page here.

Configure, make, make install with your options. I used:
./configure --with-ssl=gnutls

Next I created an msmtp_wrapper.conf file in the Zabbix bin directory like the following:
defaults
syslog LOG_MAIL
account default
host smtp.gmail.com
port 587
tls on
auth on
user helpdesk@mydomain.net
password MYPASSWORD
auto_from on

Next I created the msmtp_wrapper file in the Zabbix bin directory :
#!/bin/bash
echo "Subject:$2+$3" | tr "+" "\n"> /tmp/message.zabbix
/usr/local/bin/msmtp -t -C /home/zabbix/bin/msmtp_wrapper.conf --tls-certcheck=off -- $1 < /tmp/message.zabbix rm /tmp/message.zabbix

Change the owner and permissions on these files as such:
chown zabbix:zabbix msmtp_wrapper*
chmod a+x 700 msmtp_wrapper*

Next create a media type in Zabbix with the script name you used.

Lastly, setup some triggers to use it!

That should be all that you need to get started.

Canyoneering!

Hmm, it’s been a while, eh?

Well not much has really been going on. I’ve been busy as per usual but nothing to interesting. Last weekend I hung out with Kris a lot and took him rock climbing. It was freezing out there! We did some other random stuff as well.

This weekend was pretty fun. Friday night Kris had a little party as his house for some of his friends. We had a good time. I cooked him dinner which was delicious! I got a little grumpy towards the end of the day which really carried over to Saturday and that sucked.

Got up fairly early on Saturday and took the car in for an oil change. Turns out it’s already time for new brakes and tires (I did put 20,000 miles on my car in the last year!) Ugh that’s gonna cost an arm and a leg!

Kris and I headed to downtown for the Prop 8 rally which was a LOT of fun, but also made me very very very angry that we have to be out here doing this shit. Who are these idiots who voted for Prop 8! I want to just beat them all to shit. And what sucks even more is that I have _GAY_ friends who voted for Prop 8. Idiots! My guess is they are into S&M in bed or something. Why would they do that to each other. The speakers there were GREAT, the Mayor of LA was there as well as Lorrie Jean from the Gay and Lesbian Center in LA! I love her! Although I thought that there was WAY to much talking and not enough rallying. It also sucked a little because all the fires around LA really knocked this story down off the front page! I read once place that there were 40,000 people downtown. I’m not sure I agree with that figure, but it was a HUGE rally!

Headed home after that and took a nap and then hung out at my apartment. I was feeling pretty down after that, sad and a little depressed. Was missing Grandpa, feeling fat, hating my apartment, pissed at the Russian, and lots of other things. Just kinda re-hashing my year! Jason invited me over, so I took a bottle of wine and we sat at the kitchen table and drank and talked about it all. I actually cried infront of him. :'( Kris also said he would call me that night but he never did.

Went home after that and went to bed. Climbing was canceled on Sunday so I slept in a little bit then headed up to Rubio canyon to meet up with this guy Trevor. We went Canyoneering which was AWESOME! Rappelling down 6 waterfalls was so cool! Got done with that in quick time and headed home.

Laid around on the couch for a while. Kris and I were supposed to watch the Sunday night line up on Fox, but he canceled at the last minute which was a bit annoying. So I ended up just watching it all alone.

This Friday I got invited to the Climbing holiday party! Very exciting, makes me feel more part of the group! I’m really looking forward to eating at the Stinking Rose as well! I’ve heard such great things about it.

I’m also really looking forward to the Thanksgiving day backpacking trip! I can’t wait for that to get here. I really do hope though that it’s not TOO cold/snowy. A little cold is fine!

Not much else going on!

SiriusXM Merger – Fewer Channels!

Saw this today on Consumerist and it echos my concerns.

I was VERY unhappy when I got into my car on Wed and found that 3 of my favorite stations were GONE. They just vanished without an explanation or anything. It’s all very annoying!

I really don’t think that they handled this in the most proper way. They merged channels, they are now censoring channels which weren’t before and I have already noticed less variety on the major stations.

I hope that this is all just a temporary thing until they can get it all figured out!

Sadly, I can’t just say “I’ll switch” because they are now the only Satellite providers! 🙁

Yay Obama!

Yay! We have a new President! Go Obama!

I am so excited to see what the next 4 years brings us. I hope that he doesn’t disappoint the American Public!

I’m also very sad that Prop 8 passed here in California. I can’t believe that even LA county voted YES for it! What is wrong with these people. They are giving MORE rights to Chickens and taking them away from their fellow citizens! WTF!

Comon Obama! Make it right in America!