Solved

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

Posted on 2014-09-23
3
910 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
  • 2
3 Comments
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
Comment Utility
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
Comment Utility
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 108

Expert Comment

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

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Easy CSR creation in Exchange 2007,2010 and 2013
These days socially coordinated efforts have turned into a critical requirement for enterprises.
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…
To show how to create a transport rule 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 >> Rules tab.:  To cr…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now