Nice find, Tony.

Just above that code is a comment:
// Check that an email address is valid based on RFC 821 (?)

Here's what RFC says about sizes in general, and user specifically:
<quote>
          ****************************************************
          *                                                  *
          *  TO THE MAXIMUM EXTENT POSSIBLE, IMPLEMENTATION  *
          *  TECHNIQUES WHICH IMPOSE NO LIMITS ON THE LENGTH *
          *  OF THESE OBJECTS SHOULD BE USED.                *
          *                                                  *
          ****************************************************

            user

               The maximum total length of a user name is 64 characters.
</quote>

So in accordance with RFC821, I think that this edit should be removed entirely (or perhaps check for < 1). It appears that single digit user names should be allowed.

This file/code is part of the control-panel-toaster package.
<aside> Why, I'm not sure. I would have expected that function to be part of qmailadmin-toaster. The web packages are are more tightly coupled than they need to or should be imo, but that's beside the point.
</aside>

Jake controls that code, not me. He'll need to make any adjustments, as I'm sure he will. I doubt that there will be any changes to control-panel-toaster, so your changes should be safe, Tony. Should there be a newer version of that package though, you're correct that you'd need to reapply your change, unless Jake includes the change as well. That's up to him.

Thanks for the correction Tony!

--
-Eric 'shubes'


On 10/26/2010 04:15 PM, Tony White wrote:
Hi folks,
Found the answer....

/usr/share/toaster/htdocs/scripts/javascript.js

in isValidEmail function

// if (address.indexOf('@') < 3) return false;
if (address.indexOf('@') < 2) return false;

The change should not have been required as the @
was in position 3 with tw@ but had to change it to <2
for it to accept t...@.
Ahh, is the character array is zero not one based!
Hence
tw@
012 which means the @ is < 3.

Eric! I assume that every update now I will need to edit this file
or can we make this the default please? My clients tend to use
the employee initials, many of whom have only two initials.



On 27/10/2010 9:51 AM, Tony White wrote:
Hello all,
Can someone tell me please when the minimum length for an
email address name came about. Also how do I remove it?
Many of my domain clients have two or three letters only
before the @.





---------------------------------------------------------------------------------
Qmailtoaster is sponsored by Vickers Consulting Group 
(www.vickersconsulting.com)
   Vickers Consulting Group offers Qmailtoaster support and installations.
     If you need professional help with your setup, contact them today!
---------------------------------------------------------------------------------
    Please visit qmailtoaster.com for the latest news, updates, and packages.
To unsubscribe, e-mail: [email protected]
    For additional commands, e-mail: [email protected]


Reply via email to