Files
cloudron-box/src/views/email.html

612 lines
33 KiB
HTML
Raw Normal View History

2018-01-22 13:01:38 -08:00
<!-- Modal enable email -->
<div class="modal fade" id="enableEmailModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Enable Email for {{selectedDomain.domain}}?</h4>
2018-01-22 13:01:38 -08:00
</div>
<div class="modal-body">
<div ng-show="selectedDomain.provider === 'noop' || selectedDomain.provider === 'manual'">
No DNS provider is setup. The DNS records listed below have to be setup manually.<br/>
</div>
<div ng-hide="selectedDomain.provider === 'noop' || selectedDomain.provider === 'manual'">
Cloudron will setup Email related DNS records automatically for {{selectedDomain.domain}}. Status of DNS Records below
may show an error while DNS is propagating (~5 minutes).
<br/><br/>
If this domain is already configured to handle email with some other provider, it will overwrite those DNS records.
</div>
<br/>
<div>Any installed webmail clients will be automatically re-configured to reflect this change.</div>
2018-01-22 13:01:38 -08:00
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" ng-click="incomingEmail.enable()">I understand, enable</button>
2018-01-22 13:01:38 -08:00
</div>
</div>
</div>
</div>
2018-05-06 23:36:40 -07:00
<!-- Modal disable email -->
<div class="modal fade" id="disableEmailModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Disable Email Server for {{selectedDomain.domain}}?</h4>
2018-05-06 23:36:40 -07:00
</div>
<div class="modal-body">
<div>Any installed webmail clients will be automatically re-configured to reflect this change.</div>
2018-05-06 23:36:40 -07:00
<br/>
<div><b>Mailboxes and lists associated with this domain will not be deleted</b>.</div>
<br/>
2018-05-06 23:36:40 -07:00
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-danger" ng-click="incomingEmail.disable()">Disable</button>
2018-05-06 23:36:40 -07:00
</div>
</div>
</div>
</div>
2018-04-09 16:12:18 +02:00
<!-- Modal add mailbox -->
2018-04-09 15:56:20 +02:00
<div class="modal fade" id="mailboxAddModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Add Mailbox</h4>
</div>
<div class="modal-body">
<form name="mailboxadd_form" role="form" ng-submit="mailboxes.add.submit()" autocomplete="off">
<input type="password" style="display: none;">
<div class="form-group" ng-class="{ 'has-error': mailboxes.add.error }">
2018-04-09 15:56:20 +02:00
<label class="control-label">Name</label>
<div class="control-label" ng-show="mailboxes.add.error">
<small>{{ mailboxes.add.error.message }}</small>
</div>
2018-04-09 15:56:20 +02:00
<div class="input-group form-inline" style="margin-top: 10px;">
2018-04-09 15:58:25 +02:00
<input type="text" class="form-control" ng-model="mailboxes.add.name" placeholder="Name" required autofocus autocomplete="off"/>
<div class="input-group-addon">@{{ selectedDomain.domain }}</div>
</div>
2018-04-09 15:56:20 +02:00
</div>
<div class="form-group">
2018-04-09 12:35:14 -07:00
<label class="control-label">Mailbox Owner</label>
<select class="form-control" ng-model="mailboxes.add.owner" ng-options="u.display for u in users track by u.id" required></select>
2018-04-09 15:56:20 +02:00
</div>
<input class="hide" type="submit" ng-disabled="mailboxadd_form.$invalid || mailboxes.add.busy"/>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" ng-click="mailboxes.add.submit()" ng-disabled="mailboxadd_form.$invalid || mailboxes.add.busy"><i class="fa fa-circle-notch fa-spin" ng-show="mailboxes.add.busy"></i> Save</button>
2018-04-09 15:56:20 +02:00
</div>
</div>
</div>
</div>
2018-04-09 12:42:14 +02:00
<!-- Modal edit mailbox -->
<div class="modal fade" id="mailboxEditModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Edit mailbox {{ mailboxes.edit.name }}@{{selectedDomain.domain}}</h4>
2018-04-09 12:42:14 +02:00
</div>
<div class="modal-body">
<form name="mailboxedit_form" role="form" ng-submit="mailboxes.edit.submit()" autocomplete="off">
<input type="password" style="display: none;">
<div class="form-group">
<label class="control-label">Mailbox Owner</label>
<select class="form-control" ng-model="mailboxes.edit.owner" ng-options="u.display for u in users track by u.id" autofocus></select>
2018-04-09 12:42:14 +02:00
</div>
<div class="form-group" ng-class="{ 'has-error': mailboxes.edit.error }">
<label class="control-label">Aliases</label>
<div class="control-label" ng-show="mailboxes.edit.error">
<small>{{ mailboxes.edit.error.message }}</small>
</div>
<div class="input-group form-inline" style="margin-top: 10px;">
<tag-input class="form-group form-control" placeholder="Add alias" taglist="mailboxes.edit.aliases" name="aliases"></tag-input>
<div class="input-group-addon">@{{ selectedDomain.domain }}</div>
2018-04-09 12:42:14 +02:00
</div>
</div>
2019-01-10 13:31:49 -08:00
<input class="hide" type="submit" ng-disabled="mailboxedit_form.$invalid || mailboxes.edit.busy || !mailboxes.edit.owner"/>
2018-04-09 12:42:14 +02:00
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
2019-01-10 13:31:49 -08:00
<button type="button" class="btn btn-success" ng-click="mailboxes.edit.submit()" ng-disabled="mailboxedit_form.$invalid || mailboxes.edit.busy || !mailboxes.edit.owner"><i class="fa fa-circle-notch fa-spin" ng-show="mailboxes.edit.busy"></i> Save</button>
2018-04-09 12:42:14 +02:00
</div>
</div>
</div>
</div>
2018-04-05 21:22:07 +02:00
<!-- Modal remove mailbox -->
<div class="modal fade" id="mailboxRemoveModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
2018-04-11 18:49:41 -07:00
<h4 class="modal-title">Delete mailbox {{ mailboxes.remove.mailbox.name }}@{{selectedDomain.domain}}</h4>
2018-04-05 21:22:07 +02:00
</div>
<div class="modal-body">
2018-04-11 18:49:41 -07:00
<p>Really delete mailbox <b>{{ mailboxes.remove.mailbox.name }}@{{selectedDomain.domain}}</b>?</p>
2018-04-05 21:22:07 +02:00
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger" ng-click="mailboxes.remove.submit()" ng-disabled="mailboxes.remove.busy"><i class="fa fa-circle-notch fa-spin" ng-show="mailboxes.remove.busy"></i> Delete</button>
2018-04-05 21:22:07 +02:00
</div>
</div>
</div>
</div>
2018-04-09 16:12:18 +02:00
<!-- Modal add mailinglist -->
<div class="modal fade" id="mailinglistAddModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
2018-04-09 12:35:14 -07:00
<h4 class="modal-title">Add Mailing list</h4>
2018-04-09 16:12:18 +02:00
</div>
<div class="modal-body">
<form name="mailinglistadd_form" role="form" ng-submit="mailinglists.add.submit()" autocomplete="off">
<input type="password" style="display: none;">
<div class="form-group" ng-class="{ 'has-error': mailinglists.add.error.statusCode === 409 }">
<label class="control-label">Name</label>
<div class="control-label" ng-show="mailinglists.add.error.statusCode === 409">
<small>A mailbox of list with this name already exists</small>
</div>
<div class="input-group form-inline" style="margin-top: 10px;">
<input type="text" class="form-control" ng-model="mailinglists.add.name" placeholder="Name" required autofocus autocomplete="off"/>
<div class="input-group-addon">@{{ selectedDomain.domain }}</div>
</div>
</div>
<div class="form-group">
2018-04-09 12:35:14 -07:00
<label class="control-label">List Members</label><br/>
<multiselect ng-model="mailinglists.add.members" options="mailbox.name for mailbox in mailboxes.mailboxes" data-compare-by="name" data-multiple="true"></multiselect>
2018-04-09 16:12:18 +02:00
</div>
<input class="hide" type="submit" ng-disabled="mailinglistadd_form.$invalid || mailinglists.add.members.length === 0 || mailinglists.add.busy"/>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" ng-click="mailinglists.add.submit()" ng-disabled="mailinglistadd_form.$invalid || mailinglists.add.members.length === 0 || mailinglists.add.busy"><i class="fa fa-circle-notch fa-spin" ng-show="mailinglists.add.busy"></i> Save</button>
2018-04-09 16:12:18 +02:00
</div>
</div>
</div>
</div>
<!-- Modal edit mailinglist -->
<div class="modal fade" id="mailinglistEditModal" tabindex="-1" role="dialog">
2018-04-09 15:08:05 +02:00
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Edit Mailing list {{ mailinglists.edit.name }}@{{selectedDomain.domain}}</h4>
2018-04-09 15:08:05 +02:00
</div>
<div class="modal-body">
<form name="mailinglistedit_form" role="form" ng-submit="mailinglists.edit.submit()" autocomplete="off">
<input type="password" style="display: none;">
<div class="form-group" ng-class="{ 'has-error': mailinglists.edit.error }">
<label class="control-label">List Members</label><br/>
2018-04-09 15:08:05 +02:00
<div class="control-label" ng-show="mailinglists.edit.error">
<small>{{ mailinglists.edit.error.message }}</small>
</div>
<multiselect ng-model="mailinglists.edit.members" options="mailbox.name for mailbox in mailboxes.mailboxes" data-compare-by="name" data-multiple="true" autofocus></multiselect>
2018-04-09 15:08:05 +02:00
</div>
<input class="hide" type="submit" ng-disabled="mailinglistedit_form.$invalid || mailinglists.edit.busy"/>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" ng-click="mailinglists.edit.submit()" ng-disabled="mailinglistedit_form.$invalid || mailinglists.edit.busy"><i class="fa fa-circle-notch fa-spin" ng-show="mailinglists.edit.busy"></i> Save</button>
</div>
</div>
</div>
2018-04-09 15:08:05 +02:00
</div>
2018-04-06 16:43:43 +02:00
<!-- Modal remove mailinglist -->
<div class="modal fade" id="mailinglistRemoveModal" tabindex="-1" role="dialog">
2018-04-09 15:08:05 +02:00
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Delete mailing list {{ mailinglists.remove.list.name }}@{{selectedDomain.domain}}</h4>
2018-04-09 15:08:05 +02:00
</div>
<div class="modal-body">
<p>Really delete mailinglist <b>{{ mailinglists.remove.list.name }}@{{selectedDomain.domain}}</b>?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-danger" ng-click="mailinglists.remove.submit()" ng-disabled="mailinglists.remove.busy"><i class="fa fa-circle-notch fa-spin" ng-show="mailinglist.remove.busy"></i> Delete</button>
2018-04-06 16:43:43 +02:00
</div>
</div>
</div>
2018-04-09 15:08:05 +02:00
</div>
2018-04-06 16:43:43 +02:00
2018-01-22 13:01:38 -08:00
<!-- Test email sent -->
<div class="modal fade" id="testEmailModal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Send test email</h4>
</div>
<div class="modal-body">
2018-04-09 15:08:05 +02:00
<form name="testEmailForm" role="form" novalidate ng-submit="testEmail.submit()" autocomplete="off">
<fieldset>
<p class="has-error text-center" ng-show="testEmail.error">{{ testEmail.error.generic }}</p>
<p>This will send a test email from no-reply@{{selectedDomain.domain}} to the address below.</p>
<br/>
<div class="form-group" ng-class="{ 'has-error': testEmail.error.key }">
<label class="control-label" for="inputTestEmailKey">Email to</label>
<input type="text" class="form-control" ng-model="testEmail.mailTo" id="inputTestMailTo" name="mailTo" ng-disabled="testEmail.busy" placeholder="Email address" autofocus>
</div>
<input class="ng-hide" type="submit" ng-disabled="testEmailForm.$invalid"/>
</fieldset>
</form>
2018-01-22 13:01:38 -08:00
</div>
<div class="modal-footer ">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-outline btn-success pull-right" ng-click="testEmail.submit()" ng-disabled="testEmail.$invalid || testEmail.busy">
<i class="fa fa-circle-notch fa-spin" ng-show="testEmail.busy"></i><span>Send</span>
2018-01-22 13:01:38 -08:00
</button>
2018-04-09 15:08:05 +02:00
</div>
2018-01-22 13:01:38 -08:00
</div>
</div>
</div>
2018-01-23 12:30:35 +01:00
<div ng-show="!ready" class="loading-banner">
<h1><i class="fa fa-circle-notch fa-spin"></i></h1>
2018-01-23 12:30:35 +01:00
</div>
<div class="content" ng-show="ready">
2018-01-22 13:01:38 -08:00
<div class="text-left">
2018-01-23 12:30:35 +01:00
<h1>
Email
<select class="form-control pull-right" style="display: inline-block; width: 200px;" ng-model="selectedDomain" ng-options="a.domain for a in domains" ng-change="selectDomain()"></select>
2018-01-23 12:30:35 +01:00
</h1>
2018-01-22 13:01:38 -08:00
</div>
2018-05-23 22:00:48 -07:00
<uib-tabset>
<uib-tab index="0" heading="Mailboxes">
<div class="card card-large" style="margin-bottom: 15px;">
2018-05-24 09:26:41 -07:00
<h4>Incoming Email</h4>
2018-05-23 22:00:48 -07:00
<div class="row">
2018-05-24 09:26:41 -07:00
<div class="col-md-10">
Cloudron <a ng-href="{{ config.webServerOrigin + '/documentation/email/' }}" target="_blank">Email Server</a> allows users to receive email for this domain.
2018-05-24 09:45:08 -07:00
<a href="/#/appstore/net.rainloop.cloudronapp">Rainloop</a>, <a href="/#/appstore/nu.sogo.cloudronapp2">SOGo</a>,
<a href="/#/appstore/net.roundcube.cloudronapp">Roundcube</a> are pre-configured to access Cloudron Email. Use <a href="" data-toggle="collapse" data-parent="#accordion" data-target="#mail_settings">these settings</a>
2018-05-24 09:26:41 -07:00
to configure other email clients.
</div>
<div class="col-md-2">
<button ng-class="selectedDomain.mailConfig.enabled ? 'btn btn-danger' : 'btn btn-primary'" ng-click="selectedDomain.provider !== 'caas' && incomingEmail.toggleEmailEnabled()" ng-disabled="selectedDomain.provider === 'caas' || incomingEmail.busy">
<i class="fa fa-circle-notch fa-spin" ng-show="incomingEmail.busy"></i>
{{ selectedDomain.mailConfig.enabled ? "Disable" : "Enable" }}
</button>
2018-05-24 09:26:41 -07:00
</div>
<div class="col-md-12" ng-show="selectedDomain.provider === 'caas'">
<br/>
<span class="text-danger text-bold">This feature is only available for custom domains.</span>
2018-05-23 22:00:48 -07:00
</div>
</div>
2018-05-24 09:26:41 -07:00
<div class="row">
2018-05-23 22:00:48 -07:00
<div class="col-md-12">
<div id="mail_settings" class="panel-collapse collapse">
<br/>
<p><b>Incoming Mail (IMAP)</b><br/>Server: <span ng-click-select>{{config.mailFqdn}}</span><br/>Port: 993 (TLS)</p>
<p><b>Outgoing Mail (SMTP)</b><br/>Server: <span ng-click-select>{{config.mailFqdn}}</span><br/>Port: 587 (STARTTLS)</p>
2018-05-23 23:15:17 -07:00
<p><b>ManageSieve</b><br/>Server: <span ng-click-select>{{config.mailFqdn}}</span><br/>Port: 4190 (STARTTLS)</p>
2018-05-24 09:45:08 -07:00
<p>Use <i>mailboxname</i>@{{ selectedDomain.domain }} and the mailbox owner password to access mailboxes of this domain</p>
2018-05-23 22:00:48 -07:00
</div>
</div>
</div>
2018-04-09 15:08:05 +02:00
<br/>
2018-01-22 13:01:38 -08:00
</div>
<div class="text-left">
2018-05-23 22:00:48 -07:00
<h3 style="margin-bottom: 15px;">Mailboxes
<button class="btn btn-primary btn-outline pull-right" ng-click="mailboxes.add.show()" ng-disabled="!selectedDomain.mailConfig.enabled"
tooltip-enable="!selectedDomain.mailConfig.enabled" uib-tooltip="Email is disabled for this domain">
2018-05-23 22:00:48 -07:00
<i class="fa fa-inbox"></i> New Mailbox
</button>
</h3>
</div>
<div class="card card-large" style="margin-bottom: 15px;">
2018-05-23 22:00:48 -07:00
<div class="row">
<div class="col-md-12">
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>Owner</th>
<th>Aliases</th>
<th class="text-right">Action</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="mailbox in mailboxes.mailboxes">
<td class="hand" ng-click="mailboxes.edit.show(mailbox)">
{{ mailbox.name }}
</td>
<td class="hand" ng-click="mailboxes.edit.show(mailbox)">
2018-12-06 10:28:42 -08:00
{{ mailbox.ownerDisplayName }}
2018-05-23 22:00:48 -07:00
</td>
<td class="hand" ng-click="mailboxes.edit.show(mailbox)">
{{ mailbox.aliases }}
</td>
<td class="text-right no-wrap">
2018-11-15 18:07:18 +01:00
<button class="btn btn-xs btn-default" ng-click="mailboxes.edit.show(mailbox)"><i class="fa fa-pencil-alt"></i></button>
<button class="btn btn-xs btn-danger" ng-click="mailboxes.remove.show(mailbox)"><i class="far fa-trash-alt"></i></button>
2018-05-23 22:00:48 -07:00
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
2018-01-22 13:01:38 -08:00
<div class="text-left">
2018-05-23 22:00:48 -07:00
<h3 style="margin-bottom: 15px;">Mailing Lists
<button class="btn btn-primary btn-outline pull-right" ng-click="mailinglists.add.show()" ng-disabled="!selectedDomain.mailConfig.enabled"
tooltip-enable="!selectedDomain.mailConfig.enabled" uib-tooltip="Email is disabled for this domain">
2018-05-23 22:00:48 -07:00
<i class="fa fa-list"></i> New Mailing list
</button>
</h3>
</div>
2018-01-22 13:01:38 -08:00
<div class="card card-large" style="margin-bottom: 15px;">
2018-05-23 22:00:48 -07:00
<div class="row">
<div class="col-md-12">
A Mailing list forwards all emails to it's members.
<br/>
<br/>
<table class="table table-hover">
<thead>
<tr>
<th>Name</th>
<th>List Members</th>
<th class="text-right">Action</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="list in mailinglists.mailinglists">
<td class="hand" ng-click="mailinglists.edit.show(list)">
{{ list.name }}
</td>
<td class="hand" ng-click="mailinglists.edit.show(list)">
{{ list.members.join(', ') }}
</td>
<td class="text-right no-wrap">
2018-11-15 18:07:18 +01:00
<button class="btn btn-xs btn-default" ng-click="mailinglists.edit.show(list)"><i class="fa fa-pencil-alt"></i></button>
<button class="btn btn-xs btn-danger" ng-click="mailinglists.remove.show(list)"><i class="far fa-trash-alt"></i></button>
2018-05-23 22:00:48 -07:00
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
2018-04-09 15:08:05 +02:00
<div class="text-left">
2018-05-23 22:00:48 -07:00
<h3>Catch-all</h3>
2018-01-22 13:01:38 -08:00
</div>
2018-04-09 15:08:05 +02:00
<div class="card card-large" style="margin-bottom: 15px;">
2018-05-23 22:00:48 -07:00
<div class="row">
<div class="col-md-12">
Emails sent to non existing addresses will be forwarded to the following mailboxes:
2018-04-09 15:08:05 +02:00
</div>
2018-05-23 22:00:48 -07:00
</div>
<br/>
<div class="row">
<div class="col-md-6">
<multiselect ng-model="catchall.mailboxes" options="mailbox.name for mailbox in mailboxes.mailboxes" data-compare-by="name" data-multiple="true"></multiselect>
<button class="btn btn-outline btn-primary" ng-click="catchall.submit()" ng-disabled="catchall.busy || !selectedDomain.mailConfig.enabled"
tooltip-enable="!selectedDomain.mailConfig.enabled" uib-tooltip="Email is disabled for this domain">
<i class="fa fa-circle-notch fa-spin" ng-show="catchall.busy"></i> Save
</button>
2018-04-09 15:08:05 +02:00
</div>
2018-05-23 22:00:48 -07:00
</div>
</div>
</uib-tab>
2018-01-22 13:01:38 -08:00
2018-05-23 22:00:48 -07:00
<uib-tab index="1" heading="Outbound Relay">
<div class="card card-large" style="margin-bottom: 15px;">
<div class="row">
<div class="col-md-12">
2019-01-08 14:53:23 -08:00
Select the mail server (Smart host) through which Cloudron will send outbound mails:
2018-01-22 13:01:38 -08:00
</div>
2018-04-09 15:08:05 +02:00
</div>
2018-01-22 13:01:38 -08:00
2018-05-23 22:00:48 -07:00
<br/>
<div class="row">
<div class="col-md-12">
<div class="form-group">
<select class="form-control" style="width: 50%;" ng-model="mailRelay.preset" ng-options="a.name for a in mailRelayPresets track by a.provider" ng-change="mailRelay.presetChanged()"></select>
</div>
2018-01-22 13:01:38 -08:00
</div>
2018-04-09 15:08:05 +02:00
</div>
2018-01-22 13:01:38 -08:00
2018-05-23 22:00:48 -07:00
<div class="row" ng-show="mailRelay.preset.provider !== 'cloudron-smtp'">
<div class="col-md-6">
<div>
<form name="mailRelayForm" role="form" ng-submit="mailRelay.submit()" autocomplete="off" novalidate>
<div class="form-group" ng-class="{ 'has-error': (mailRelayForm.host.$dirty && mailRelayForm.host.$invalid) }">
<label class="control-label">SMTP Host</label>
<div class="control-label" ng-show="(!mailRelayForm.host.$dirty && mailRelay.error.host) || (mailRelayForm.host.$dirty && mailRelayForm.host.$invalid)">
<small ng-show="!mailRelayForm.host.$dirty && mailRelay.error.host">{{ mailRelay.error.host }}</small>
</div>
<input type="text" class="form-control" ng-model="mailRelay.relay.host" name="host" required>
</div>
<div class="form-group" ng-class="{ 'has-error': (mailRelayForm.port.$dirty && mailRelayForm.port.$invalid) }">
<label class="control-label">SMTP Port (STARTTLS)</label>
<div class="control-label" ng-show="(!mailRelayForm.port.$dirty && mailRelay.error.port) || (mailRelayForm.port.$dirty && mailRelayForm.port.$invalid)">
<small ng-show="!mailRelayForm.port.$dirty && mailRelay.error.port">{{ mailRelay.error.port }}</small>
</div>
<input type="number" class="form-control" ng-model="mailRelay.relay.port" name="port" required>
</div>
<!-- Postmark and Sendgrid -->
<div ng-show="isProvider('postmark-smtp') || isProvider('sendgrid-smtp')" class="form-group" ng-class="{ 'has-error': (mailRelayForm.serverApiToken.$dirty && mailRelayForm.serverApiToken.$invalid) }">
<label class="control-label">API Token/Key</label>
<div class="control-label" ng-show="(!mailRelayForm.serverApiToken.$dirty && mailRelay.error.serverApiToken) || (mailRelayForm.serverApiToken.$dirty && mailRelayForm.serverApiToken.$invalid)">
<small ng-show="!mailRelayForm.serverApiToken.$dirty && mailRelay.error.serverApiToken">{{ mailRelay.error.serverApiToken }}</small>
</div>
<input type="text" class="form-control" ng-model="mailRelay.relay.serverApiToken" name="serverApiToken" ng-required="isProvider('postmark-smtp') || isProvider('sendgrid-smtp')">
</div>
<!-- Other -->
<div ng-show="!isProvider('postmark-smtp') && !isProvider('sendgrid-smtp')" class="form-group" ng-class="{ 'has-error': (mailRelayForm.username.$dirty && mailRelayForm.username.$invalid) }">
<label class="control-label">Username</label>
<div class="control-label" ng-show="(!mailRelayForm.username.$dirty && mailRelay.error.username) || (mailRelayForm.username.$dirty && mailRelayForm.username.$invalid)">
<small ng-show="!mailRelayForm.username.$dirty && mailRelay.error.username">{{ mailRelay.error.username }}</small>
</div>
<input type="text" class="form-control" ng-model="mailRelay.relay.username" name="username" ng-required="!isProvider('postmark-smtp') && !isProvider('sendgrid-smtp')">
</div>
<div ng-show="!isProvider('postmark-smtp') && !isProvider('sendgrid-smtp')" class="form-group" ng-class="{ 'has-error': (mailRelayForm.password.$dirty && mailRelayForm.password.$invalid) }">
<label class="control-label">Password</label>
<div class="control-label" ng-show="(!mailRelayForm.password.$dirty && mailRelay.error.password) || (mailRelayForm.password.$dirty && mailRelayForm.password.$invalid)">
<small ng-show="!mailRelayForm.password.$dirty && mailRelay.error.password">{{ mailRelay.error.password }}</small>
</div>
<input type="password" class="form-control" ng-model="mailRelay.relay.password" name="password" ng-required="!isProvider('postmark-smtp') && !isProvider('sendgrid-smtp')">
</div>
<input class="ng-hide" type="submit" ng-disabled="mailRelayForm.$invalid"/>
</form>
</div>
2018-01-22 13:01:38 -08:00
</div>
2018-04-09 15:08:05 +02:00
</div>
2018-01-22 13:01:38 -08:00
2018-05-23 22:00:48 -07:00
<div class="row">
<div class="col-md-12">
<button class="btn btn-primary" ng-click="mailRelay.submit()" ng-disabled="(mailRelay.preset.provider !== 'cloudron-smtp' && (!mailRelayForm.$dirty || mailRelayForm.$invalid)) || mailRelay.busy"><i class="fa fa-circle-notch fa-spin" ng-show="mailRelay.busy"></i> Save</button>
2018-01-22 13:01:38 -08:00
2018-05-23 22:00:48 -07:00
<span class="has-error text-center" ng-show="mailRelay.error">{{ mailRelay.error }}</span>
<span class="text-success text-center text-bold" ng-show="mailRelay.success">Saved</span>
</div>
</div>
</div>
</uib-tab>
<uib-tab index="2" heading="Settings">
<div class="card card-large" style="margin-bottom: 15px;">
<h4>Enable Masquerading</h4>
<div class="row">
<div class="col-md-10">
Masquerading allows users and apps to send emails with an arbitrary username in the FROM address
</div>
<div class="col-md-2">
<button ng-class="selectedDomain.mailConfig.mailFromValidation ? 'btn btn-danger' : 'btn btn-primary'" ng-click="toggleMailFromValidation()">{{ selectedDomain.mailConfig.mailFromValidation ? "Enable" : "Disable" }}</button>
</div>
</div>
</div>
</uib-tab>
<uib-tab index="3" heading="Status" ng-if="selectedDomain.provider !== 'caas'">
<div class="card card-large" style="margin-bottom: 15px;" ng-show="selectedDomain.mailConfig.relay.provider === 'cloudron-smtp'">
2018-05-23 22:00:48 -07:00
<div class="row">
<div class="col-md-12">
2019-02-10 21:04:42 -08:00
<h4>DNS Status <sup><a href="https://cloudron.io/documentation/troubleshooting/#mail-dns" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></h4>
2018-06-07 10:48:18 -07:00
Set the following DNS records for <b><tt>{{ selectedDomain.domain }}</tt></b> to guarantee email delivery:
2018-05-23 22:00:48 -07:00
<br/><br/>
<div ng-repeat="record in expectedDnsRecordsTypes">
<div class="row" ng-if="expectedDnsRecords[record.value] && (selectedDomain.mailConfig.enabled || (record.name !== 'DMARC' && record.name !== 'MX'))">
<div class="col-xs-12">
<p class="text-muted">
<i ng-hide="refreshBusy" ng-class="expectedDnsRecords[record.value].status ? 'fa fa-check-circle text-success' : 'fa fa-exclamation-triangle text-danger'"></i> &nbsp;
<a href="" data-toggle="collapse" data-parent="#accordion" data-target="#collapse_dns_{{ record.value }}">{{ record.name }} record</a>
2018-11-15 18:07:18 +01:00
<button class="btn btn-xs btn-default" ng-click="refreshStatus()" ng-disabled="refreshBusy" ng-show="!expectedDnsRecords[record.value].status"><i class="fa fa-sync-alt" ng-class="{ 'fa-pulse': refreshBusy }"></i></button>
2018-05-23 22:00:48 -07:00
</p>
<div id="collapse_dns_{{ record.value }}" class="panel-collapse collapse">
<div class="panel-body">
2019-01-25 10:15:17 -08:00
<p ng-show="record.name === 'MX' && selectedDomain.provider === 'namecheap'"><a href="https://cloudron.io/documentation/domains/#namecheap-dns" target="_blank" class="btn btn-xs btn-danger">Namecheap requires manual steps for MX records</a></p>
<p ng-show="expectedDnsRecords[record.value].name">Hostname: <b ng-click-select><tt>{{ expectedDnsRecords[record.value].name }}</tt></b></p>
<p ng-hide="expectedDnsRecords[record.value].name">Domain: <b ng-click-select><tt>{{ expectedDnsRecords[record.value].domain }}</tt></b></p>
2018-05-23 22:00:48 -07:00
<p>Record type: <b ng-click-select><tt>{{ expectedDnsRecords[record.value].type }}</tt></b></p>
<p style="overflow: auto; white-space: nowrap;">Expected value: <b ng-click-select><tt>{{ expectedDnsRecords[record.value].expected }}</tt></b></p>
<p style="overflow: auto; white-space: nowrap;">Current value: <b ng-click-select><tt>{{ expectedDnsRecords[record.value].value ? expectedDnsRecords[record.value].value : '[not set]' }}</tt></b></p>
</div>
</div>
</div>
2018-01-22 13:01:38 -08:00
</div>
</div>
</div>
</div>
</div>
2018-06-07 10:48:18 -07:00
<br/>
2018-01-22 13:01:38 -08:00
<div class="card card-large" style="margin-bottom: 15px;">
2018-05-23 22:00:48 -07:00
<div class="row">
<div class="col-md-12">
2019-02-10 21:04:42 -08:00
<h4>SMTP Status <sup><a href="https://cloudron.io/documentation/troubleshooting/#mail-smtp" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></h4>
2018-05-23 22:00:48 -07:00
<div class="row">
<div class="col-xs-12">
<p class="text-muted">
<i ng-hide="refreshBusy" ng-class="selectedDomain.mailStatus.relay.status ? 'fa fa-check-circle text-success' : 'fa fa-exclamation-triangle text-danger'"></i> &nbsp;
<a href="" data-toggle="collapse" data-parent="#accordion" data-target="#collapse_outbound_smtp">
{{ selectedDomain.mailConfig.relay.provider === 'cloudron-smtp' ? 'Outbound SMTP (Direct)' : 'Outbound SMTP (Relay)' }}
</a>
2018-11-15 18:07:18 +01:00
<button class="btn btn-xs btn-default" ng-click="refreshStatus()" ng-disabled="refreshBusy" ng-show="!selectedDomain.mailStatus.relay.status"><i class="fa fa-sync-alt" ng-class="{ 'fa-pulse': refreshBusy }"></i></button>
2018-05-23 22:00:48 -07:00
</p>
<div id="collapse_outbound_smtp" class="panel-collapse collapse">
<div class="panel-body">
<p><b> {{ selectedDomain.mailStatus.relay.value }} </b> </p>
</div>
</div>
</div>
2018-01-22 13:01:38 -08:00
</div>
2018-05-23 22:00:48 -07:00
<div class="row" ng-show="selectedDomain.mailConfig.relay.provider === 'cloudron-smtp'">
<div class="col-xs-12">
<p class="text-muted">
<i ng-hide="refreshBusy" ng-class="selectedDomain.mailStatus.rbl.status ? 'fa fa-check-circle text-success' : 'fa fa-exclamation-triangle text-danger'"></i> &nbsp;
<a href="" data-toggle="collapse" data-parent="#accordion" data-target="#collapse_rbl">
IP Address Blacklist Check
</a>
2018-11-15 18:07:18 +01:00
<button class="btn btn-xs btn-default" ng-click="refreshStatus()" ng-disabled="refreshBusy" ng-show="!selectedDomain.mailStatus.rbl.status"><i class="fa fa-sync-alt" ng-class="{ 'fa-pulse': refreshBusy }"></i></button>
2018-05-23 22:00:48 -07:00
</p>
<div id="collapse_rbl" class="panel-collapse collapse">
<div class="panel-body">
<div>This server's IP {{ selectedDomain.mailStatus.rbl.ip }} is <b ng-hide="selectedDomain.mailStatus.rbl.servers.length">not</b> blacklisted.</div>
<div ng-repeat="server in selectedDomain.mailStatus.rbl.servers">
<a ng-href="{{server.site}}" target="_blank">{{ server.name }}</a>
</div>
</div>
</div>
2018-04-09 15:08:05 +02:00
</div>
2018-01-22 13:01:38 -08:00
</div>
2018-05-23 22:00:48 -07:00
<div class="row">
<div class="col-xs-12">
<button class="btn btn-primary pull-left" ng-click="testEmail.show()">Send Test Email</button>
</div>
</div>
</div>
2018-01-22 13:01:38 -08:00
</div>
</div>
2018-06-07 10:48:18 -07:00
<br/>
<div class="card card-large" style="margin-bottom: 15px;">
2018-06-07 10:48:18 -07:00
<div class="row">
<div class="col-md-12">
<h4>Email Server Logs</h4>
<p>
Logs are for all email domains on this Cloudron.
</p>
<a class="btn btn-primary" href="/logs.html?id=mail" target="_blank">Show Logs</a>
2018-06-07 10:48:18 -07:00
</div>
</div>
</div>
2018-05-23 22:00:48 -07:00
</uib-tab>
</uib-tabset>
2018-01-22 13:01:38 -08:00
</div>