Only starttls is supported by haraka

In addition, auth_type has to be set to PLAIN (or LOGIN)
This commit is contained in:
Girish Ramakrishnan
2017-06-29 19:44:17 -05:00
parent c07df68558
commit 1c40e51999
4 changed files with 5 additions and 18 deletions

View File

@@ -94,18 +94,12 @@
<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</label>
<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>
<!-- this is always hidden for now, since TLS is required -->
<div class="checkbox" ng-hide=true>
<label>
<input type="checkbox" ng-model="mailRelay.relay.tls"> Use TLS
</label>
</div>
<div 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)">

View File

@@ -105,7 +105,8 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
$scope.mailRelay.relay.provider = $scope.mailRelay.preset.provider;
$scope.mailRelay.relay.host = $scope.mailRelay.preset.host;
$scope.mailRelay.relay.port = $scope.mailRelay.preset.port;
$scope.mailRelay.relay.tls = $scope.mailRelay.preset.tls;
$scope.mailRelay.relay.username = '';
$scope.mailRelay.relay.password = '';
},
// form data to be set on load
@@ -114,19 +115,13 @@ angular.module('Application').controller('EmailController', ['$scope', '$locatio
host: '',
port: 25,
username: '',
password: '',
tls: true // whether we should connect with TLS. STARTTLS is always supported
password: ''
},
submit: function () {
$scope.mailRelay.error = null;
$scope.mailRelay.busy = true;
if ($scope.mailRelay.relay.provider === 'external-smtp') {
// this is generally the case
$scope.mailRelay.relay.tls = $scope.mailRelay.relay.port === 465;
}
Client.setMailRelay($scope.mailRelay.relay, function (error) {
if (error) {
$scope.mailRelay.error = error.message;