Re: [Postfixadmin-devel] Invalid domain name , fails regexp check
Brought to you by:
christian_boltz,
gingerdog
From: Gabriel F. <ga...@le...> - 2014-06-03 19:20:29
|
Hey there, On 02/06/14 10:42 AM, Per Qvindesland wrote: > Does anyone know how to disable the regexp check? I am trying to add or > change anything in PFA but to no avail, I can add in domains but the > second i try to add in a mail account I get stopped with this error, > what is the regex check for? > > Centos 6.5 X64 Postfix 2.6.6 dovecot 2.0.9 latest PFA judging from the code: 200 function check_domain ($domain) { 201 if (!preg_match ('/^([-0-9A-Z]+\.)+' . '([0-9A-Z]){2,13}$/i', ($domain))) { 202 return sprintf(Config::lang('pInvalidDomainRegex'), htmlentities($domain)); 203 } the error refers to the domain not being seen as valid according to the above regexp so a number of groups that consist of numbers, dashes, letters and ending with a dot -- if I'm not mistaken, the i at the end of the regexp means that it's case insensitive, so the A-Z block means capital and lower case letters. then followed by a group of numbers and/or letters that should be 2 to 13 letters long (so the TLD). so because of the above check, you can't for example create a domain like "localhost". -- Gabriel Filion |