[pmg-devel] [PATCH v2 pmg-gui] Feature #2438 add support for lmtp delivery to downstream servers
Julian Zehnter
pmg-devel at j-z.it
Sun Jan 5 15:53:09 CET 2020
new feature lmtp support for simplifying setups
with lmtp capable downstream servers (e.g. dovecot)
Postfix support lmtp out of the box and can now deliver
mails directly to internal mailbox servers without
one more smtp connection
extending the gui code for new lmtp option:
MailProxyConfiguration & MailProxyConfiguration:Transport:
Adding combobox "smtp" / "lmtp" as a new option
Generalizing some "SMTP" keywords
Signed-off-by: Julian Zehnter <pmg-devel at j-z.it>
---
js/MailProxyRelaying.js | 18 +++++++++++++-----
js/Transport.js | 24 +++++++++++++++++++++---
2 files changed, 34 insertions(+), 8 deletions(-)
diff --git a/js/MailProxyRelaying.js b/js/MailProxyRelaying.js
index 1856130..5403836 100644
--- a/js/MailProxyRelaying.js
+++ b/js/MailProxyRelaying.js
@@ -4,18 +4,26 @@ Ext.define('PMG.MailProxyRelaying', {
alias: ['widget.pmgMailProxyRelaying'],
monStoreErrors: true,
-
+
initComponent : function() {
var me = this;
me.add_text_row('relay', gettext('Default Relay'),
{ deleteEmpty: true, defaultValue: Proxmox.Utils.noneText });
- me.add_integer_row('relayport', gettext('SMTP Port'),
- { defaultValue: 25, deleteEmpty: true,
- minValue: 1, maxValue: 65535 });
+ me.add_integer_row('relayport', gettext('Relay Port'),
+ { defaultValue: 25, deleteEmpty: true,
+ minValue: 1, maxValue: 65535 });
- me.add_boolean_row('relaynomx', gettext('Disable MX lookup'));
+ me.add_combobox_row('relayprotocol', gettext('Relay Protocol'), {
+ defaultValue: 'smtp',
+ comboItems: [
+ ['smtp', 'SMTP' ],
+ ['lmtp', 'LMTP' ]]
+ });
+
+
+ me.add_boolean_row('relaynomx', gettext('Disable MX lookup (SMTP)'));
me.rows.smarthost = {
required: true,
diff --git a/js/Transport.js b/js/Transport.js
index c721da3..2571a4a 100644
--- a/js/Transport.js
+++ b/js/Transport.js
@@ -1,7 +1,7 @@
/*global Proxmox*/
Ext.define('pmg-transport', {
extend: 'Ext.data.Model',
- fields: [ 'domain', 'host', { name: 'port', type: 'integer' },
+ fields: [ 'domain', 'host', 'protocol', { name: 'port', type: 'integer' },
{ name: 'use_mx', type: 'boolean' }, 'comment' ],
proxy: {
type: 'proxmox',
@@ -44,6 +44,18 @@ Ext.define('PMG.Transport', {
name: 'host',
fieldLabel: gettext("Host")
},
+ {
+ xtype: 'proxmoxKVComboBox',
+ name: 'protocol',
+ fieldLabel: gettext('Protocol'),
+ deleteEmpty: false,
+ comboItems: [
+ [ 'smtp', 'SMTP' ],
+ [ 'lmtp', 'LMTP' ]
+ ],
+ allowBlank: true,
+ value: 'smtp'
+ },
{
xtype: 'proxmoxintegerfield',
name: 'port',
@@ -57,7 +69,7 @@ Ext.define('PMG.Transport', {
name: 'use_mx',
checked: true,
uncheckedValue: 0,
- fieldLabel: gettext("Use MX")
+ fieldLabel: gettext("Use MX (SMTP)")
},
{
xtype: 'textfield',
@@ -152,6 +164,12 @@ Ext.define('PMG.Transport', {
sortable: true,
dataIndex: 'host'
},
+ {
+ header: gettext('Protocol'),
+ width: 200,
+ sortable: true,
+ dataIndex: 'protocol'
+ },
{
header: gettext('Port'),
width: 80,
@@ -159,7 +177,7 @@ Ext.define('PMG.Transport', {
dataIndex: 'port'
},
{
- header: gettext('Use MX'),
+ header: gettext('Use MX (SMTP)'),
width: 80,
renderer: Proxmox.Utils.format_boolean,
sortable: false,
--
2.20.1
More information about the pmg-devel
mailing list