Commit Graph

115 Commits

Author SHA1 Message Date
Girish Ramakrishnan
f379724128 merge certificates.js and nginx.js to reverseproxy.js
when certs change, we have to call into nginx anyway. since they
go hand in hand, just merge those files. modern reverse proxies
do this job integrated already.
2018-01-30 12:26:09 -08:00
Girish Ramakrishnan
b2363271aa add config.adminDomain 2018-01-28 14:26:41 -08:00
Girish Ramakrishnan
7ce79505ee remove overcomplicated certificate events 2018-01-26 22:47:05 -08:00
Girish Ramakrishnan
777269810f Move mail container creation to mail.js
At this point, mail.js is like an app of it's own
2018-01-20 20:38:35 -08:00
Girish Ramakrishnan
a7de17a160 Move mail related settings to new mail route
there is quite a bit of circular dep between settings, platform and
mail code. this will be removed in future commits.
2018-01-20 20:02:01 -08:00
Girish Ramakrishnan
ee733d54ea Add mail_domains and mail_default_domain to mail.ini 2018-01-19 23:17:00 -08:00
Girish Ramakrishnan
20166cd41c make catch_all fully qualified 2018-01-19 20:02:56 -08:00
Girish Ramakrishnan
27dfd1d6c1 Set the dkim selector when generating keys
The box code owns the dkim dir and selector can change per domain
2018-01-18 21:49:45 -08:00
Girish Ramakrishnan
459314df17 lock for platform start, so that apps are not installed in between 2017-11-28 23:18:43 -08:00
Johannes Zellner
27e4f0cb82 make *DNSRecords apis take the explicit domain 2017-11-20 20:01:50 +01:00
Johannes Zellner
009b8abf1b dns api now takes full fqdn instead of subdomain 2017-11-20 20:01:50 +01:00
Johannes Zellner
a2a1d842fa Add db migration scripts
This adds domains table and adjusts the apps and mailboxes table accordingly

Also ensure we explicitly set the table collation, this is required
for the foreign key from apps table (utf8) and the newly created
domains table, which by default now would be utf8mb4

Put db table constraint for mailboxes.domain

Update the schema file
2017-11-20 19:59:26 +01:00
Johannes Zellner
a7e10cead0 Use domains api in platform 2017-11-20 19:59:26 +01:00
Johannes Zellner
0e74a6df35 Deprecate dns settings api and add dns data migration 2017-11-20 19:59:26 +01:00
Girish Ramakrishnan
2a848a481b Add newline 2017-11-01 09:25:05 -07:00
Girish Ramakrishnan
8ede37a43d Make the dkim selector dynamic
it has to change with the adminLocation so that multiple cloudrons
can send out emails at the same time.
2017-10-31 12:18:40 -07:00
Girish Ramakrishnan
9e9b8b095e Provider dhparams.pem to the mail container 2017-10-02 01:51:28 -07:00
Girish Ramakrishnan
dcdce6d995 Use MAIL_DATA_DIR constant 2017-09-09 22:24:16 -07:00
Girish Ramakrishnan
00786dda05 Do not crash if DNS creds do not work during startup
If DNS creds are invalid, then platform.start() keeps crashing on a
mail container update. For now, just log the error and move on.

Part of #406
2017-08-28 14:55:36 -07:00
Girish Ramakrishnan
0c1e3ec6a0 use mailFqdn instead of adminFqdn 2017-08-04 07:46:09 -07:00
Girish Ramakrishnan
f3483e6a92 fix typo in mail.ini 2017-07-18 17:38:21 -07:00
Girish Ramakrishnan
631b830f4c Add setting to toggle from address validation check
part of #366
2017-07-18 16:33:42 -07:00
Girish Ramakrishnan
63364ae017 Use settings.getAll in createMailConfig 2017-07-18 13:50:39 -07:00
Girish Ramakrishnan
8d9fbb9cea Create mail config regardless of whether owner exists 2017-07-05 11:31:51 -05:00
Girish Ramakrishnan
1007a85fde Use latest haraka and restart on relay change 2017-06-30 09:07:43 -05:00
Girish Ramakrishnan
1c40e51999 Only starttls is supported by haraka
In addition, auth_type has to be set to PLAIN (or LOGIN)
2017-06-30 09:07:43 -05:00
Girish Ramakrishnan
c07df68558 Fix typos 2017-06-30 09:07:37 -05:00
Girish Ramakrishnan
7edf43c627 Select tls based on port
Note that starttls is always supported

part of #188
2017-06-28 16:56:11 -05:00
Girish Ramakrishnan
01d0e56332 refactor code to have a relay provider
part of #188
2017-06-28 11:39:45 -05:00
Girish Ramakrishnan
c4d313a2c0 generate smtp_forward.ini
part of #188
2017-06-27 11:08:50 -05:00
Girish Ramakrishnan
0cc980f539 Add setting for catch all address
Note that this is not a flag on the mailboxes because we might theoretically
support forwarding to some other external domain in the future.

Part of #33
2017-06-15 07:48:46 -07:00
Girish Ramakrishnan
cbb93ef7ad For low end cloudrons, give a delay between addon starts
Starting them all at once, sometimes hogs cpu/memory too much
and makes the startup scripts of the addons error.

The new addons setup a .setup file to confirm initialization.
In a future commit, we can use those .setup files to check if
the addon has started up instead of a timeout
2017-05-10 15:43:02 -07:00
Girish Ramakrishnan
923e1d0524 Kill more event based logic 2017-04-25 16:36:38 -07:00
Girish Ramakrishnan
41edd3778d Merge branch 'dns-fixes' into 'master'
Set DNS per container rather than the daemon

Closes #307

See merge request !6
2017-04-25 17:06:31 +00:00
Ian Fijolek
0ac69cc6c9 Add DNS args to platform containers 2017-04-25 15:21:23 +00:00
Girish Ramakrishnan
8ddb670445 simplify: start/stop taskmanager from platform logic 2017-04-24 15:48:23 -07:00
Girish Ramakrishnan
d891058f8c Restore apps if the existingInfra version is not semver (as in, old infra) 2017-04-04 12:15:29 -07:00
Johannes Zellner
72dd7c74d5 Introduce major/minor infra versions
The strategy now is that major infra version changes make apps restore,
whereas minor infra version changes only reconfigure and thus restart
them
2017-04-04 12:34:55 +02:00
Johannes Zellner
649092ecb0 Fix typo PLATFORM_CONFIG_DIR -> PLATFORM_DATA_DIR 2017-04-04 12:34:55 +02:00
Johannes Zellner
602f8bcd04 Split platform and app data folders and get rid of btrfs volumes 2017-04-04 12:34:55 +02:00
Girish Ramakrishnan
b65fee4b73 Pass ENABLE_MDA flag to mail addon 2017-03-22 20:42:28 -07:00
Girish Ramakrishnan
1bd89ca055 Wait for platform ready after box restarts
This is required for the case where the box restarts apptasks.
For example, the server can reboot mid-way when apptask is running
(as in cloudron-setup + appBundle case) and then when it comes back
up it doesn't wait for the platform to be ready. And the apps fail
to install (mysql takes a bit to startup)
2017-03-15 20:35:44 -07:00
Girish Ramakrishnan
d6fec4f2b9 alertsTo must be an array 2017-02-28 18:17:17 -08:00
Girish Ramakrishnan
03924be491 self-hosted: do not cc support for bounce mails from apps
part of #242
2017-02-24 10:34:07 -08:00
Girish Ramakrishnan
68a8155f49 skip redis addon incremental update
Part of #223
2017-02-16 10:31:02 -08:00
Girish Ramakrishnan
b91674799b Create/destroy event listeners
mocha loads all the tests in same process. This means that when
we start a new test, the old state still persists. For event
listeners, this means that they get multiple duplicate event handlers.
2017-02-07 10:30:52 -08:00
Girish Ramakrishnan
2fac7dd736 delete old nginx configs on infra update
we changed the cert location and reloading nginx fails...
2017-01-28 09:10:49 -08:00
Girish Ramakrishnan
d84666fb43 Move mail data out of box
This will help us with putting a size on box data

Mail container version is bumped because we want to recreate it

Part of #186
2017-01-20 20:22:08 -08:00
Girish Ramakrishnan
f8374929ac generate mail.ini and not mail_vars.ini 2017-01-18 09:11:34 -08:00
Girish Ramakrishnan
5f93290fc7 Fix crash 2017-01-18 08:43:11 -08:00