Mercurial Hosting > nabble
annotate conf/Init.luan @ 3:1010f557927f
allow setting salt for backup file
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 25 Mar 2019 18:38:18 -0600 |
parents | abe0694e9849 |
children | c4ed473452d4 |
rev | line source |
---|---|
0 | 1 java() |
2 local Luan = require "luan:Luan.luan" | |
3 local error = Luan.error | |
2
abe0694e9849
replace local_dir with home_dir
Franklin Schmidt <fschmidt@gmail.com>
parents:
0
diff
changeset
|
4 local Io = require "luan:Io.luan" |
abe0694e9849
replace local_dir with home_dir
Franklin Schmidt <fschmidt@gmail.com>
parents:
0
diff
changeset
|
5 local uri = Io.uri or error() |
0 | 6 local MailHome = require "java:fschmidt.util.mail.MailHome" |
7 local System = require "java:java.lang.System" | |
8 local Logging = require "luan:logging/Logging.luan" | |
9 local logger = Logging.logger "Init_default" | |
10 | |
11 | |
12 local Init = {} | |
13 | |
14 System.setProperty("mail.smtp.host", "127.0.0.1") | |
15 System.setProperty("mail.mime.base64.ignoreerrors", "true") | |
16 System.setProperty("mail.mime.address.strict", "false") | |
17 System.setProperty("mail.mime.decodetext.strict", "false") | |
18 | |
19 Init.dbUrl = "jdbc:postgresql://localhost:5432/nabble" | |
20 Init.dbUser = "administrator" | |
21 Init.dbPassword = "" | |
22 | |
23 Init.poolSize = 130 | |
24 | |
2
abe0694e9849
replace local_dir with home_dir
Franklin Schmidt <fschmidt@gmail.com>
parents:
0
diff
changeset
|
25 Init.home_dir = uri( uri("classpath:nabble").to_string() ).parent().parent().to_string().."/" |
0 | 26 |
27 -- for now | |
28 local smtp = MailHome.getSmtpServer("mail.smtp2go.com","dev@singlesushi.com","FB4dating") | |
29 smtp.setPort(2525) | |
30 MailHome.setDefaultSmtpServer(smtp) | |
31 | |
32 Init.homeContextUrl = "http://me.nabble.com:8081" | |
33 | |
34 Init.deleteInactiveSites = false | |
35 Init.nabbleHost = "me.nabble.com:8080" | |
36 | |
37 | |
38 Init.defaultHost = "me.nabble.com:8080" | |
39 Init.domain = Init.defaultHost | |
40 --Init.mailDomain = Init.defaultHost | |
41 Init.nabbleHost = Init.defaultHost | |
42 | |
43 --[=[ | |
44 local function getPop3Server(addr, pwd) | |
45 local server = MailHome.getPop3Server(popMailServer, addr, pwd) | |
46 server.useSsl() | |
47 return server | |
48 end | |
49 | |
50 local pop3 = {} -- fill in | |
51 | |
52 local pop3Servers = { | |
53 lists = 'mailingListArchivePop3Server' | |
54 fwd = 'fwdPop3Server' | |
55 ml = 'subscriptionsPop3Server' | |
56 sb = 'subscriptionBouncesPop3Server' | |
57 } | |
58 for name, password in pairs(pop3) do | |
59 Init[pop3Servers[name]] = getPop3Server( name.."@"..Init.mailDomain, password ) | |
60 end | |
61 ]=] | |
62 | |
63 --local HashSet = require "java:java.util.HashSet" | |
64 --Init.sysadmins = HashSet.new {} -- list of emails | |
65 | |
66 --Init.monitor_emails = {} -- list of emails | |
67 | |
68 | |
69 -- for serve_nabble.luan | |
70 | |
71 function Init.fix_serve(Serve) | |
72 if Serve.is_www then | |
73 Serve.is_forums = false | |
74 else | |
75 Serve.www_port = 8081 | |
76 Serve.is_www = true | |
77 end | |
78 end | |
79 | |
80 function Init.add_filters(context) | |
81 end | |
82 | |
83 | |
84 return Init |