Roundcube Community Forum

 

Problem with Accounts Plugin

Started by deltatech, April 26, 2011, 04:48:44 PM

Previous topic - Next topic

deltatech

I am having trouble getting the accounts plugin to work with Gmail.   It is able to log in and read the folders and messages just fine.

The problem is sending.   I have this setting

$rcmail_config['accounts_smtp_default'] = false;

I was hoping that it would authenticate with Gmail's SMTP server and send thru it but it gives me "SMTP Error (-1): Authentication failed"  every time.  

I could send thru the default or local SMTP server however this won't work if sending to other gmail users because gmail will know it wasn't sent via gmail and will reject it as spam.  

Is there any way to get the authentication to work properly for sending via gmail?

Here is my configuration.

/*accounts plugin */

// navigation config (requires plugin settings @website http://myroundcube.googlecode.com)
$rcmail_config['settingsnav'][] = array('part' => '', 'locale' => 'settings.accounts', 'href' => './?_task=settings&_action=plugin.accounts&_framed=1', 'onclick' => '', 'descr' =

/* database table name */
$rcmail_config['db_table_accounts'] = 'accounts';

/* allowed hosts ::: array() = all */
$rcmail_config['accounts_hosts'] = array(
  "Delta" => "localhost",
  "Google Mail" => "ssl://imap.gmail.com:993"
);

/* always use default smtp server */
$rcmail_config['accounts_smtp_default'] = false;

/* imap_open flag (http://php.net/manual/en/function.imap-open.php) */
$rcmail_config['imap_open_flag'] = 'novalidate-cert';


rosali

It tries to send via your Roundcube defined SMTP-Server.

There is a patch Issue 55 - myroundcube - Accounts-Plugin, each account own smtp-server? - RoundCube Plugins - Google Project Hosting to allow user defined SMTP hosts.

Feel free to apply this patch into the recent plugin version. Send me a copy an will update the plugin.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

deltatech

#2
Quote from: rosali;34441It tries to send via your Roundcube defined SMTP-Server.

There is a patch Issue 55 - myroundcube - Accounts-Plugin, each account own smtp-server? - RoundCube Plugins - Google Project Hosting to allow user defined SMTP hosts.

Feel free to apply this patch into the recent plugin version. Send me a copy an will update the plugin.

That worked great..   Only one problem left..

When I have an account selected that is other than the main account, and then go to the Settings->Special Folders they are all unassigned and i can make a real mess with that..  Special folders is confused as to which account we are editing when using any account except the main account.

deltatech

After further research I can now better define the folder problem when using the accounts problem.

I have 4 accounts setup.   The primary account,  gmail, and two more accounts that are on local host.

When switching from account to account the special folders remain intact until I switch to gmail and then back to the primary account.  The primary account forgets all the definitions of special folders.

Once this happens, the only way to fix it is to either log out and back in or, go to settings and reassign the folders.    

It seems that the problem is when switching accounts from a foriegn account back to the default server, it doesn't reload the prefs from the user table as it should.

billstif

I have been able to get the accounts plugin to work with all of my Roundcube accounts, but I cannot get it to work with Gmail or Yahoo.

In the config.inc.php file for the allowed hosts array, I have included

   "Google Mail" => "ssl://imap.gmail.com:993|ssl://smtp.gmail.com:465",
   "Yahoo Mail" => "ssl://imap.mail.yahoo.com:993"
);

I get an immediate cannot login to remote host for Google, and a long delay before the same message regarding Yahoo Mail.

I also changed
$rcmail_config['accounts_smtp_default'] = FALSE;

so I could use the Gmail smtp.

What am I missing?

billstif

I've seen the reference to the Issue 55 patch dated 2007.  Is that still a fix, and if so, how do I apply the patch?

rosali

Don't mix up configs. Your config requires the patch.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

billstif

I'm sorry.  You lost me.  Are you saying the patch applies to the accounts config.inc.php file?  And, if so, how do I apply the patch?

Quote from: rosali;34592Don't mix up configs. Your config requires the patch.

rosali

I meant, you are using configuration settings which require the patch.

PM User Deltatech. He has applied the patch. Maybe he shares the code.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

billstif

Once I saw how the patch worked (identifies file, indicates line to delete (-), indicates line to add (+), I loaded the patch myself, but somewhere I made a mistake because the localization file had me replace the label account_host with account_provider, but in Accounts Administration, the program is still calling for the missing label for [account_host].

Remote IMAP Accounts ::: bill@billstifler.org
Account Name:  
Login ID:  
Password:  
Confirm Password:  
[account_host]:

Apparently, I missed changing a line somewhere.  Whatever the problem is, it is not registering a log entry in the Roundcube error log.

billstif

I went back through the patch with a clean copy of the accounts plugin files and successfully made the changes.  I also fixed the problem I was having with the SQL.  Unfortunately, while the plugin works for Roundcube accounts, I still cannot get it to access either Gmail or Yahoo Mail.  Anyone else having a similar problem or have any other suggestions?

rosali

Does your PHP support SSL (Module OpenSSL)?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

billstif

As best I can tell, yes.  I use Hostmonster as my web provider.

rosali

#13
Any chance for Remote access (IMAP test account and FTP to Roundcube root folder)?

EDIT: Maybe your provider blocks Port 993. You could test it by setting up Roundcube to use Google servers instead of your own IMAP/SMTP server.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

rosali

Regards,
Rosali
__________________
MyRoundcube Project (commercial)