DirectAdmin can't deal with mixed case usernames correctly

GOPalmer

Verified User
Joined
May 6, 2009
Messages
25
Is this a known bug or something wrong with my setups? It seems if an account is created with a mixed case username the corresponding default email address fails to receive emails. The log is as follows

Code:
2009-05-17 05:00:02 Received from <> R=1M5cDy-0006Jv-J5 U=mail P=local S=1776 T="Mail delivery failed: returning message to sender"
2009-05-17 05:00:02 routing failed for ****@****.com <****@****.com> F=<>: Unrouteable address
*** Frozen (delivery error message)

Any idea on a fix for this?

Best Regards, George
 
Last edited:
The unroutable address is host.freebeehosting.com. It has nothing to do with test or TeSt.
 
That log is from a cron notification. If i create an account with the username test the default email is able to receive emails but creating an account with the username TeSt it cannot.

Here another log example

Code:
2009-05-16 18:24:30 Received from <> R=1M5SIw-00024Y-1F U=mail P=local S=3746 T="Mail delivery failed: returning message to sender"
2009-05-16 18:24:30 routing failed for ****@****.com <****@****.co.uk> F=<>: Unrouteable address
2009-05-16 18:24:30 routing failed for ****@****.com <****@****.co.uk> F=<>: Unrouteable address
*** Frozen (delivery error message)

I created an account with the username GeO and domain ****.co.uk, therefore the default email is ****@****.co.uk. I then emailed that address and this was the log. If i add another email address to that account but in lowercase e.g. ****@****.co.uk that email will receive fine.

Hope this makes sense

Best Regards, George
 
Last edited:
According to about.com you should always use lower case to create your email address/username.

Though I don't know why it doesn't work, the reasons are valid.

Jeff
 
Should DA not limit usernames to lower case? Or at least when creating the default email convert it to lower case?

Is there anything i can do that could convert existing email addresses to lowercase, leaving the usernames mixed case?

Best Regards, George
 
Hello,

I just tested this out.

DA makes anything you enter in upper case to lower case.
For example, I created a pop account name:

CaSe

and it ended up as:

case

I sent an email to CaSe, and it arrived to the case mailbox without issues.

The error you've posted is not realted to the case, but rather the hostname as floyd mentioned.
I'd recommend going through this checklist to ensure the system is setup correctly.. eg: everything resolves as it should, and is in the right files etc.
http://help.directadmin.com/item.php?id=16

John
 
I'm sorry but you are wrong. When creating a new email account, yes the email is converted to lower case, but if you create a new DA account via the API the username is not converted to lowercase nor is the default email account. It is this email account that doesnt work, and only if its mixed case.
 
I've just tried to create a new account via DA and the username TeSt is invalid but i can create it using the API. This looks like a bug in the API. I'm not bothered about the API bug, i can work around that, but around a quarter of the 8000 accounts on my servers are mixed case, how can i fix them?
 
Hello,

I see what you're looking at now, and usernames should be all lower case.

As for changing your existing ones, use the script:
/usr/local/directadmin/scripts/change_username.sh

to automate this for all User, I've created this script (which is very minimally tested, FYI)
Code:
#!/bin/sh
for u in `ls /usr/local/directadmin/data/users | grep -P '[A-Z]'`; do
{
        lower=`echo $u | tr [A-Z] [a-z]`;
        /usr/local/directadmin/scripts/change_username.sh $u $lower;
};
done;
John
 
Thanks for your help. Before i go ahead and run this script, what will happen if there is a lower case username the same as one of the mixed case ones?

Best Regards, George
 
Hello,

Code:
grep -P '[A-Z]'
will only generate a list of Users with upper case letters. The script won't touch anyone who already has all lower case lettering.

John
 
But what if it tries to change Abe to abe, and there already is an abe?

Jeff
 
Back
Top