[New Plugin] Configure and use fetchmail from the WebApp
-
Update: got it working
- Fetchmail was not installed yet :-|
- set mysql root users password
- changed mysql user & password to root in config.php
-
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
-
I have install the Plugin.
In the Webapp is all running fine.
But the kopano_fetchmail.pl make ErrorsOdd 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???
-
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 userfetchmail' (UID 119) ... Adding new user
fetchmail’ (UID 119) with groupnogroup' ... 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