251 lines
11 KiB
Handlebars
251 lines
11 KiB
Handlebars
<ol class="breadcrumb">
|
|
<li><a href="/">Home</a></li>
|
|
<li class="active">Settings</li>
|
|
</ol>
|
|
|
|
<h2>Settings</h2>
|
|
|
|
<hr>
|
|
|
|
<form method="post" id="smtp-verify" action="/settings/smtp-verify">
|
|
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
|
</form>
|
|
|
|
<form class="form-horizontal" method="post" action="/settings/update">
|
|
|
|
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
|
|
|
<fieldset>
|
|
<legend>
|
|
General Settings
|
|
</legend>
|
|
|
|
<div class="form-group">
|
|
<label for="service-url" class="col-sm-2 control-label">Service Address (URL)</label>
|
|
<div class="col-sm-10">
|
|
<input type="url" class="form-control" name="service-url" id="service-url" placeholder="http://example.com/" value="{{serviceUrl}}" required>
|
|
<span class="help-block">Enter the URL this service can be reached from</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="admin-email" class="col-sm-2 control-label">Admin Email</label>
|
|
<div class="col-sm-10">
|
|
<input type="email" class="form-control" name="admin-email" id="admin-email" placeholder="admin@example.com" value="{{adminEmail}}" required>
|
|
<span class="help-block">Enter the email address that will be used as "from" for system messages</span>
|
|
</div>
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>
|
|
Campaign defaults
|
|
</legend>
|
|
|
|
<div class="form-group">
|
|
<label for="default-sender" class="col-sm-2 control-label">Sender name</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" name="default-sender" id="default-sender" value="{{defaultSender}}" placeholder="Sender name, eg. "My Awesome Company Ltd."">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="default-postaddress" class="col-sm-2 control-label">Default address</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" name="default-postaddress" id="default-postaddress" value="{{defaultPostaddress}}" placeholder="Contact address to provide, eg. "1234 Main Street, Anywhere, MA 01234, USA"">
|
|
</div>
|
|
</div>
|
|
|
|
<hr />
|
|
|
|
<div class="form-group">
|
|
<label for="default-from" class="col-sm-2 control-label">Default "from name"</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" name="default-from" id="default-from" value="{{defaultFrom}}" placeholder="This is the name your emails will come from" required>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="default-address" class="col-sm-2 control-label">Default "from" email</label>
|
|
<div class="col-sm-10">
|
|
<input type="email" class="form-control" name="default-address" id="default-address" value="{{defaultAddress}}" placeholder="This is the address people will send replies to" required>
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="default-subject" class="col-sm-2 control-label">Default "subject line"</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" name="default-subject" id="default-subject" value="{{defaultSubject}}" placeholder="Keep it relevant and non-spammy">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="default-homepage" class="col-sm-2 control-label">Default homepage (URL)</label>
|
|
<div class="col-sm-10">
|
|
<input type="url" class="form-control" name="default-homepage" id="default-homepage" value="{{defaultHomepage}}" placeholder="URL to redirect the subscribed users to, eg. http://example.com/">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>
|
|
SMTP Settings
|
|
</legend>
|
|
|
|
<p class="text-info">These settings are required to send out e-mail messages</p>
|
|
|
|
<div class="form-group">
|
|
<label for="smtp-hostname" class="col-sm-2 control-label">Hostname</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" name="smtp-hostname" id="smtp-hostname" placeholder="Hostname, eg. smtp.example.com" value="{{smtpHostname}}" required>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="smtp-port" class="col-sm-2 control-label">Port</label>
|
|
<div class="col-sm-10">
|
|
<input type="number" class="form-control" name="smtp-port" id="smtp-port" placeholder="Port, eg. 465. Autodetected if left blank" value="{{smtpPort}}">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="smtp-encryption" class="col-sm-2 control-label">Encryption</label>
|
|
<div class="col-sm-10">
|
|
<select class="form-control" id="smtp-encryption" name="smtp-encryption">
|
|
{{#each smtpEncryption}}
|
|
<option value="{{key}}" {{#if checked}} selected {{/if}}>
|
|
{{value}}
|
|
{{#if description}} <span class="text-muted"> — {{description}}</span>{{/if}}
|
|
</option>
|
|
{{/each}}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-2 col-xs-4">
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" name="smtp-disable-auth" {{#if smtpDisableAuth}} checked {{/if}}> Disable SMTP authentication
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="smtp-user" class="col-sm-2 control-label">Username</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" name="smtp-user" id="smtp-port" placeholder="Username, eg. myaccount@example.com" value="{{smtpUser}}" required>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="smtp-pass" class="col-sm-2 control-label">Password</label>
|
|
<div class="col-sm-10">
|
|
<input type="password" class="form-control" name="smtp-pass" id="smtp-pass" placeholder="Password" value="{{smtpPass}}" required>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="pull-right">
|
|
<button type="submit" form="smtp-verify" class="btn btn-info"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> Check SMTP config</button>
|
|
</div>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>
|
|
Advanced SMTP settings
|
|
</legend>
|
|
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-2 col-xs-4">
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" name="smtp-self-signed" {{#if smtpSelfSigned}} checked {{/if}}> Allow self-signed certificates
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="smtp-max-connections" class="col-sm-2 control-label">Max connections</label>
|
|
<div class="col-sm-4">
|
|
<input type="number" class="form-control" name="smtp-max-connections" id="smtp-port" placeholder="The count of max connections, eg. 10" value="{{smtpMaxConnections}}">
|
|
<span class="help-block">The count of maximum simultaneous connections to make against the SMTP server (defaults to 5)</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="smtp-max-messages" class="col-sm-2 control-label">Max messages</label>
|
|
<div class="col-sm-4">
|
|
<input type="number" class="form-control" name="smtp-max-messages" id="smtp-port" placeholder="The count of max messages, eg. 100" value="{{smtpMaxMessages}}">
|
|
<span class="help-block">The count of messages to send through a single connection before the connection is recreated (defaults to 100)</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-2 col-xs-4">
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" name="smtp-log" {{#if smtpLog}} checked {{/if}}> Log SMTP transactions
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</fieldset>
|
|
|
|
<fieldset>
|
|
<legend>
|
|
VERP bounce handling
|
|
</legend>
|
|
|
|
<p class="text-info">
|
|
Mailtrain is able to use <a href="https://en.wikipedia.org/wiki/Variable_envelope_return_path">VERP</a> based routing to detect bounces. In this case the message is sent to the recipient using a custom VERP address as the return path of the
|
|
message. If the message is not accepted a bounce email is sent to this special VERP address and thus a bounce is detected.
|
|
</p>
|
|
|
|
<p class="text-info">
|
|
To get VERP working you need to set up a DNS MX record that points to your Mailtrain hostname. You must also ensure that Mailtrain VERP interface is available from port 25 of your server (port 25 usually requires root user privileges). This way if anyone tries to send email to <code>someuser@{{verpHostname}}</code> then the email should end up to this server.
|
|
</p>
|
|
|
|
<p class="text-warning">
|
|
VERP usually only works if you are using your own SMTP server. Regural relay services (SES, SparkPost, Gmail etc.) tend to remove the VERP address from the message.
|
|
</p>
|
|
|
|
{{#if verpEnabled}}
|
|
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-2 col-xs-4">
|
|
<div class="checkbox">
|
|
<label>
|
|
<input type="checkbox" name="verp-use" {{#if verpUse}} checked {{/if}}> Use VERP to catch bounces
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="verp-hostname" class="col-sm-2 control-label">Server hostname</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control" name="verp-hostname" id="verp-hostname" placeholder="The VERP server hostname, eg. bounces.example.com" value="{{verpHostname}}">
|
|
<span class="help-block">VERP bounce handling server hostname. This hostname is used in the SMTP envelope FROM address and the MX DNS records should point to this server</span>
|
|
</div>
|
|
</div>
|
|
|
|
{{else}}
|
|
<div class="form-group">
|
|
<div class="col-sm-10">
|
|
<p class="form-control-static">VERP bounce handling server is not enabled. Modify your server configuration file and restart server to enable it</p>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
</fieldset>
|
|
|
|
<hr />
|
|
|
|
<div class="form-group">
|
|
<div class="col-sm-offset-2 col-sm-10">
|
|
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> Update</button>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|