348 lines
18 KiB
HTML
348 lines
18 KiB
HTML
<!-- Modal change mail server domain -->
|
|
<div class="modal fade" id="mailLocationModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">Change Email Server Location</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div>Cloudron will make the necessary DNS changes across all the domains and restart the mail server.
|
|
Desktop & Mobile email clients have to be re-configured to use this new location as the IMAP and SMTP server.
|
|
</div>
|
|
<br>
|
|
|
|
<form name="mailLocationForm" role="form" novalidate ng-submit="mailLocation.submit()" autocomplete="off">
|
|
<div class="form-group" ng-class="{ 'has-error': (mailLocationForm.subdomain.$dirty && mailLocationForm.subdomain.$invalid) || (!mailLocationForm.subdomain.$dirty && mailLocation.error)}">
|
|
<label class="control-label">Location</label>
|
|
|
|
<div class="has-error" ng-show="mailLocation.error">{{ mailLocation.error.message }}</div>
|
|
|
|
<div class="input-group form-inline">
|
|
<input type="text" class="form-control" ng-model="mailLocation.subdomain" id="mailLocationLocationInput" name="location" placeholder="{{ 'Leave empty to use bare domain' }}" autofocus>
|
|
|
|
<div class="input-group-btn">
|
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
|
<span>{{ (!mailLocation.subdomain ? '' : '.') + mailLocation.domain.domain }}</span>
|
|
<span class="caret"></span>
|
|
</button>
|
|
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
|
<li ng-repeat="domain in domains">
|
|
<a href="" ng-click="mailLocation.domain = domain">{{ domain.domain }}</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<p class="small text-center text-warning" ng-show="mailLocation.domain.provider === 'linode'">
|
|
<b>Linode DNS average <a target="_blank" ng-href="https://docs.cloudron.io/domains/#linode-dns">propagation time</a> is 30 minutes.
|
|
Changing the location will take a while.</b>
|
|
<br>
|
|
</p>
|
|
|
|
<p class="text-center" ng-show="mailLocation.domain.provider === 'manual'">
|
|
<b>Add an A record manually for {{ (!mailLocation.subdomain ? '' : '.') + mailLocation.domain.domain }} to this Cloudron's public IP</b>
|
|
<br>
|
|
</p>
|
|
|
|
<input class="ng-hide" type="submit" ng-disabled="mailLocationForm.$invalid"/>
|
|
</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="mailLocation.submit()" ng-disabled="mailLocationForm.$invalid || mailLocation.busy"><i class="fa fa-circle-notch fa-spin" ng-show="mailLocation.busy"></i> Change</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal change max email size -->
|
|
<div class="modal fade" id="maxEmailSizeChangeModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">Change Maximum Email Size</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div>Changing the maximum email message size requires a restart of the mail server.</div>
|
|
<br>
|
|
<form name="maxEmailSizeChangeForm" role="form" novalidate ng-submit="maxEmailSize.submit()" autocomplete="off">
|
|
<div class="form-group">
|
|
<label class="control-label">Maximum size in megabytes : <b>{{ maxEmailSize.size | prettyDiskSize }}</b></label>
|
|
<slider ng-model="maxEmailSize.size" tooltip="hide" min="1048576" max="1073741824" step="1048576"></slider>
|
|
</div>
|
|
<input class="ng-hide" type="submit"/>
|
|
</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="maxEmailSize.submit()" ng-disabled="maxEmailSize.size === maxEmailSize.currentSize"><i class="fa fa-circle-notch fa-spin" ng-show="maxEmailSize.busy"></i> Change</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal change spam config -->
|
|
<div class="modal fade" id="spamConfigChangeModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">Spam Filtering</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form name="spamConfigChangeForm" role="form" novalidate ng-submit="spamConfig.submit()" autocomplete="off">
|
|
<div class="form-group">
|
|
<label class="control-label">Blacklisted addresses</label>
|
|
<p class="small">Matched addresses will end up in the user's Spam folder. '*' and '?' glob patterns are supported.</p>
|
|
<div class="has-error" ng-show="spamConfig.error.blacklist">{{ spamConfig.error.blacklist }}</div>
|
|
<textarea ng-model="spamConfig.blacklist" placeholder="Line separated email address patterns" name="blacklist" class="form-control" ng-class="{ 'has-error': !spamConfigChangeForm.blacklist.$dirty && spamConfig.error.blacklist }" rows="4"></textarea>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="control-label">Custom Spamassassin Rules <sup><a ng-href="https://docs.cloudron.io/email/#custom-spam-filtering-rules" class="help" target="_blank"><i class="fa fa-question-circle"></i></a></sup></label>
|
|
<div class="has-error" ng-show="spamConfig.error.config">{{ spamConfig.error.config }}</div>
|
|
<textarea ng-model="spamConfig.config" placeholder="Custom Spamassassin Rules" class="form-control" name="config" ng-class="{ 'has-error': !spamConfigChangeForm.config.$dirty && spamConfig.error.config }" rows="4"></textarea>
|
|
</div>
|
|
<input class="ng-hide" type="submit"/>
|
|
</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="spamConfig.submit()"><i class="fa fa-circle-notch fa-spin" ng-show="spamConfig.busy"></i> Save</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Test email -->
|
|
<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 for <b>{{ testEmail.domain.domain }}</b></h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<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 <b>no-reply@{{testEmail.domain.domain}}</b> 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>
|
|
</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>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="text-left">
|
|
<h1>
|
|
Mail Server
|
|
</h1>
|
|
</div>
|
|
|
|
<div class="text-left">
|
|
<h3>Domains</h3>
|
|
</div>
|
|
|
|
<div class="card card-large" style="margin-bottom: 15px;">
|
|
<div class="row ng-hide" ng-hide="ready">
|
|
<div class="col-lg-12 text-center">
|
|
<h2><i class="fa fa-circle-notch fa-spin"></i></h2>
|
|
</div>
|
|
</div>
|
|
<div class="row animateMeOpacity ng-hide" ng-show="ready">
|
|
<div class="col-xs-12">
|
|
<table class="table table-hover" style="margin: 0;">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 5%"></th>
|
|
<th style="width: 30%">Domain</th>
|
|
<th style="width: 60%">Config</th>
|
|
<th style="width: 10%">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="domain in domains">
|
|
<td>
|
|
<i class="fa fa-circle" ng-style="{ color: domain.statusOk ? '#27CE65' : '#d9534f' }" ng-show="domain.status"></i>
|
|
<i class="fa fa-circle-notch fa-spin" ng-hide="domain.status"></i>
|
|
</td>
|
|
<td class="elide-table-cell no-padding">
|
|
<a href="/#/email/{{ domain.domain }}" class="email-domain-list-item">{{ domain.domain }}</a>
|
|
</td>
|
|
<td class="elide-table-cell no-padding">
|
|
<a href="/#/email/{{ domain.domain }}" class="email-domain-list-item">
|
|
<span ng-show="domain.inbound && domain.outbound">
|
|
{{ domain.mailboxCount }} Mailbox(es) / Usage: {{ domain.usage | prettyByteSize }}
|
|
</span>
|
|
<span ng-show="!domain.inbound && domain.outbound">Outbound only</span>
|
|
<span ng-show="!domain.inbound && !domain.outbound">Disabled</span>
|
|
</a>
|
|
</td>
|
|
<td class="text-right no-wrap">
|
|
<button class="btn btn-xs btn-default" ng-click="testEmail.show(domain)" uib-tooltip="Send Test Email"><i class="fa fa-paper-plane"></i></button>
|
|
<a href="/#/email/{{ domain.domain }}" class="btn btn-xs btn-default"><i class="fa fa-pencil-alt"></i></a>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<div class="text-left" ng-show="user.role === 'owner'">
|
|
<h3>Settings</h3>
|
|
</div>
|
|
|
|
<div class="card card-large" style="margin-bottom: 15px;">
|
|
<p>These settings are global and apply to all domains.</p>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-6">
|
|
<span class="text-muted">Mail server location</span>
|
|
</div>
|
|
<div class="col-xs-6 text-right">
|
|
<span>{{ mailLocation.currentLocation.subdomain + (!mailLocation.currentLocation.subdomain ? '' : '.') + mailLocation.currentLocation.domain.domain }}
|
|
<a ng-hide="mailLocation.busy" href="" ng-click="mailLocation.show()"><i class="fa fa-edit text-small"></i></a> <!-- ng-disabled does not work for links -->
|
|
</span>
|
|
</div>
|
|
<div class="col-xs-6">
|
|
<span class="text-muted">Maximum email size</span>
|
|
</div>
|
|
<div class="col-xs-6 text-right">
|
|
<span>{{ maxEmailSize.currentSize | prettyDiskSize }} <a href="" ng-click="maxEmailSize.show()"><i class="fa fa-edit text-small"></i></a></span>
|
|
</div>
|
|
<div class="col-xs-6">
|
|
<span class="text-muted">Spam filtering</span>
|
|
</div>
|
|
<div class="col-xs-6 text-right">
|
|
<span>{{ spamConfig.acl.blacklist.length }} address(es) blacklisted {{ spamConfig.customConfig ? '. Custom rules set.' : '.' }} <a href="" ng-click="spamConfig.show()"><i class="fa fa-edit text-small"></i></a></span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row" ng-show="mailLocation.busy">
|
|
<div class="col-md-12" style="margin-top: 10px;">
|
|
Changing Email domain:
|
|
<div class="progress progress-striped active animateMe">
|
|
<div class="progress-bar progress-bar-success" role="progressbar" style="width: {{ mailLocation.percent }}%"></div>
|
|
</div>
|
|
<p>{{ mailLocation.message }}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<div class="text-left" ng-show="user.role === 'owner'">
|
|
<h3>Event Log</h3>
|
|
</div>
|
|
|
|
<div class="row" ng-show="user.role === 'owner'">
|
|
<div class="col-md-12">
|
|
<div class="maillog-filter">
|
|
<input class="form-control" style="width: 200px;" placeholder="Search" type="text" ng-model="activity.search" ng-model-options="{ debounce: 1000 }" ng-change="activity.updateFilter()" />
|
|
<multiselect ng-model="activity.selectedTypes" ms-header="All Events" options="a.name for a in activityTypes" data-multiple="true" ng-change="activity.updateFilter(true)" filter-after-rows="5" scroll-after-rows="10"></multiselect>
|
|
<select class="form-control" ng-model="activity.pageItems" ng-options="a.name for a in pageItemCount" ng-change="activity.updateFilter(true)"></select>
|
|
</div>
|
|
<div class="pull-right">
|
|
<button class="btn btn-default btn-outline" ng-click="activity.showPrevPage()" ng-disabled="activity.busy || activity.currentPage <= 1"><i class="fa fa-angle-double-left"></i> prev</button>
|
|
<button class="btn btn-default btn-outline" ng-click="activity.showNextPage()" ng-disabled="activity.busy || activity.perPage > activity.eventLogs.length">next <i class="fa fa-angle-double-right"></i></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card card-large" style="margin-top: 10px; margin-bottom: 15px;" ng-show="user.role === 'owner'">
|
|
<div class="row ng-hide" ng-hide="ready">
|
|
<div class="col-lg-12 text-center">
|
|
<h2><i class="fa fa-circle-notch fa-spin"></i></h2>
|
|
</div>
|
|
</div>
|
|
<div class="row animateMeOpacity ng-hide" ng-show="ready">
|
|
<div class="col-xs-12">
|
|
<table class="table table-hover" style="margin: 0;">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 5%"><!-- Icon --></th>
|
|
<th style="width: 20%">Time</th>
|
|
<th style="width: 75%">Details</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody ng-show="activity.busy">
|
|
<tr>
|
|
<td colspan="4" class="text-center">
|
|
<i class="fa fa-circle-notch fa-spin"></i>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
<tbody ng-hide="activity.eventLogs.length || activity.busy">
|
|
<tr>
|
|
<td colspan="4" class="text-center">
|
|
<br>
|
|
<br>
|
|
Event Log is empty.
|
|
<br>
|
|
<br>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
<tbody ng-repeat="eventlog in activity.eventLogs" ng-hide="activity.busy">
|
|
<tr ng-click="activity.showEventLogDetails(eventlog)" class="hand">
|
|
<td class="no-wrap">
|
|
<i class="fas fa-arrow-circle-left" ng-show="eventlog.type === 'delivered'" uib-tooltip="Outgoing"></i>
|
|
<i class="fas fa-history" ng-show="eventlog.type === 'deferred'" uib-tooltip="Deferred"></i>
|
|
<i class="fas fa-arrow-circle-right" ng-show="eventlog.type === 'received'" uib-tooltip="Incoming"></i>
|
|
<i class="fas fa-align-justify" ng-show="eventlog.type === 'queued'" uib-tooltip="Queued"></i>
|
|
<i class="fas fa-minus-circle" ng-show="eventlog.type === 'denied'" uib-tooltip="Denied"></i>
|
|
<i class="fas fa-hand-paper" ng-show="eventlog.type === 'bounce'" uib-tooltip="Bounce"></i>
|
|
<i class="fas fa-filter" ng-show="eventlog.type === 'spam-learn'" uib-tooltip="Spam filter trained"></i> </td>
|
|
<td class="no-wrap"><span uib-tooltip="{{ eventlog.ts | prettyLongDate }}" class="arrow">{{ eventlog.ts | prettyDate }}</span></td>
|
|
<td>
|
|
<span ng-show="eventlog.type === 'bounce'">Sent bounce to {{ eventlog.mailFrom | prettyEmailAddresses }} for mail sent to {{ eventlog.rcptTo | prettyEmailAddresses }}. {{ eventlog.details.message || eventlog.details.reason }}</span>
|
|
<span ng-show="eventlog.type === 'deferred'">Failed to deliver mail to {{ eventlog.rcptTo | prettyEmailAddresses }}. {{ eventlog.details.message || eventlog.details.reason }}. Will retry in {{ eventlog.details.delay }}s.</span>
|
|
<span ng-show="eventlog.type === 'queued'">
|
|
<span ng-show="eventlog.direction === 'inbound'">
|
|
Incoming mail from {{ eventlog.mailFrom | prettyEmailAddresses }} to {{ eventlog.rcptTo | prettyEmailAddresses }}. Spam: {{ eventlog.details.spamStatus.indexOf('Yes,') === 0 ? 'Yes' : 'No' }}
|
|
</span>
|
|
<span ng-show="eventlog.direction === 'outbound'">
|
|
Queued mail for delivery to {{ eventlog.rcptTo | prettyEmailAddresses }} from {{ eventlog.mailFrom | prettyEmailAddresses }}
|
|
</span>
|
|
</span>
|
|
<span ng-show="eventlog.type === 'received'">Saved mail from {{ eventlog.mailFrom | prettyEmailAddresses }} in mailbox {{ eventlog.rcptTo | prettyEmailAddresses }}</span>
|
|
<span ng-show="eventlog.type === 'delivered'">Delivered mail to {{ eventlog.rcptTo | prettyEmailAddresses }} from {{ eventlog.mailFrom | prettyEmailAddresses }}</span>
|
|
|
|
<span ng-show="eventlog.type === 'denied'">Connection from {{ eventlog.remote.ip }} denied. {{ eventlog.details.message || eventlog.details.reason }}</span>
|
|
<span ng-show="eventlog.type === 'spam-learn'">Spam filter trained using mailbox content</span>
|
|
</td>
|
|
</tr>
|
|
<tr ng-show="activity.activeEventLog === eventlog">
|
|
<td colspan="6">
|
|
<pre class="eventlog-details">{{ eventlog | json }}</pre>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<br/>
|
|
|
|
<a class="btn btn-primary pull-right" href="/logs.html?id=mail" target="_blank">Show Raw Logs</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|