Mercurial Hosting > nabble
annotate conf/Init.luan @ 14:ce7a435cba25
change ad unit ad code
author | raven <mazdarulez@hotmail.com> |
---|---|
date | Wed, 21 Aug 2019 13:43:30 +1000 |
parents | c4ed473452d4 |
children | 862b1ef23e75 |
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 | |
6 | 68 --Init.ssl_dir = nil |
69 | |
0 | 70 |
71 -- for serve_nabble.luan | |
72 | |
73 function Init.fix_serve(Serve) | |
74 if Serve.is_www then | |
75 Serve.is_forums = false | |
76 else | |
77 Serve.www_port = 8081 | |
78 Serve.is_www = true | |
79 end | |
80 end | |
81 | |
82 function Init.add_filters(context) | |
83 end | |
84 | |
85 | |
86 return Init |