Solved

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

Posted on 2014-09-23
3
949 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
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 108

Expert Comment

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

Featured Post

Being driven mad by email signature updates?

Having to make a change to your users’ email signatures, yet again? Feel like your head is going to explode? Rely on an Exclaimer email signature management solution to make the process simple!

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

920 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

14 Experts available now in Live!

Get 1:1 Help Now