diff conf/Init.luan @ 0:7ecd1a4ef557

add content
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 21 Mar 2019 19:15:52 -0600
parents
children abe0694e9849
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/conf/Init.luan	Thu Mar 21 19:15:52 2019 -0600
@@ -0,0 +1,82 @@
+java()
+local Luan = require "luan:Luan.luan"
+local error = Luan.error
+local MailHome = require "java:fschmidt.util.mail.MailHome"
+local System = require "java:java.lang.System"
+local Logging = require "luan:logging/Logging.luan"
+local logger = Logging.logger "Init_default"
+
+
+local Init = {}
+
+System.setProperty("mail.smtp.host", "127.0.0.1")
+System.setProperty("mail.mime.base64.ignoreerrors", "true")
+System.setProperty("mail.mime.address.strict", "false")
+System.setProperty("mail.mime.decodetext.strict", "false")
+
+Init.dbUrl = "jdbc:postgresql://localhost:5432/nabble"
+Init.dbUser = "administrator"
+Init.dbPassword = ""
+
+Init.poolSize = 130
+
+Init.local_dir = "local/"
+
+-- for now
+local smtp = MailHome.getSmtpServer("mail.smtp2go.com","dev@singlesushi.com","FB4dating")
+smtp.setPort(2525)
+MailHome.setDefaultSmtpServer(smtp)
+
+Init.homeContextUrl = "http://me.nabble.com:8081"
+
+Init.deleteInactiveSites = false
+Init.nabbleHost = "me.nabble.com:8080"
+
+
+Init.defaultHost = "me.nabble.com:8080"
+Init.domain = Init.defaultHost
+--Init.mailDomain = Init.defaultHost
+Init.nabbleHost = Init.defaultHost
+
+--[=[
+local function getPop3Server(addr, pwd)
+	local server = MailHome.getPop3Server(popMailServer, addr, pwd)
+	server.useSsl()
+	return server
+end
+
+local pop3 = {}  -- fill in
+
+local pop3Servers = {
+	lists = 'mailingListArchivePop3Server'
+	fwd = 'fwdPop3Server'
+	ml = 'subscriptionsPop3Server'
+	sb = 'subscriptionBouncesPop3Server'
+}
+for name, password in pairs(pop3) do
+	Init[pop3Servers[name]] = getPop3Server( name.."@"..Init.mailDomain, password )
+end
+]=]
+
+--local HashSet = require "java:java.util.HashSet"
+--Init.sysadmins = HashSet.new {}  -- list of emails
+
+--Init.monitor_emails = {}  -- list of emails
+
+
+-- for serve_nabble.luan
+
+function Init.fix_serve(Serve)
+	if Serve.is_www then
+		Serve.is_forums = false
+	else
+		Serve.www_port = 8081
+		Serve.is_www = true
+	end
+end
+
+function Init.add_filters(context)
+end
+
+
+return Init