%u not parsing during SMTP authentication.

Kevin Landers support at bezaleel.net
Tue Jan 17 18:44:27 CET 2006


Hi list,

I am currently using the CVS from the first week of January.

In my config file I use the following pieces of code to generate a login 
based upon what domain a user is accessing round cube from.

// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL connection, enter ssl://hostname:993
$rcmail_config['default_host'] = 'mail.' . '' . str_replace("www.", "", 
$_SERVER['HTTP_HOST']);

(This allows me to accept just the user name in the login screen and use 
this install across different domains.)

I then do the same for the SMTP server.

// use this host for sending mails.
// to use SSL connection, set ssl://smtp.host.com
// if left blank, the PHP mail() function is used
$rcmail_config['smtp_server'] = 'mail.' . '' . str_replace("www.", "", 
$_SERVER['HTTP_HOST']);

(This contacts the SMTP of the domain being accessed.)

Next, our SMTP server requires that the user specify their full email 
address as their user name. In round cube I have been making this happen 
automatically by using the following code:

// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = '%u' . '@' . '' . str_replace("www.", "", 
$_SERVER['HTTP_HOST']);

It has been working so that it takes the domain, converts it to 
@domain.com and then adds the user's name before the @ symbol. However, 
upon using the CVS version, I am now showing in my SMTP-Auth logs that 
it is trying to login as %u at domain.com instead of username at domain.com

Any ideas as to why this is no longer working? I am in the midst of 
updating to the newest CVS. I am just affraid that that is not going to 
be the problem.

Round Cube's error log shows the following:
[17-Jan-2006 12:27:58 -0500] SMTP Error: SMTP error: authentication 
failure in /domain.com/www/roundcube/program/steps/mail/sendmail.inc on 
line 216

Thanks in advance,
Kevin L.





More information about the Dev mailing list