diff --git a/src/apps.js b/src/apps.js index 7b4cfec18..8d4995fb0 100644 --- a/src/apps.js +++ b/src/apps.js @@ -104,7 +104,7 @@ AppsError.BAD_CERTIFICATE = 'Invalid certificate'; // https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names // We are validating the validity of the location-fqdn as host name function validateHostname(location, fqdn) { - var RESERVED_LOCATIONS = [ constants.ADMIN_LOCATION, constants.API_LOCATION ]; + var RESERVED_LOCATIONS = [ constants.ADMIN_LOCATION, constants.API_LOCATION, constants.SMTP_LOCATION, constants.IMAP_LOCATION ]; if (RESERVED_LOCATIONS.indexOf(location) !== -1) return new Error(location + ' is reserved'); diff --git a/src/constants.js b/src/constants.js index ad061df02..adb61cc96 100644 --- a/src/constants.js +++ b/src/constants.js @@ -4,6 +4,9 @@ exports = module.exports = { ADMIN_LOCATION: 'my', API_LOCATION: 'api', // this is unused but reserved for future use (#403) + SMTP_LOCATION: 'smtp', + IMAP_LOCATION: 'imap', + ADMIN_NAME: 'Settings', ADMIN_CLIENT_ID: 'webadmin', // oauth client id