Solved

Postfix Admin 2.3.6 says "Invalid domain name xxx.marketing, fails regexp check"

Posted on 2014-09-23
3
1,122 Views
Last Modified: 2014-09-23
When you try to add new domains to Postfix Admin with new domain name extensions such as .marketing,.expert, etc. different than well-known std extensions., it complains about these extensions and does not alow to add the domain. It says "Invalid domain name xxx.marketing, fails regexp check". Does anyone know how to disable or improve this regexp check?
0
Comment
Question by:sbayrak
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 40339106
Version 2.3 was released October 26th 2009 which makes it so old that it's probably obsolete today.  The latest release appears to be 2.91 and it can be downloaded here:
http://sourceforge.net/projects/postfixadmin/files/

My first step would be to upgrade to the latest release, then see if the problem persists. If it is still stuck, then you can use a code scanner to look for the message text and thereby find the origin point of the regexp check.  Once you find that you will be able to change the code to include the new top-level domains.  The current IANA TLD list is curated here:
http://data.iana.org/TLD/tlds-alpha-by-domain.txt

This article shows a general conceptual design of test-driven development, including near the end a script where I have used the IANA TLD list in a regular expression to validate URLs.
http://www.experts-exchange.com/Programming/Languages/Scripting/PHP/A_7830-A-Quick-Tour-of-Test-Driven-Development.html
0
 
LVL 1

Author Comment

by:sbayrak
ID: 40339279
Found the relevant code line inside functions.inc.php and changed the char length 6 to 12 to make it work.

if (!preg_match ('/^([-0-9A-Z]+\.)+' . '([0-9A-Z]){2,6}$/i', ($domain)))

Thanks
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 40339361
Great, thanks for the points and thanks for using E-E, ~Ray
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As cyber crime continues to grow in both numbers and sophistication, a troubling trend of optimization has emerged over the last year.
This article outlines some of the reasons why an email message gets flagged as spam on a recipient's end.
In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question