Skip to content

Commit

Permalink
Mantis 0000595: SMTP relayhost should be encapsulated in square brack…
Browse files Browse the repository at this point in the history
…ets.

Signed-off-by: Volker Theile <votdev@gmx.de>
  • Loading branch information
votdev committed Dec 4, 2017
1 parent ac6824b commit f0bb38e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deb/openmediavault/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openmediavault (4.0.15-1) stable; urgency=low

*
* Mantis 0000595: SMTP relayhost should be encapsulated in square brackets.

-- Volker Theile <volker.theile@openmediavault.org> Sat, 02 Dec 2017 13:54:19 +0100

Expand Down
13 changes: 13 additions & 0 deletions deb/openmediavault/var/www/openmediavault/js/ext-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,19 @@ Ext.apply(Ext.form.field.VTypes, {
domainnameIPListText: _("This field should be a list of domain names or IP addresses"),
domainnameIPListMask: /[a-z0-9:\-\.,;]/i,

smtpserver: function(v) {
if (!Ext.isString(v))
return false;
v = v.replace(/[\[\]]/g, "");
if (Ext.form.field.VTypes.domainname(v))
return true;
if (Ext.form.field.VTypes.IP(v))
return true;
return false;
},
smtpserverText: _("This field should be a domain name or an IP address"),
smtpserverMask: /[a-z0-9:\[\]\-\.]/i,

groupname: function(v) {
return /^[a-zA-Z0-9\-\.]+$/.test(v);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ Ext.define("OMV.module.admin.system.notification.Settings", {
name: "server",
fieldLabel: _("SMTP server"),
allowBlank: true,
vtype: "domainnameIP",
vtype: "smtpserver",
plugins: [{
ptype: "fieldinfo",
text: _("Outgoing SMTP mail server address, e.g. smtp.mycorp.com.")
Expand Down

0 comments on commit f0bb38e

Please sign in to comment.