Really late reply, I know. (A year and a bit later.)
I had the same problem today, with latest version of virtualmin and atmailopen downloaded today from http://atmail.org/ (v1.04). After screwing around with atmailopen for a while I found a solution to the issue im sure was yours.
When atmailopen attempts to connect to dovecot its connecting with username “username@domain” instead of “username.domainprefix”. With this solution every domain wanting to use atmailopen as their webmail frontend will need their own installation of atmailopen and each of these installations will need to be “patched”.
I installed atmailopen via ssh so I may have installed differently, but i’m sure it would work unzipping locally making the changes needed and uploading via ftp also.
The file I changed was, “./atmailopen/libs/IMAP_Client.php”. I made the changes after I installed dependencies and atmailopen using, “http://mydomain.com/atmailopen/install/”.
Look for:
/**
* Login to IMAP server
*
* @param string $user The username
* @param string $pass The password
* @return bool true on success false on failure
*/
function login($user, $pass)
{
$this->user = $user;
// Check that server allows the LOGIN command
if (in_array('LOGINDISABLED', $this->capabilities))
{
$this->lastError = IC_LOGIN_DISABLED;
return false;
}
$pass = str_replace('"', '\"', $pass);
$resp = $this->sendCmd("LOGIN \"$user\" \"$pass\"");
if (!$resp)
return false;
// Namespace command does this function now
//$this->_getDelimiter();
$this->loggedIn = true;
// Load the folder namespace
$this->getImapNamespace();
return true;
}
…within: “./atmailopen/libs/IMAP_Client.php” and replace with:
/**
* Login to IMAP server
*
* @param string $user The username
* @param string $pass The password
* @return bool true on success false on failure
*/
function login($user, $pass)
{
$this->user = $user;
list($uname, $domain) = explode("@", $user, 2); /* changes here */
$username = $uname.".yourdomainprefix"; /* here */
// Check that server allows the LOGIN command
if (in_array('LOGINDISABLED', $this->capabilities))
{
$this->lastError = IC_LOGIN_DISABLED;
return false;
}
$pass = str_replace('"', '\"', $pass); /* and here */
$resp = $this->sendCmd("LOGIN \"$username\" \"$pass\"");
if (!$resp)
return false;
// Namespace command does this function now
//$this->_getDelimiter();
$this->loggedIn = true;
// Load the folder namespace
$this->getImapNamespace();
return true;
}
Don’t forget to change “.yourdomainprefix” for each domain.
I’ve had no issues with this method yet, but it worked for me last time I had the issue also and thought this might be a good place to store a solution, it may even help others.
You can also make changes to “./atmailopen/html/login-light.html” which is the code for the loginbox popup. You can freeze the values of the other input sections and then the only 2 fields that need completing would be “username” and “password”. Just incase it’s helpful.
Remember, every domain needs its own install and this needs to be applied to all.
I’ve noticed a few gui bugs with object heights at low res since ive made the changes (ubuntu linux + firefox). I doubt the changes I made would effect the display so I wouldn’t recommend this webmail client for anyone who is ocd with their websites design/margins etc. I’m unsure of how to fix and use it regardless. (I rarely need to use webmail.)
Keep it up Virtualmin.
icePiK.