Yummy Melon Software

Yummy.

Sunday, August 14, 2005

nugu 0.1 ALPHA released

nugu 0.1 ALPHA is released!

nugu is a biff-like Unix utility which scans either a IMAP4 or POP3 mail
server account and relays an abbreviated copy of unread email to the
user's cell phone. The user can constrain which email gets relayed by
defining a query in a configuration file. nugu is meant to be run as a
cron job.

Use responsibly. Join the Yummy Melon mailing list to give me feedback.

I'm sure the first question to pop up is, what is the query syntax in the config file? For IMAP4 servers, the answer is simple - it's the same as what is defined for search in RFC 2060.

For example, the default IMAP query in the config file is set as

imap_query = (UNSEEN UNDELETED)

which only relays unseen and undelete emails to your cell phone.

To set your IMAP query so that you have a more selective filter, here's an example
where you only want messages from notorious@big.com and tupac@forlife.com:

imap_query = (OR FROM notorious@big.com FROM tupac@forlife.com UNSEEN UNDELETED)

Again, for further reading on IMAP query syntax, refer to the link above.

For POP3 servers you either define the query to be UNSEEN or
use the following syntax:

pop_query = <header> <value> ... <header> <value>

where <header> is an email header field such as From, To, or Subject and <value> is a target value to search for.

For example:

pop_query = From maryj@blige.com To acid-jazz@ucsd.edu Subject "blinging yo"

In this query, only new emails sent from maryj@blige.com or sent to acid-jazz@ucsd.edu, or having the subject line called "blinging yo" will be relayed.

The directive

pop_query = UNSEEN

will relay all new POP messages to your cell phone.

So why are there two separate search query syntaxes? Because IMAP4 has one, and POP3 doesn't and I'm shooting for a simple middle ground where I can support a simple syntax for POP3 and not reimplement an IMAP query parser for nugu. Such is the beauty of using IMAP4 over POP3.

0 Comments:

Post a Comment

<< Home