Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-14-2007, 04:04 AM
Moderator
 
Posts: 927
Default Silly idea, need help (verbal announcement of inbound emails)

Ok, so here's the deal.

I was bored and ripped up an old laptop to build into a picture frame type thing, so far all it does is sit there running ether-ape showing network activity on my lan (this is for my home setup) That looks nice and I thought... Hmm, what else can I do, so I came up with this....

I've installed Cepstral speech engine on the frame and I want the zimbra server to send a message to it somehow so that as an email arrives for any user, the frame will speak a message, like "New mail for Joe User from ****** Spam" etc, I know this is pointless, I know its stupid, but I still think it's kinda cool.

However, I barely know where to start. I want the notifications to be instant, so any form of pop3 collection is out. I'm thinking it should be possible to set zimbra to send a message to the frame, as the mail arrives and run a shell script on the frame to listen on a port or something. It should be easy, but currently I'm at the 'blank page' stage and struggling to start.

Anyone have any ideas?
Reply With Quote
  #2 (permalink)  
Old 05-14-2007, 07:48 AM
OpenSource Builder & Moderator
 
Posts: 1,166
Default

hah, you have far too much time on your hands

i would see if there's a command line imap notifier that supports IDLE command, or alternatively if the 'frame' is powerful enough to run the zimbra webclient to make some sort of zimlet?

let us know if you get anywhere!!!
Reply With Quote
  #3 (permalink)  
Old 05-14-2007, 07:56 AM
Intermediate Member
 
Posts: 23
Default

just a thought but if the zimbra toaster is open source you might want to start there...
Reply With Quote
  #4 (permalink)  
Old 05-14-2007, 09:46 AM
Moderator
 
Posts: 927
Default

The laptop I used was is a P4 so it can run the client ok, but I want it to check for any incomming mail, not just the account that the client would be logged into.

I feel the same problem may exist for the toaster, but the source for that will be simpler then the entire web client, so it's something to look at. I'll grab the toaster source and see what I can do, is there a linux version of the toaster? It's running Debian.

As for too much time, nah, never enough time, just too many ideas! The amount of unfinished projects I have floating around it out of control!
Reply With Quote
  #5 (permalink)  
Old 05-14-2007, 12:37 PM
raj raj is offline
Moderator
 
Posts: 768
Talking This will keep you busy...

Dirk..As I can see you have time on your hand then try this..

1# create a pop/email user on your domain [get.copy.of.all@domain.com]

2# Add the following line to MAIN.CF for postfix
/opt/zimbra/postfix-2.2.9/conf/main.cf
always_bcc = get.copy.of.all@domain.com

* Postfix will send a COPY of every email coming to Zimbra on that address

3# Setup POP client on your Client/Frame computer and POP [get.copy.of.all@domain.com] account on your server every 30 seconds or less
* this will download every email coming on to your server every 30 seconds..

4# Now you have all the time to code the client to trigger your speech engine

Let us know if this works..we will send you some few thousand emails to keep you entertained…lol


Raj
Reply With Quote
  #6 (permalink)  
Old 05-14-2007, 12:58 PM
OpenSource Builder & Moderator
 
Posts: 1,166
Default

I think the toaster is written in c#, so depending on what level of .net it uses mono may be able to use it.

fetchmail supports imap idle, might be a better starting point?
Reply With Quote
  #7 (permalink)  
Old 05-15-2007, 06:45 AM
Moderator
 
Posts: 927
Default

I know nothing of imap idle nor why it would be useful, I'll go look that up shortly.

I think the pop3 method suggested by Raj may be the way to go. With that set up on the zimbra side, I should be able to write a perl script that checks the pop3 box for mail, downloads the ID, TO, FROM and SUBJECT fields (ignoreing message body if possible) and passes those to the TTS engine, then deletes the mail and loops. Cool, sounds easy when you say it quick!

My initial thoughts were to write a listener of sorts, something that would listen on an IP port for any string or data, and pass that data to the TTS engine when it got it, then have zimbra to the preprocessing of the message when it arrived and stream it to the frame using something like netcat. But that seems to require a lot more work.
Reply With Quote
  #8 (permalink)  
Old 05-15-2007, 06:51 AM
Zimbra Consultant & Moderator
 
Posts: 20,316
Default

Quote:
Originally Posted by Dirk View Post
I know nothing of imap idle nor why it would be useful, I'll go look that up shortly.
That's how you get mail to a client real-time.
__________________
Regards


Bill
Reply With Quote
  #9 (permalink)  
Old 05-15-2007, 09:50 AM
raj raj is offline
Moderator
 
Posts: 768
Default

always_bcc = get.copy.of.all@domain.com

Account has both IMAP and POP3...you can use any one of the two to get email using your client..
if your client is in Windows Environment then there is lot of free code avail to POP a account using VB or C#

Raj
Reply With Quote
  #10 (permalink)  
Old 05-15-2007, 10:00 AM
OpenSource Builder & Moderator
 
Posts: 1,166
Default

ah, if you're proficient in perl, just poll in a loop with something like (numerous other cpan modules available) and fire off a system call when you get something, unless your speech thingee has perl bindings:
http://search.cpan.org/~conteb/IMAP-...IMAP/Client.pm
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.