Wrong usernames in mail client autoconfiguration

I manually configured the XML in the server template, and used $SMTP_LOGIN. However, for some reason that only outputs the username prefix. So instead of seeing the full username, in my case "domain.tld_user", I only get "domain.tld_" which of course is wrong.

Status: 
Closed (fixed)

Comments

What email address is being passed to the autoconfig URL? From the behavior you describe, it seems like it is being called with just @domain.com instead of user@domain.com

Nope, the whole email address... Tested this in the browser like so:

http://somedomain.tld/cgi-bin/autoconfig.cgi?emailaddress=user@somedomain.tld
http://somedomain.tld/autodiscover/autodiscover.xml?emailaddress=user@somedomain.tld

Both would get me just <LoginName>somedomain.tld_</LoginName>

Ok, I see the cause of this bug now .. it is triggered only when _ is used as a username separator, so we didn't spot it previously :-(

It will be fixed int the next release though.

Great! Is it possible to give me a patch for this if it's not too much hassle? :)

You can edit the file cgi-bin/autoconfig.cgi under the domain's home directory, and change line 69 to :

        $SMTP_LOGIN = $PREFIX."_".$mailbox;

Wicked, works like a charm. If anyone is interested, this would fix it for all:

for fl in /home/*/cgi-bin/autoconfig.cgi; do
sed -i 's/$name/$mailbox/g' $fl
done

Automatically closed -- issue fixed for 2 weeks with no activity.