-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
158 lines (106 loc) · 5.52 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
Version 0.1
Pronounced /'zɛfiːmæp/ or ZE-fee-map.
zephymap is a utility to receive zephyr notifications of mail on IMAP servers.
This is acheived by running zephymap.py on a computer or server of your choice
and having it check the IMAP servers you indicate in your config file (see
below) and notifying you of new messages via zephyr notification on a class of
your choice.
**NOTE**: Due to the specifics of implementation, a SIGINT (Ctrl-C) will not
kill zephymap. The proper signal to send zephymap is SIGQUIT (Ctrl-\).
INSTALLING LIBRARIES
================================================================================
zephymap requires python-zephyr in order to send notifications, which requires
libzephyr-dev, which may or may not require comerr-dev. libzephyr-dev is known
to work on linerva, and is in the Ubuntu/Debian repositories.
To install python-zephyr:
1. Determine which version of python you are using via 'python --version'; 2.5
and 2.6 are both known to work.
2. Run
mkdir -p ~/.local/lib/python2.5/site-packages
(replacing ~/.local with a directory of your choice, and 2.5 with 2.6 if
appropriate).
3. Open your .bashrc_profile or other suitable dotfile (e.g., .bashrc.mine) and
add the line
export PYTHONPATH=~/.local/lib/python2.5/site-packages:$PYTHONPATH
where the directory is the one you made in step 2.
3. Either download python-zephyr from:
https://github.com/ebroder/python-zephyr/downloads
and unpack the archive, or (if you feel like using the development version)
clone the git repo by running:
git clone git://github.com/ebroder/python-zephyr.git
Either way, cd into the created python-zephyr directory.
4. Run
python setup.py install --prefix=~/.local
where ~/.local is the directory containing the lib/ directory from step
2. This should install python-zephyr.
INSTALLING ZEPHYMAP
================================================================================
zephymap itself requires no special setup.
1. Create a directory into which to download zephymap.
2. Download a copy, either from
https://github.com/lightquake/zephymap/downloads
or get the latest development build (not guaranteed to be stable or even
work) via
git clone git://github.com/lightquake/zephymap.git
3. Set up the ~/.zephymap.conf configuration file as described in the
CONFIGURATION section
4. Run zephymap:
python zephymap.py
5. Subscribe to the class zephymap is sending zephyrs to (default MAIL). In
barnowl,
:sub MAIL * me
will do this, where 'me' is replaced with your username.
CONFIGURATION
================================================================================
zephymap reads from a config file in your home directory named ".zephymap.conf".
This file must be of the following format:
[zephyr]
recipient: joeuser
[Mailbox 1]
server: imap.foo.com
username: username1
password: password1
[Mailbox 2]
server: imap.baz.com
username: username2
ssl: true
The [mailbox] section names (the string inside the []) should contain a short
meaningful name for the mail server it defines. This will appear in the
instance of zephyrs sent by zephymap.
The [zephyr] section has the following (case sensitive) options and must be
named such:
recipient The zephyr user to whom zephymap should make the zephyrs readable.
class The class to which zephymap will send mail notification zephyrs.
This is the class to which the user identified in "recipient" will
need to be subscribed in order to see the zephyrs. The default is
"MAIL".
Each IMAP [mailbox] section has the following (caseinsensitive) options:
server The URI of the IMAP server (e.g., "imap.gmail.com" for Gmail and
"imap.exchange.mit.edu" for MIT's Exchange email server)
username The username for the account on the indicated server.
password The password for the account on the indicated server. Leaving this
option out will cause zephymap to prompt you to input your password
at startup. This is the suggested behaviour for the security
concious.
interval An interval value in seconds that indicates the time to wait between
checking the mailbox for new messages. It cannot be set less than 10
seconds. The default is 20 seconds.
ssl A boolean value that indicates whether or not the server utilizes
ssl. Default is true.
port An integer value that indicates the port to be used to access the IMAP
server. The default for an SSL server is 993, and the default for a
non-SSL server is 143.
include A semi-colon separated list of folder names to be included. If left
blank, the default is all folders. Subfolders can be included by
indicating "folder/subfolder"; for example,
MIT/SIPB; zephymap; INBOX
Note that spaces in the middle of folder names are important, but
spaces at the beginning or end are not.
exclude A semi-colon separated list of folder names to be excluded even if
they exist in the include list. The default is to exclude none. Syntax
is identical to that of the "include" option.
regex A boolean option that causes include and exclude to interpret their
arguments as Perl-style regular expressions. Use this option only if
you are familiar with regular expressions. Note that the regex will
automatically be case-insensitive
Contact Patrick at [email protected] or on (MIT) zephyr via the zephymap class.