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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
--
-- Options
--
options.timeout = 120
options.subscribe = true
-- Accounts
GMAIL = IMAP {
-- server = 'imap.gmail.com',
-- port = 993,
-- username = 'ryanakca@gmail.com',
server = 'localhost',
username = 'ryan',
password = 'LOCAL_PASS',
}
-- Another account which connects to the mail server using the SSLv3
-- Get a list of the available mailboxes and folders
mailboxes, folders = GMAIL:list_all()
-- Get a list of the subscribed mailboxes and folders
mailboxes, folders = GMAIL:list_subscribed()
--
-- Filters
-- For
-- GMAIL
--
-- Ubuntu stuff
kubuntu = GMAIL.INBOX:contain_field('List-ID', 'kubuntu-devel.lists.ubuntu.com')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.kuDevel'], kubuntu)
ubuntuWeb = GMAIL.INBOX:contain_field('List-ID', 'ubuntu-website.lists.canonical.com')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.uWebML'], ubuntuWeb)
UbuntuDevelAnnounce = GMAIL.INBOX:contain_field('List-ID', 'ubuntu-devel-announce.lists.ubuntu.com')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.uDevelAnnounce'], UbuntuDevelAnnounce)
ubuntuCanada = GMAIL.INBOX:contain_field('List-ID', 'ubuntu-ca.lists.ubuntu.com')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.uCanada'], ubuntuCanada)
uDoc = GMAIL.INBOX:contain_field('List-ID', 'ubuntu-doc.lists.ubuntu.com')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.uDoc'], uDoc)
uClassroom = GMAIL.INBOX:contain_field('List-Id', 'ubuntu-classroom.lists.ubuntu.com')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.uClassroom'], uClassroom)
uClassroomOwner = GMAIL.INBOX:match_from('ubuntu-classroom-owner@lists.ubuntu.com')
GMAIL.INBOX:move_messages(GMAIL['[Google Mail].Bin'], uClassroomOwner)
launchpadUsers = GMAIL.INBOX:contain_field('List-ID', 'launchpad-users.lists.launchpad.net') +
GMAIL.INBOX:contain_field('List-ID', 'launchpad-users.lists.canonical.com') +
GMAIL.INBOX:match_to('launchpad-users@lists.launchpad.net') +
GMAIL.INBOX:match_cc('launchpad-users@lists.launchpad.net')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.launchpadUsers'], launchpadUsers)
kubuntuBugs = GMAIL.INBOX:contain_field('List-ID', 'kubuntu-bugs.lists.ubuntu.com') +
GMAIL.INBOX:contain_header('X-Launchpad-Message-Rationale: .*@kubuntu-bugs') +
GMAIL.INBOX:match_header('X-BeenThere: kubuntu-bugs@lists.ubuntu.com')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.kuBugs'], kubuntuBugs)
ubuntuirc = GMAIL.INBOX:contain_field('List-ID', 'ubuntu-irc.lists.ubuntu.com')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.ubuntu-irc'], ubuntuirc)
ubuntuinstaller = GMAIL.INBOX:contain_field('List-ID', 'ubuntu-installer.lists.ubuntu.com')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.ubuntu-installer'], ubuntuinstaller)
ubuntu = GMAIL.INBOX:contain_field('List-ID', '.*.lists.ubuntu.com')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu'], ubuntu)
uWebBugs = GMAIL.INBOX:match_header('X-Launchpad-Bug.*product=ubuntu-website.*')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.uWebBugs'], uWebBugs)
kuWebBugs = GMAIL.INBOX:match_header('X-Launchpad-Bug:.*product=kubuntu-website.*')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.kuWebBugs'], kuWebBugs)
ubugs = GMAIL.INBOX:match_header('X-Launchpad-Bug:.*distribution=ubuntu;.*') +
GMAIL.INBOX:contain_field('List-Id', 'ubuntu-bugcontrol.lists.launchpad.net')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.uBugs'], ubugs)
kubuntuninjas = GMAIL.INBOX:match_header('X-Launchpad-PPA: kubuntu-ninjas')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.kubuntu-ninjas'], kubuntuninjas)
--answers = GMAIL.INBOX:match_header('X-Launchpad-Question: distribution=ubuntu.*')
--GMAIL.INBOX:mark_seen(answers)
--GMAIL.INBOX:move_messages(GMAIL['Ubuntu.uAnswers'], answers)
kubuntuWebmaster = GMAIL.INBOX:contain_to('webmaster@kubuntu.org')
GMAIL.INBOX:move_messages(GMAIL['Ubuntu.kuWebmaster'], kubuntuWebmaster)
-- Debian stuff
debianmentorslist = GMAIL.INBOX:contain_field('List-ID', 'debian-mentors.lists.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.debian-mentors'], debianmentorslist)
debiandevel = GMAIL.INBOX:contain_field('List-ID', 'debian-devel.lists.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.debian-devel'], debiandevel)
debiandevelann = GMAIL.INBOX:contain_field('List-ID', 'debian-devel-announce.lists.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.debian-devel-announce'], debiandevelann)
debiannewmaint = GMAIL.INBOX:contain_field('List-ID', 'debian-newmaint.lists.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.debian-newmaint'], debiannewmaint)
debianpythonapps = GMAIL.INBOX:contain_field('List-ID', 'python-apps-team.lists.alioth.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.python-apps-team'], debianpythonapps)
debianqtkde = GMAIL.INBOX:contain_field('List-ID', 'debian-qt-kde.lists.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.debian-qt-kde'], debianqtkde)
debianpkgkdetalk = GMAIL.INBOX:contain_field('List-ID', 'pkg-kde-talk.lists.alioth.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.pkg-kde-talk'], debianpkgkdetalk)
debianpkgkdeextras = GMAIL.INBOX:contain_field('List-ID', 'pkg-kde-extras.lists.alioth.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.pkg-kde-extras'], debianpkgkdeextras)
debianpkgkdecommits = GMAIL.INBOX:contain_field('List-ID', 'pkg-kde-commits.lists.alioth.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.pkg-kde-commits'], debianpkgkdecommits)
debianpython = GMAIL.INBOX:contain_field('List-ID', 'debian-python.lists.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.debian-python'], debianpython)
debiandevelfrench = GMAIL.INBOX:contain_field('List-ID', 'debian-devel-french.lists.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.debian-devel-french'], debiandevelfrench)
debianpkgmultimediacommits = GMAIL.INBOX:contain_field('List-ID', 'pkg-multimedia-commits.lists.alioth.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.pkg-multimedia-commits'], debianpkgmultimediacommits)
debianpkgmultimediamaintainers = GMAIL.INBOX:contain_field('List-ID', 'pkg-multimedia-maintainers.lists.alioth.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.pkg-multimedia-maintainers'], debianpkgmultimediamaintainers)
debianjava = GMAIL.INBOX:contain_field('List-ID', 'debian-java.lists.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.debian-java'], debianjava)
debiannews = GMAIL.INBOX:contain_field('List-ID', 'debian-news.lists.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.debian-news'], debiannews)
debiandak = GMAIL.INBOX:contain_field('List-ID', 'debian-dak.lists.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.debian-dak'], debiandak)
debianproject = GMAIL.INBOX:contain_field('List-ID', 'debian-project.lists.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.debian-project'], debianproject)
debianqa = GMAIL.INBOX:contain_field('List-ID', 'debian-qa.lists.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.debian-qa'], debianqa)
dbugs = GMAIL.INBOX:match_from('.*@bugs.debian.org')
GMAIL.INBOX:move_messages(GMAIL['Debian.dBugs'], dbugs)
-- KDE Stuff
kdefrancophone = GMAIL.INBOX:contain_field('List-ID', 'kde-francophone.kde.org')
GMAIL.INBOX:move_messages(GMAIL['KDE.kde-francophone'], kdefrancophone)
-- Other computer stuff
--
slashdot = ( GMAIL.INBOX:is_seen() *
GMAIL.INBOX:match_from('slashdot@slashdot.org') )
GMAIL.INBOX:move_messages(GMAIL['Slashdot'], slashdot)
--
lwn = ( GMAIL.INBOX:is_seen() *
GMAIL.INBOX:match_from('lwn@lwn.net') )
GMAIL.INBOX:move_messages(GMAIL['lwn'], lwn)
sbuild = GMAIL.INBOX:match_from('sbuild@.*.ryanak.ca') +
GMAIL.INBOX:match_from('sbuild@lambda')
GMAIL.INBOX:move_messages(GMAIL['sbuild'], sbuild)
freebsdstable = GMAIL.INBOX:contain_field('List-Id', 'freebsd-stable.freebsd.org')
GMAIL.INBOX:move_messages(GMAIL['FreeBSD.freebsd-stable'], freebsdstable)
freebsdcurrent = GMAIL.INBOX:contain_field('List-Id', 'freebsd-current.freebsd.org')
GMAIL.INBOX:move_messages(GMAIL['FreeBSD.freebsd-current'], freebsdcurrent)
-- O'ists
oactivists = GMAIL.INBOX:contain_field('List-Id', 'oactivists.googlegroups.com') *
GMAIL.INBOX:is_seen()
GMAIL.INBOX:move_messages(GMAIL['OActivists'], oactivists)
oevolve = GMAIL.INBOX:contain_field('List-Id', 'oevolve.googlegroups.com') *
GMAIL.INBOX:is_seen()
GMAIL.INBOX:move_messages(GMAIL['OEvolve'], oevolve)
oproducers = GMAIL.INBOX:contain_field('List-Id', 'oproducers.googlegroups.com') *
GMAIL.INBOX:is_seen()
GMAIL.INBOX:move_messages(GMAIL['OProducers'], oproducers)
ogrownups = GMAIL.INBOX:contain_field('List-Id', 'ogrownups.googlegroups.com') *
GMAIL.INBOX:is_seen()
GMAIL.INBOX:move_messages(GMAIL['OGrownups'], ogrownups)
ogeeks = GMAIL.INBOX:contain_field('List-ID', 'ogeeks.googlegroups.com') *
GMAIL.INBOX:is_seen()
GMAIL.INBOX:move_messages(GMAIL['OGeeks'], ogeeks)
opeople = GMAIL.INBOX:contain_field('List-ID', 'opeople.googlegroups.com') *
GMAIL.INBOX:is_seen()
GMAIL.INBOX:move_messages(GMAIL['OPeople'], opeople)
paleobloggers = GMAIL.INBOX:contain_field('List-Id', 'paleobloggers.googlegroups.com') *
GMAIL.INBOX:is_seen()
GMAIL.INBOX:move_messages(GMAIL['PaleoBloggers'], paleobloggers)
paleocooks = GMAIL.INBOX:contain_field('List-Id', 'paleocooks.googlegroups.com') *
GMAIL.INBOX:is_seen()
GMAIL.INBOX:move_messages(GMAIL['PaleoBloggers'], paleocooks)
-- Queen's
qsocial = ( GMAIL.INBOX:is_seen() *
( GMAIL.INBOX:match_to('social@cs.queensu.ca') +
GMAIL.INBOX:match_cc('social@cs.queensu.ca') ) )
GMAIL.INBOX:move_messages(GMAIL['Queens.social'], qsocial)
qsail = ( GMAIL.INBOX:match_to('sail.*@cs.queensu.ca') +
GMAIL.INBOX:match_cc('sail.*@cs.queensu.ca') +
GMAIL.INBOX:match_to('sail4schedule@gmail.com') ) *
GMAIL.INBOX:is_seen()
GMAIL.INBOX:move_messages(GMAIL['Queens.SAIL'], qsail)
-- People
bagpipes = GMAIL.INBOX:match_from('PM_EMAIL') +
GMAIL.INBOX:match_cc('PM_EMAIL')
GMAIL.INBOX:move_messages(GMAIL['Bagpipes'], bagpipes)
-- Misc
pjm = GMAIL.INBOX:match_from('webmaster@pjmedia.com') *
GMAIL.INBOX:is_seen()
GMAIL.INBOX:move_messages(GMAIL['PJM'], pjm)
rubinreports = GMAIL.INBOX:match_from('profbarryrubin@yahoo.com') *
GMAIL.INBOX:is_seen()
GMAIL.INBOX:move_messages(GMAIL['RubinReports'], rubinreports)
vfr = GMAIL.INBOX:match_from('vfr-no-reply@aynrand.org') *
GMAIL.INBOX:is_seen()
GMAIL.INBOX:move_messages(GMAIL['VfR'], vfr)
|