atmailopen webmail install

I have installed atmailopen webmail (atmail.org) on virtualmin, I can login to accounts with:
*webmin webmail: with full email address or username.username
*desktop email client: only with username.username
*with atmailopen webamil interface I only have the option to enter full email address & receive login authentication failuer.

I’m hoping someone has already come across this and resolved it,
and if not any suggestions would be appreciated.

PS I’m New virtualmin user coming across from ISPconfig

Thanks in advance
Garry

Howdy

With Atmail, you’d need to login with the email user’s actual username… Webmin may be a bit more forgiving in how it allows you to login.

In your case, it sounds like the actual usernames are in the format “username.domain”. So to authenticate, you’d have to use that as your username.

I’d be surprised if Atmail didn’t support other formats for a username, but if it doesn’t, that’s going to be a problem :slight_smile:

Are you sure you can’t configure Atmail to accept usernames as they’re setup on your system?

-Eric

Hi Eric

I’m sure u can config atmailopen to accept UN as on my virtualmin system, and I have had some success with a post I found here: http://forum.atmail.com/viewtopic.php?id=1047

Its just that that documentation seems to be lacking and atmail forum is pretty dead as soon as u mention the ‘open’ word with atmail, staff just ignore the post, as can be seen from looking at numerous other post.

Thanks again

Garry

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.