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
    9663
    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.
    • 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
        • leppy
          leppy last edited by

          I have install the Plugin.
          In the Webapp is all running fine.
          But the kopano_fetchmail.pl make Errors

          Odd number of elements in hash assignment at kopano_fetchmail.pl line 142, <$fetchmail_api> line 1.
          Use of uninitialized value $account{“entryid”} in concatenation (.) or string at kopano_fetchmail.pl line 161, <$fetchmail_api> line 1.
          Use of uninitialized value $account{“entryid”} in concatenation (.) or string at kopano_fetchmail.pl line 168, <$fetchmail_api> line 1.
          Use of uninitialized value $account{“src_server”} in concatenation (.) or string at kopano_fetchmail.pl line 170, <$fetchmail_api> line 1.
          Use of uninitialized value in concatenation (.) or string at kopano_fetchmail.pl line 170, <$fetchmail_api> line 1.
          Use of uninitialized value in concatenation (.) or string at kopano_fetchmail.pl line 170, <$fetchmail_api> line 1.

          Can Anyone help me???

          noise 1 Reply Last reply Reply Quote 0
          • noise
            noise @leppy last edited by

            its older but here is my how to for Ubuntu 18.04

            Install the Requirements.

            apt install fetchmail libproc-daemon-perl
            

            by installing fetchmail you see the following strings like this:
            Adding system user fetchmail' (UID 119) ... Adding new user fetchmail’ (UID 119) with group nogroup' ... Creating home directory /var/lib/fetchmail’ …

            Download and unzip the fetchmail-1.0.zip to the ‘plugins’ folder in your kopano-webapp installation (default:
            /usr/share/kopano-webapp/plugins/

            cd /tmp
            wget https://github.com/olia-dev/kopano-webapp-fetchmail/archive/master.zip
            unzip master.zip -d /tmp/fetchmail
            cd /tmp/fetchmail/kopano-webapp-fetchmail-master/builds
            unzip fetchmail-1.0.2.zip -d /usr/share/kopano-webapp/plugins/
            cd /usr/share/kopano-webapp/plugins/fetchmail
            mv example.config.php /etc/kopano/webapp/config-fetchmail.php
            ln -s /etc/kopano/webapp/config-fetchmail.php config.php
            

            Create Fetchmail User & Database in MYSQL

            sudo mysql -u root -p 
            
            CREATE DATABASE kopano_fetchmail DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
            CREATE USER 'kopano_fetchmail'@'localhost' IDENTIFIED BY 'SeCrEtPasSwOrD';
            GRANT ALL PRIVILEGES ON kopano_fetchmail.* TO 'kopano_fetchmail'@'localhost';
            FLUSH PRIVILEGES;
            
            quit
            

            Edit your settings:

            nano /etc/kopano/webapp/config-fetchmail.php
            

            Edit if you used non-standard options (none in my case)

            nano /php/daemon/kopano_fetchmail.pl
            

            Start the daemon with

            perl /usr/share/kopano-webapp/plugins/fetchmail/php/daemon/kopano_fetchmail.pl --start
            

            Create System startup script. (see kopano_fetchmail.service.example for a systemd config).
            use this example to /etc/systemd/system/

            mv /usr/share/kopano-webapp/plugins/fetchmail/kopano_fetchmail.service.example /usr/share/kopano-webapp/plugins/fetchmail/kopano_fetchmail.service
            
            ln -s /usr/share/kopano-webapp/plugins/fetchmail/kopano_fetchmail.service /etc/systemd/system/kopano_fetchmail.service
            

            The system service script shows at following

            nano /etc/systemd/system/kopano_fetchmail.service``` 
            
            [Unit]
            Description=Fetchmail daemon for kopano-webapp plugin 'fetchmail'
            After=mysql.service kopano-server.service
            
            [Service]
            Type=forking
            Environment=LC_ALL=C LANG=C
            PIDFile=/var/lib/fetchmail/kopano_fetchmail_daemon.pid
            ExecStart=/usr/bin/perl /usr/share/kopano-webapp/plugins/fetchmail/php/daemon/kopano_fetchmail.pl --start
            ExecStop=/usr/bin/perl /usr/share/kopano-webapp/plugins/fetchmail/php/daemon/kopano_fetchmail.pl --stop
            TimeoutStopSec=60
            
            [Install]
            WantedBy=multi-user.target
            

            Stop the daemon

            perl /usr/share/kopano-webapp/plugins/fetchmail/php/daemon/kopano_fetchmail.pl --stop
            

            Enable fail2rest service to run at startup

            systemctl enable kopano_fetchmail.service
            

            Run the following systemd command to start the fail2rest service

            systemctl start kopano_fetchmail.service
            

            Verify that the fail2rest service it is active and running

            systemctl status kopano_fetchmail.service
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post