Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Lite 7

 AfterLogic Forum : AfterLogic WebMail Lite 7
Subject Topic: ManageSieve integration Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
Kim
Newbie
Newbie


Joined: 26 November 2012
Location: United Kingdom
Online Status: Offline
Posts: 4
Posted: 26 November 2012 at 9:06am | IP Logged Quote Kim

Hi,

Ref:
http://www.afterlogic.com/wiki/Use_Sieve_for_filtering_%28WebMail_Pro_6_PHP%29

I'm trying to get this to work using a Dovecot server - ManageSieve seems to work well there when tested with Thunderbird etc.

I've downloaded the plugin files from this page, installed them in plugins, checked permissions etc.
If I take the lines from above and adapt to the IP and port number (4190) of the Dovecot box, :

        'plugins.sieve-forward' => false,
        'plugins.sieve-filters' => false,
        'plugins.sieve-autoresponder' => false,

        'plugins.webmail-sieve-filters' => true,
        'plugins.webmail-sieve-filters.config.file' => 'sieve',
        'plugins.webmail-sieve-filters.config.host' => 'n.n.n.n',
        'plugins.webmail-sieve-filters.config.port' => 4190,


I see the "filters" option under account settings, but then when I open it:

"Data transfer has failed, probably due to server error. Please contact system administrator."

In the debug log, I can see a local database lookup, followed by trying to do something with sieve, but then nothing:

[16:57:32.82] CAppServer->DoGetFilters
[16:57:32.82] DB : connected to root@localhost
[16:57:32.82] DB[1] > SELECT `id_acct`, `id_user`, `id_domain`, `id_realm`, `deleted`, `def_acct`, `mailing_list`, `quota`, `email`, `friendly_nm`, `mail_protocol`, `mail_inc_host`, `mail_inc_port`, `mail_inc_login`, `mail_inc_pass`, `mail_inc_ssl`, `mail_out_host`, `mail_out_port`, `mail_out_login`, `mail_out_pass`, `mail_out_auth`, `mail_out_ssl`, `def_order`, `getmail_at_login`, `mail_mode`, `mails_on_server_days`, `signature`, `signature_type`, `signature_opt`, `delimiter`, `mailbox_size`, `namespace`, `custom_fields` FROM awm_accounts WHERE `id_acct` = 1
[16:57:32.83] DB[2] > SELECT `id_user`, `msgs_per_page`, `contacts_per_page`, `auto_checkmail_interval`, `last_login`, `logins_count`, `def_skin`, `def_lang`, `def_editor`, `save_mail`, `layout`, `incoming_charset`, `def_timezone`, `def_time_fmt`, `def_date_fmt`, `question_1`, `question_2`, `answer_1`, `answer_2`, `capa`, `custom_fields` FROM awm_settings WHERE `id_user` = 1
[16:57:32.84] HOOK > CSieveFilters->PluginChangeAccountById
[16:57:32.84] DB[3] > SELECT id_filter, `field`, `condition`, `filter`, `action`, id_folder, `applied`
                         FROM `awm_filters`
                         WHERE id_acct = 1
                         ORDER BY `action`
[16:57:32.84] HOOK > CSieveFilters->GetSieveFilters
[16:57:32.84] DB : disconnect from root@localhost

[16:57:35.88] /adminpanel/index.php?pop&type=log&action=view


I'm not seeing any connections on the Dovecot server - looks like it isn't even trying.

Any ideas where to look next?


Kim
Back to Top View Kim's Profile Search for other posts by Kim
 
Kim
Newbie
Newbie


Joined: 26 November 2012
Location: United Kingdom
Online Status: Offline
Posts: 4
Posted: 26 November 2012 at 11:05am | IP Logged Quote Kim

Ok - more data
The sieve plugin refers to a library which doesn't seem to be part of the current version download:

    require_once CApi::WebMailPath().'libs/sieve/sieve-php.lib.php';


I found that file in the SourceForge distribution - perhaps things have been moved in more recent versions?

With the file in place, further debugging - the plugin refers to
    $sConfigPrefix = 'plugins.sieve-filters.config.';


not "plugins.webmail-sieve-filters.config" - but that's easily fixed.

With these fixed it does start talking to the server.   I've traced it into the authentication part of the library file - seems Dovecot is not offering any authentication methods until after a "STARTTLS" - wanting all passwords to be sent over a secure link. This seems to be beyond the authentication code and as no valid authentication method is offered it dies at this point.

I may look to update the authentication routines to do the TLS negotiation first - or get dovecot to offer unencrypted logins for this single IP address (local link anyway).    But I get the feeling this is old ground and I'm fixing the wrong problem.

Is there a better way in modern versions? - is the library omission deliberate or accidental?

Back to Top View Kim's Profile Search for other posts by Kim
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 26 November 2012 at 8:27pm | IP Logged Quote Igor

Does this work for you if you try WebMail Pro? This integration was never advertised to work with the Lite.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Kim
Newbie
Newbie


Joined: 26 November 2012
Location: United Kingdom
Online Status: Offline
Posts: 4
Posted: 27 November 2012 at 12:39am | IP Logged Quote Kim

No - just tried WebMail Pro - exactly the same problems.

The download of WebMail Pro files does not include libs/sieve/sieve-php.lib.php either, so the plugin fails in the same way at the require_once line at the top of sieve.php

Looking in the "libraries" path of both lite and pro, neither seem to include any sieve files - so I suspect the plugin on the wiki web page   http://www.afterlogic.com/wiki/Use_Sieve_for_filtering_%28WebMail_Pro_6_PHP%29 is now outdated and does not work with either current version?

From what I can see from the standard Sieve plugin distributed in the main archive this only supports reading sieve scripts from a local filesystem, not over the network? - that would be a simple method where everything is on the same box, but not what I need to do.   I may well have missunderstood though - so if it is possible to configure the standard distribution plugin to work over the network, please let me know how.

Thanks
Kim

Back to Top View Kim's Profile Search for other posts by Kim
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 27 November 2012 at 1:01am | IP Logged Quote Igor

Did you use the plugin which is linked for download on the documentation page? Looks like the documentation itself is outdated a bit, and current version of WebMail includes sieve plugins under data/plugins directory, you just need to enable them in data/settings/config.php file - there should be no need to download anything additionally. Also, I've just checked this and looks like plugins are identical in both Lite and Pro, so they should work in both of those.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Kim
Newbie
Newbie


Joined: 26 November 2012
Location: United Kingdom
Online Status: Offline
Posts: 4
Posted: 27 November 2012 at 7:06am | IP Logged Quote Kim

Yes - I was using the plugin from the documentation page - but before I did I had tried the one distributed under data/plugins - but that does not seem to be able to work over the network to a ManageSieve server - I've checked the source code and it doesn't seem to make any network connections - or read any configuration file parameters relating to hosts or ports.

So I went to the other plugin as it seemed that was the only one able to work with ManageSieve - which it needs to do if the mail server and web server are not on the same box.

I've just checked again, and I can't make the plugin from under /data/plugins talk to the network in lite or pro.

Thanks
Kim



Back to Top View Kim's Profile Search for other posts by Kim
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 27 November 2012 at 11:23pm | IP Logged Quote Igor

Try supplying configuration parameters as sieve.config.host and sieve.config.port in config.php file, and make sure you're using the plugins available in WebMail package. In case if that might help, main code for Sieve functionality is found in libraries/afterlogic/common/managers/sieve/manager.php file.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide