-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpersonal.lua
More file actions
82 lines (58 loc) · 1.66 KB
/
Copy pathpersonal.lua
File metadata and controls
82 lines (58 loc) · 1.66 KB
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
-------------
-- Options --
-------------
-- Provide feedback on actions applied by Imapfilter
options.info = true
-- If a target folder doesn't exist, create it
options.create = true
-- Auto-subscribe to any new folder that's created
options.subscribe = true
-- Don't delete all messages marked for deletion at the end of the session
options.close = false
-- Use a TLS connection (if server supports it)
options.starttls = true
-- Ignore certificate mismatches :(
options.certificates = false
-- Return from IDLE on any change to Inbox
options.wakeonany = true
-- The time in minutes before terminating and re-issuing the IDLE command
options.keepalive = 4
-------------
-- Logging --
-------------
-- Import log settings
log = require("functions/log")
-- Set the default log file name
log.file.name = "personal.latest.log"
----------------------
-- Global Functions --
----------------------
-- Import flobal functions
require("functions/functions")
--------------
-- Accounts --
--------------
-- Load email accounts data (global: accounts)
require("data/accounts")
catchall = create_account(accounts[1])
personal = create_account(accounts[2])
business = create_account(accounts[3])
accounts = {personal, business, catchall}
primary_account = personal
------------------
-- Rule Modules --
------------------
require("functions/triage")
require("functions/consolidate")
require("functions/organise")
require("functions/sweep")
require("functions/clean")
require("functions/junk")
-------------
-- Execute --
-------------
repeat
dofile("functions/sequence.lua")
filter(accounts, primary_account)
log.file:close()
until not(primary_account.INBOX:enter_idle())