Author Topic: Problem with Accounts Plugin  (Read 11013 times)

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
Problem with Accounts Plugin
« on: April 26, 2011, 04:48:44 PM »
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.

Code: [Select]
/*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';


Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Problem with Accounts Plugin
« Reply #1 on: April 27, 2011, 05:17:43 AM »
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)

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
Problem with Accounts Plugin
« Reply #2 on: April 27, 2011, 08:19:51 PM »
Quote from: rosali;34441
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.

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.
« Last Edit: April 27, 2011, 08:31:30 PM by deltatech »

Offline deltatech

  • Jr. Member
  • **
  • Posts: 41
Problem with Accounts Plugin
« Reply #3 on: April 27, 2011, 09:55:13 PM »
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.

Offline billstif

  • Jr. Member
  • **
  • Posts: 37
Also having problems with accounts plugin
« Reply #4 on: May 02, 2011, 07:27:04 PM »
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?

Offline billstif

  • Jr. Member
  • **
  • Posts: 37
Patch
« Reply #5 on: May 02, 2011, 07:29:15 PM »
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?

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Problem with Accounts Plugin
« Reply #6 on: May 03, 2011, 12:47:11 AM »
Don't mix up configs. Your config requires the patch.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline billstif

  • Jr. Member
  • **
  • Posts: 37
Problem with Accounts Plugin
« Reply #7 on: May 03, 2011, 01:19:48 AM »
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;34592
Don't mix up configs. Your config requires the patch.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Problem with Accounts Plugin
« Reply #8 on: May 03, 2011, 01:35:37 AM »
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)

Offline billstif

  • Jr. Member
  • **
  • Posts: 37
Applied Patch
« Reply #9 on: May 03, 2011, 03:07:58 AM »
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.

Offline billstif

  • Jr. Member
  • **
  • Posts: 37
Update
« Reply #10 on: May 04, 2011, 08:10:44 AM »
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?

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Problem with Accounts Plugin
« Reply #11 on: May 04, 2011, 10:07:28 AM »
Does your PHP support SSL (Module OpenSSL)?
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline billstif

  • Jr. Member
  • **
  • Posts: 37
Ssl
« Reply #12 on: May 04, 2011, 09:58:31 PM »
As best I can tell, yes.  I use Hostmonster as my web provider.

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Problem with Accounts Plugin
« Reply #13 on: May 05, 2011, 12:46:15 AM »
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.
« Last Edit: May 05, 2011, 12:53:40 AM by rosali »
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Regards,
Rosali
__________________
MyRoundcube Project (commercial)