[mythtv] [PATCH] add new osd alert type, new email

Michael Greb michael at thegrebs.com
Fri Dec 12 04:43:21 EST 2003


Attatched is a patch against osd.xml for the blue theme to add a new alert type
for new email notifictaion.  There is also an image included for this alert
type and a perl script for sending this alert.

The perl script is meant to be called with one argument, the name of the person
the email is for.  You then pipe an email to it and it will grab the sender and
subject and send these to the frontend.

I call the script from maildrop using a line like this is .mailfilter:
cc "|/usr/local/bin/newemail.pl Michael"
My wife has a similiar line in here .mailfilter using here name.  This occurs
after spam has been filtered so I don't get alerts for them.  It should be
similiarly easy to setup procmail to pipe a copy of an email to an external
script.

This script doesn't have a lot of logic to it.  Mainly grabs the from, and
subject header.  Subsitutes < and > for &lt; and &gt; and turns " into '.  It
then sends the xml udp packet to the address and port specified at the top.

I run this script on my mailserver, a colo box, with it pointed to my home
cable connection.  My home wifi-ap/broadband router fwds the myth alert udp
port to 192.168.1.255 displaying the alert on any active frontend in the house.


Hopefully others will find this useful.

Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alert-email.tar.gz
Type: application/x-tar-gz
Size: 5295 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20031212/c7a0f56c/alert-email.tar.bin


More information about the mythtv-dev mailing list