Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2014-09-23
3
Medium Priority
?
1,250 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 111

Accepted Solution

by:
Ray Paseur earned 2000 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 111

Expert Comment

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Steps to fix “Unable to mount database. (hr=0x80004005, ec=1108)”.
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Suggested Courses

886 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