Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 13th July 2009, 16:19
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,034
Thanks: 265
Thanked 151 Times in 131 Posts
Default Bug?: ERROR 1.Email address is invalid.

Today I wanted to add some new e-mail addresses to one of the domains on ISPconfig3

Some of the e-mail addresses are single letter once (like a@domain.tld, b@domain.tld .... )

Unfortunately ISPconfig3 will give an "ERROR 1.Email address is invalid." when doing so!

Is there maybe a quick fix for this?
Reply With Quote
Sponsored Links
  #2  
Old 14th July 2009, 08:25
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,774
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

You can change the regular expression in the form definition file of the mail_user form.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 14th July 2009, 09:13
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,034
Thanks: 265
Thanked 151 Times in 131 Posts
Default

Quote:
Originally Posted by till View Post
You can change the regular expression in the form definition file of the mail_user form.
Where can I find this mail_user form¿
Reply With Quote
  #4  
Old 14th July 2009, 10:08
vogelor vogelor is offline
ISPConfig Developer
 
Join Date: Jan 2007
Location: Wernau, Germany
Posts: 219
Thanks: 42
Thanked 34 Times in 24 Posts
Default

Quote:
Originally Posted by edge View Post
Where can I find this mail_user form¿
debian:

/usr/local/ispconfig/interface/web/mail/form
__________________
Der neue Luxus heißt Zeit, nicht Geld!

Firma : http://www.muv.com, http://www.computerandservice.de
Privat : http://www.vogelor.de
Reply With Quote
The Following User Says Thank You to vogelor For This Useful Post:
edge (15th July 2009)
  #5  
Old 15th July 2009, 15:58
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,034
Thanks: 265
Thanked 151 Times in 131 Posts
Default

I've had a look at the files in /usr/local/ispconfig/interface/web/mail/form, but I can not find the regular expression that is handeling this.

Any more clues?
Reply With Quote
  #6  
Old 16th July 2009, 10:50
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,774
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

Sorry, the email regex is defined in the global form handling file /usr/local/ispconfig/interface/lib/classes/tform.inc.php

Around line 643 you will find the regular expression for the email address validation:

if(!preg_match("/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z]{2,10}$/i", $field_value)) {
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
edge (20th July 2009)
  #7  
Old 20th July 2009, 10:35
edge edge is offline
Moderator
 
Join Date: Dec 2005
Location: The Netherlands
Posts: 2,034
Thanks: 265
Thanked 151 Times in 131 Posts
Default

I found it, but unfortinatly it did not work for me. I guess I'm doing something wrong.
I've changed the {2,10} part in
PHP Code:
if(!preg_match("/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z]{2,10}$/i"$field_value)) { 
to: {1,10}
PHP Code:
if(!preg_match("/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z]{1,10}$/i"$field_value)) { 
Reply With Quote
  #8  
Old 20th July 2009, 11:49
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,774
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
 
Default

What you changed is the length of the domain suffix. e.g. you would be able to add now things like user@domain.c instead if domain.com. Try this instead:

if(!preg_match("/^\w+[\w.-]*@\w+[\w.-]*\w+\.[a-z]{2,10}$/i", $field_value)) {
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
edge (20th July 2009)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix not responding to telnet CarbonCopy Server Operation 6 8th May 2009 05:39
sending e-mail using mail() function linuxuser1 HOWTO-Related Questions 38 21st April 2009 12:20
Problem installing ISPConfig on Suse10.1 nliebherr Installation/Configuration 18 14th September 2007 00:30
installing Perl module GD - ran into problems Ovidiu Installation/Configuration 6 19th September 2006 09:32
ispconfig and mambo shajazzi Installation/Configuration 70 28th March 2006 19:29


All times are GMT +2. The time now is 10:49.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.