Mercurial Hosting > nabble
annotate conf/Init.luan @ 44:cc5b7d515580
remove post by email
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Fri, 11 Jun 2021 09:43:51 -0600 |
| parents | 4d90d48a19ec |
| children | 72765b66e2c3 |
| 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" | |
|
42
af4632c42979
fix init conf to fix subscription emails
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
18
diff
changeset
|
10 local pairs = Luan.pairs or error() |
| 0 | 11 |
| 12 local Init = {} | |
| 13 | |
|
42
af4632c42979
fix init conf to fix subscription emails
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
18
diff
changeset
|
14 System.setProperty("mail.smtp.host", "mail.smtp2go.com") |
| 0 | 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 | |
|
42
af4632c42979
fix init conf to fix subscription emails
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
18
diff
changeset
|
40 Init.mailDomain = Init.defaultHost |
| 0 | 41 Init.nabbleHost = Init.defaultHost |
|
42
af4632c42979
fix init conf to fix subscription emails
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
18
diff
changeset
|
42 Init.mailDomain = "me.nabble.com" |
| 0 | 43 |
|
42
af4632c42979
fix init conf to fix subscription emails
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
18
diff
changeset
|
44 local popMailServer = "pop.fastmail.com" |
|
af4632c42979
fix init conf to fix subscription emails
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
18
diff
changeset
|
45 |
| 0 | 46 local function getPop3Server(addr, pwd) |
| 47 local server = MailHome.getPop3Server(popMailServer, addr, pwd) | |
| 48 server.useSsl() | |
| 49 return server | |
| 50 end | |
| 51 | |
|
42
af4632c42979
fix init conf to fix subscription emails
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
18
diff
changeset
|
52 local pop3 = { |
| 43 | 53 -- lists = 'mailingListArchivePassword' |
| 54 -- fwd = 'fwdPassword' | |
| 55 -- ml = 'subscriptionsPassword' | |
| 56 -- sb = 'subscriptionBouncesPasword' | |
|
42
af4632c42979
fix init conf to fix subscription emails
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
18
diff
changeset
|
57 } |
| 0 | 58 |
| 59 local pop3Servers = { | |
| 60 lists = 'mailingListArchivePop3Server' | |
| 61 fwd = 'fwdPop3Server' | |
| 62 ml = 'subscriptionsPop3Server' | |
| 63 sb = 'subscriptionBouncesPop3Server' | |
| 64 } | |
|
42
af4632c42979
fix init conf to fix subscription emails
Vadim Filimonov <fffilimonov@yandex.ru>
parents:
18
diff
changeset
|
65 |
| 0 | 66 for name, password in pairs(pop3) do |
| 67 Init[pop3Servers[name]] = getPop3Server( name.."@"..Init.mailDomain, password ) | |
| 68 end | |
| 69 | |
| 70 --local HashSet = require "java:java.util.HashSet" | |
| 71 --Init.sysadmins = HashSet.new {} -- list of emails | |
| 72 | |
| 73 --Init.monitor_emails = {} -- list of emails | |
| 74 | |
| 6 | 75 --Init.ssl_dir = nil |
| 76 | |
| 0 | 77 |
| 78 -- for serve_nabble.luan | |
| 79 | |
| 80 function Init.fix_serve(Serve) | |
| 81 if Serve.is_www then | |
| 82 Serve.is_forums = false | |
| 83 else | |
| 84 Serve.www_port = 8081 | |
| 85 Serve.is_www = true | |
| 86 end | |
| 87 end | |
| 88 | |
| 18 | 89 local Server = require "java:global.Server" |
| 90 Server.add("local","jdbc:postgresql://localhost:5432/nabble","administrator","","me.nabble.com"); | |
| 91 | |
| 0 | 92 function Init.add_filters(context) |
| 93 end | |
| 94 | |
| 95 | |
| 96 return Init |
