[Top] [Contents] [Index] [ ? ]

PEEPHOLE Manual

PEEPHOLE
Peephole Extracts regular Expression Patterns Harvesting Only Last Emails.

Peephole is a GNU/linux server that periodically checks users' mailboxes harvesting only last emails, extracting user-defined regular espressions. Each user, once logged in, has to define his mail providers [mail server and login informations] and other settings [time delay, regular expressions, ...]. Peephole supports various mail protocol as pop3, pop3s and apop.

1. General Overview  
2. Configuration File  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1. General Overview

1.1 Login Session  
1.2 Watches Check  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.1 Login Session

Every time a user tries to login, Peephole, once received username and password, checks for the correct account; on failure the daemon will close connection; otherwise it tries to open the configuration file and proceeds on matching the password here contained against the one provided by the user; if the comparison succeeds login is complete, otherwise Peephole closes connection.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.2 Watches Check

Once logged, Peephole will send the list of set watches and then the user has to choose one of the two modes to retrieve informations: cooked or raw. Cooked is useful if telnet is used to check the state because it causes sending of the whoole matching watches's identifiers; instead raw mode sends only the position of the watch in the watch list, so this mode is usually used by applets.

 
$ telnet peephole.myserver.org 3490
  Peephole v0.1
  user myuser
  pass mypass
  watch1 watch2 watch3
  cooked
  watch2 watch3


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. Configuration File

Each Peephole's user needs a configuration file in his home directory where he has to set some informations to make Peephole correctly answer to his queries. Needed fields of the configuration file are: password, providers' informations, and watches.

2.1 Password  
2.2 Providers' Informations  
2.3 Watches  
2.4 Includes  


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 Password

Password is used to recognize users; the one here specified will be matched against the one inserted on user login. Only a password instance is allowed in the configuration file. pass="insert_password_here";


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2 Providers' Informations

Providers' informations allow Peephole to get last emails headers in mailboxes to match watches; each configuration file could contains as many as needed provider instances. To define a server the user has first to select the protocol used by the server, and then specify provider and mailbox login information. Actually Peephole supports four protocols: pop3, apop, pop3s and fake. pop3 according to rfc1939[POP3] apop according to rfc1939[POP3] pop3s according to rfc1939[POP3] and rfc2246[TLS] fake: it might be used only for debugging purposes. Follows the way to define provider informations:

<protocol>(<timeout in seconds>) { { "<server address>", , "mailbox username", "mailbox password" } };

Example:

 
pop3(60) {
  { "pop3.mailserver.org", 110, "myuser", "mypass" }
};

pop3s(60) {
  { "pop3s.mailserver.org", 995, "my1stuser", "my1stpass" }
  { "pop3s.mailserver.org", 995, "my2nduser", "my2ndpass" }
};

apop(60) {
  { "apop.mailserver.org", 110, "my3rduser", "my3rdpass" }
};

fake(5) {
  { "./fake.repository", 0, "", "" }
};


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3 Watches

Watches define identities in Peephole, and as for providers the user could fill in the configuration file as many of them he needs; it consists in an identity identifier and one or more regular expressions, that will be mathed against last email headers. If, and only if, all them match any message header watch is trigged and its identifier is returned to the user. Follows the way to define watches:

watch(<watch name>) { "regular expression" };

Example:

 
watch(myfriend) {
  "^From:.*myfriend@mailserver.org"
};

watch(myoffice) {
  "^From:.*@.*myoffice.org|^From:.*@myoffice.com"
};

watch(newsletter) {
  "^Sender:.*nl@.*newsletter.org"
};


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.4 Includes

Configuration file could contain, also, includes to split it in more files; it may be very useful to separate precious providers informations from far less critical watches datas. #include <path to file>


[Top] [Contents] [Index] [ ? ]

Table of Contents


[Top] [Contents] [Index] [ ? ]

Short Table of Contents

1. General Overview
2. Configuration File

[Top] [Contents] [Index] [ ? ]

About this document

This document was generated on May, 17 2004 using texi2html

The buttons in the navigation panels have the following meaning:

Button Name Go to From 1.2.3 go to
[ < ] Back previous section in reading order 1.2.2
[ > ] Forward next section in reading order 1.2.4
[ << ] FastBack previous or up-and-previous section 1.1
[ Up ] Up up section 1.2
[ >> ] FastForward next or up-and-next section 1.3
[Top] Top cover (top) of document  
[Contents] Contents table of contents  
[Index] Index concept index  
[ ? ] About this page  

where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:

This document was generated on May, 17 2004 using texi2html