Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    [New Plugin] Configure and use fetchmail from the WebApp

    Plugins for Kopano WebApp
    10
    24
    9434
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • olia
      olia last edited by

      @mcostan Thanks.

      I’ve also added some screenshots to the github page.

      1 Reply Last reply Reply Quote 0
      • marty
        marty Kopano (Inactive) last edited by

        Hi Olia,

        Thanks for sharing. Looks promising.

        https://documentation.kopano.io/deskapp_admin_manual
        http://documentation.kopano.io/webapp_smime_manual
        https://documentation.kopano.io/webapp_admin_manual

        1 Reply Last reply Reply Quote 0
        • Wiz
          Wiz last edited by Wiz

          Great work @olia :thumbsup:

          I’ll be rolling it out shortly and will report back with any bugs/issues.

          UPDATE: Runs great! Thanks again =)

          Cheers
          W

          1 Reply Last reply Reply Quote 0
          • teka74
            teka74 last edited by

            Great Plugin !!!

            I asked for that for years, beginning with my zarafa 6.4 experiments!

            Thanks a lot !!

            1 Reply Last reply Reply Quote 0
            • mcostan
              mcostan last edited by

              Hi,

              I have copied the GIT code to:
              /usr/share/kopano-webapp/plugins/fetchmail

              then copied the config.php to /etc/kopano/webapp/config-fetchmail.php

              restarted apache2 but the new plugin does not come up.

              I am doing something wrong?

              1 Reply Last reply Reply Quote 0
              • olia
                olia last edited by

                @Marty @Wiz @teka74 Thanks ;-)

                @mcostan

                Did you create a symlink from /etc/kopano/webapp/config-fetchmail.php to /usr/share/kopano-webapp/plugins/fetchmail/config.php ?

                Otherwise could you please post the apache2 error log?

                1 Reply Last reply Reply Quote 0
                • mcostan
                  mcostan last edited by

                  Here it is:

                  root@mrc-ubz64:/etc/kopano/webapp# ls -rtl config-fetchmail.php
                  lrwxrwxrwx 1 root root 53 Mar 16 16:32 config-fetchmail.php -> /usr/share/kopano-webapp/plugins/fetchmail/config.php
                  root@mrc-ubz64:/etc/kopano/webapp# ls -lrt /usr/share/kopano-webapp/plugins/fetchmail/config.php
                  -rw-r–r-- 1 root root 1065 Mar 16 16:32 /usr/share/kopano-webapp/plugins/fetchmail/config.php

                  The error log doesn’t mention fetchmail at all…

                  I am sure this is something I am doing wrong though.

                  1 Reply Last reply Reply Quote 0
                  • olia
                    olia last edited by

                    Did you activate the plugin in the kopano settings?

                    mcostan 1 Reply Last reply Reply Quote 0
                    • mcostan
                      mcostan @olia last edited by

                      @olia

                      Apologies I think this is me being stupid.

                      [Thu Mar 16 16:41:21.550162 2017] [core:info] [pid 23167] [client 127.0.0.1:36071] AH00128: File does not exist: /usr/share/kopano-webapp/plugins/fetchmail/resources/css/fetchmail.css, referer: https://z.advanced-finance.com/webapp/
                      [Thu Mar 16 16:41:22.220274 2017] [core:info] [pid 23174] [client ::1:46690] AH00128: File does not exist: /usr/share/kopano-webapp/plugins/fetchmail/js/fetchmail.js, referer: https://z.advanced-finance.com/webapp/
                      [Thu Mar 16 16:41:23.788916 2017] [core:info] [pid 23173] [client 127.0.0.1:36075] AH00128: File does not exist: /usr/share/kopano-webapp/plugins/fetchmail/js/fetchmail.js, referer: https://z.advanced-finance.com/webapp/

                      Obviously by not reading the documentation correctly (and your documentation is very good) I failed to notice that the build was in the builds directory not in the source code.

                      Will try again, but it is me being stupid.

                      1 Reply Last reply Reply Quote 0
                      • olia
                        olia last edited by

                        No problem, happens to the best of us ;-)

                        1 Reply Last reply Reply Quote 0
                        • mcostan
                          mcostan last edited by

                          now indeed it comes up fine. Thanks a lot!

                          1 Reply Last reply Reply Quote 0
                          • mcostan
                            mcostan last edited by

                            Question @Kopano

                            Do you think it would be worth having a common area, sourcecode, packages or whatever where plugins like this are available for all users?

                            I.e. a central repository where people can go in and search which plugins are available in addition to the official Kopano ones?

                            fbartels 1 Reply Last reply Reply Quote 0
                            • fbartels
                              fbartels Kopano @mcostan last edited by

                              @mcostan yes, we have that already on our agenda. As a matter of fact I just added some more links and made it public. You can find it at https://stash.z-hub.io/projects/COM/repos/projects-and-resources/browse

                              @olia would you be so kind to run through the explained workflow in https://stash.z-hub.io/projects/COM/repos/projects-and-resources/browse/CONTRIBUTING.md and add your project? I am interested if the instructions are clear enough or need to be clarified/simplified. Thanks!

                              Regards Felix

                              Resources:
                              https://kopano.com/blog/how-to-get-kopano/
                              https://documentation.kopano.io/
                              https://kb.kopano.io/

                              Support overview:
                              https://kopano.com/support/

                              1 Reply Last reply Reply Quote 0
                              • olia
                                olia last edited by

                                @fbartels
                                I’ve read the document, and followed it (waiting to hear back for write access to the repo).
                                Also the instructions are clear enough.

                                fbartels 1 Reply Last reply Reply Quote 0
                                • fbartels
                                  fbartels Kopano @olia last edited by

                                  @olia thanks, I just replied to your request.

                                  Regards Felix

                                  Resources:
                                  https://kopano.com/blog/how-to-get-kopano/
                                  https://documentation.kopano.io/
                                  https://kb.kopano.io/

                                  Support overview:
                                  https://kopano.com/support/

                                  1 Reply Last reply Reply Quote 0
                                  • pwhooftman
                                    pwhooftman last edited by

                                    Hi,
                                    I am not a very skilled Linux user, but i come as far as getting the Fetchmail plugin show up as a plugin. But as soon as i go to the Options in Kopano, i get a Http 500 internal server error as long as the plugin is enabled. So i must be doing something wrong. I’ll try to describe what i have done:

                                    I use a Univention debian distro in a virtual machine. I installed Kopano-core & Kopano-webapp & got that working, including sending mail via a smart relay host.

                                    Installed Requierements ( i think)

                                    • fetchmail: dpkg -l | grep fetchmail shows it as installed
                                    • libproc-daemon-perl: installed via apt-get
                                    • MTA on the host machine (postfix): is working, i can send mail
                                    • Database to store account informations (At the moment only ‘mysql’ is supported): i did not take specific action on this, i presume Kopano-core install took care of this?

                                    I was able to download, install & activate the plugin; it shows up in the options in kopano-webapp.

                                    I copied the example.config.php in the <kopano-webapp>/plugins/fetchmail folder to config.php ** in the same folder ** and customized the ‘changethis!’ part in define(‘PLUGIN_FETCHMAIL_PASSWORDS_AES_KEY’, “changethis!”)

                                    i did not create a user to run the fetchmail daemon (i found the (default: fetchmail/nogroup) )
                                    i did not Manual: Set the rights for the home directory to 600.
                                    i did not Edit the <kopano-webapp>/plugins/fetchmail/php/daemon/kopano_fetchmail.pl if you used non-standard options.

                                    i Started the daemon with perl kopano_fetchmail.pl --start and no errors where shown.

                                    I still have to create a startup script. (see kopano_fetchmail.service.example for a systemd config).

                                    I did not make any symlinks as previously posted?

                                    Thanks in advance

                                    pwhooftman 1 Reply Last reply Reply Quote 0
                                    • pwhooftman
                                      pwhooftman @pwhooftman last edited by

                                      @pwhooftman said in [New Plugin] Configure and use fetchmail from the WebApp:

                                      Hi,
                                      I am not a very skilled Linux user, but i come as far as getting the Fetchmail plugin show up as a plugin. But as soon as i go to the Options in Kopano, i get a Http 500 internal server error as long as the plugin is enabled. So i must be doing something wrong. I’ll try to describe what i have done:

                                      mmm, it seems i have to do something in the database department after all:
                                      [Mon May 07 11:17:14.629544 2018] [:error] [pid 2652] [client 10.0.0.225:3311] PHP Fatal error: Uncaught Error: Class ’

                                      mysqli’ not found in /usr/share/kopano-webapp/plugins/fetchmail/php/drivers/class.MysqlDatabaseDriver.php:39\nStack trac

                                      e:\n#0 /usr/share/kopano-webapp/plugins/fetchmail/php/class.pluginfetchmailmodule.php(167): MysqlDatabaseDriver->__const

                                      ruct(‘localhost’, ‘3306’, ‘kopano’, ‘kopano_fetchmai…’, ‘kopano_fetchmai…’, ‘password’, ‘********’)\n#1 /usr/shar

                                      e/kopano-webapp/plugins/fetchmail/php/class.pluginfetchmailmodule.php(180): PluginFetchmailModule->getDatabaseConnection

                                      ()\n#2 /usr/share/kopano-webapp/plugins/fetchmail/php/class.pluginfetchmailmodule.php(86): PluginFetchmailModule->getLis

                                      tOfFetchmailAccounts()\n#3 /usr/share/kopano-webapp/server/includes/core/class.jsonrequest.php(57): PluginFetchmailModul

                                      e->execute()\n#4 /usr/share/kopano-webapp/kopano.php(137): JSONRequest->execute(’{“zarafa”:{"plu…’)\n#5 {main}\n thro

                                      wn in /usr/share/kopano-webapp/plugins/fetchmail/php/drivers/class.MysqlDatabaseDriver.php on line 39, referer: http://1

                                      0.0.0.168/webapp/

                                      pwhooftman 1 Reply Last reply Reply Quote 0
                                      • pwhooftman
                                        pwhooftman @pwhooftman last edited by

                                        @pwhooftman
                                        Update: i reinstalled phpmyadmin, and now the error states: Cannot connect to database. So, progress :-)

                                        But if i look in phpmyadmin no fetchmail user or table(s) for the plugin are present. Do i have to set up the mysql for the plugin myself (user, tables, etc) , or is that something the daemon should take care of?

                                        1 Reply Last reply Reply Quote 0
                                        • pwhooftman
                                          pwhooftman last edited by

                                          Update: got it working

                                          1. Fetchmail was not installed yet :-|
                                          2. set mysql root users password
                                          3. changed mysql user & password to root in config.php
                                          1 Reply Last reply Reply Quote 0
                                          • ckraut
                                            ckraut last edited by

                                            Do you think it would be possible to have a plugin for the the other direction so that it’s possible to set for each User Account several smtp Server in the same way as you made it possible for the fetchmail function.

                                            Best Carmen

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post