Install, Run and access Zarafa-Postfix-Admin

You’d like to try or use Zarafa-Postfix-Admin on Arch Linux? Awesome! So you’re at the right place to read on and bring it to life.


How to install?

Zarafa-Postfixadmin has already come with zarafa installation.

Whats open?

Start installation and follow the instructions. Please don’t mind answering the questions with yes on a fresh system.

/usr/share/doc/zarafa-postfixadmin/pietma/install.sh

:: Copy and override POSTFIX (extended) settings? [Y/n]

[....] Copy and override POSTFIX (extended) settings
[DONE] Copy and override POSTFIX (extended) settings

:: Please enter MySQL Root Password (or empty)

[....] Create Zarafa-Postfixadmin database
[DONE] Create Zarafa-Postfixadmin database
[....] Install database tables (this will take a while ~1min)
[DONE] Install database tables

:: Enable and start services ZARAFA-POSTFIXADMIN, FETCHMAIL-POSTFIXADMIN, POSTFIX [Y/n]

[....] Enable and start services
[DONE] Enable and start services

:: Import Zarafa users [Y/n]

[....] Import Zarafa users
[DONE] Import Zarafa users

1.) Please open the setup page. The database is created during opening.

   https://HOSTNAME/zarafa-postfixadmin/setup.php

2.) Create admin account with super password.

   Setup password: oT3jDMnc6WzQQdkq

Read More

   https://...

How to add extisting users from zarafa?

Import all users from Zarafa

mysql -uroot < /usr/share/doc/zarafa-postfixadmin/pietma/import-from-zarafa.sql

Please remember to repeat this step each time you've created users on command-line.

How to test?

Open https://alarm/zarafa-postfixadmin in your browser and login.

How to update?

Update the package with Arch Linux package manager

pacman -Sy zarafa-postfixadmin

Start installation like on first time and follow the instructions. Please don’t mind answering the questions with yes, when settings haven't been changed manually.

/usr/share/doc/zarafa-postfixadmin/pietma/install.sh

:: Copy and override POSTFIX (extended) settings? [Y/n]

[....] Copy and override POSTFIX (extended) settings
[DONE] Copy and override POSTFIX (extended) settings

:: Please enter MySQL Root Password (or empty)

[SKIP] Install database  - Database found
[....] Set credentials
[DONE] Set credentials

1.) Please open the setup page. The database is updated during opening.

   https://HOSTNAME/zarafa-postfixadmin/setup.php

Read More

   https://...

What else can be done?

Read more about how it works.

Links

52 thoughts on “Install, Run and access Zarafa-Postfix-Admin

  1. Hey Martina,

    If i wil open https://alarm/zarafa-postfixadmin/setup.php , i got a error.

    Please edit config.inc.php – change $CONF[‘configured’] to true after setting your database settings
    Also i edit config.inc.php and changed the $CONF[‘configured’] to true but the error stays.

    I checked the status off zarafa-postfixadmin with,
    systemctl status zarafa-postfixadmin.service
    * zarafa-postfixadmin.service – Description=zarafa-postfixadmin
    Loaded: loaded (/usr/lib/systemd/system/zarafa-postfixadmin.service; enabled; vendor preset: disabled)
    Active: active (running) since Wed 2016-11-16 23:09:38 CET; 2 days ago
    Main PID: 24484 (zarafa-postfixa)
    Tasks: 2 (limit: 4915)
    CGroup: /system.slice/zarafa-postfixadmin.service
    |- 7841 sleep 5s
    `-24484 /bin/sh /usr/share/zarafa-postfixadmin/zarafa-postfixadmin

    Nov 18 23:16:24 alarm zarafa-postfixadmin[24484]: Postfixadmin is not set up.
    Nov 18 23:16:29 alarm zarafa-postfixadmin[24484]: Postfixadmin is not set up.
    Nov 18 23:16:34 alarm zarafa-postfixadmin[24484]: Postfixadmin is not set up.
    Nov 18 23:16:39 alarm zarafa-postfixadmin[24484]: Postfixadmin is not set up.
    Have you any idea which setting I forgot, I installed zaraf-postfixadmin how you did descripted on your site.
    P.S. I Have completely installed Zarafa new, and Mysql stay running 3 day’s now.

    Reply

    1. admin

      Hey Peter,

      you don’t have to setup zarafa-postfixadmin manually. Did you follow this step…

      Setup database, priviliges and setup password for ZPA
      sudo /usr/share/doc/zarafa-postfixadmin/install

      MartiMcFly

      Reply

  2. Hey Martina,

    The problem was sudo /usr/share/doc/zarafa-postfixadmin/install.

    The server is now running, and i can now login as admin login.
    Now i can create a new domain name.
    Only i have separately downloaded php-imap-5.6.27-1-armv7h.pkg.tar.xz and place it in the wright directory becouse i had a warning that i not can create a new map in the inbox. Because Imap.so was a old module jan. 2016

    Thank you very much for you help.

    Reply

    1. admin

      Hey Peter,

      does that mean, that your updated system had an old php-imap installed? Or do you mean, that you’ve got installed an old version during installation of zarafa?

      MartiMcFly

      Reply

  3. Hi Martina,

    thanks a lot for your great work !

    Following your HowTo i installed Zarafa + ZPA on a brand new RPi3 in less than an hour. Everything is working fine.

    Thanks a lot … so far 😉

    After that i spent an other hour (almost) by clicking the GUI where to configure fetchmail.

    Do you have an advice for me how to add fetchmail (and configure it) in this (your) setup.

    Thanks,
    Tammo

    Reply

    1. admin

      Hey Tammo,

      great to hear that!

      You can just update zarafa-postfixadmin and start from here…
      $ pacman -Sy zarafa-postfixadmin

      Remember to set the zarafa-postfixadmin database passwort in /etc/webapps/zarafa-postfixadmin/fetchmail.conf from /etc/webapps/zarafa-postfixadmin/config.local.php !

      As last step start the fetchmail timer. It will start the service periodically…
      $ systemctl enable fetchmail-postfixadmin.timer
      $ systemctl start fetchmail-postfixadmin.timer

      Check wheather it starts every minute…
      $ journalctl -f

      Have fun!

      MartiMcFly

      Reply

    2. admin

      Hey Tammo,

      badly the fetchmail script coming with Postfixadmin is broken. I fixed and added it to zarafa-postfixadmin (/usr/share/zarafa-postfixadmin/fetchmail.pl + /etc/webapps/zarafa-postfixadmin/fetchmail.conf).

      MartiMcFly

      Reply

  4. Hey Martina,

    Yes that’s what i mean.
    I got an old version during installation of zarafa?
    Yesterday I installed zarafa new, and got again the message in https://alarm/zarafa-postfixadmin/setup.php, that i not can create a new map in the inbox.
    So i did again separately downloaded php-imap-5.6.27-1-armv7h.pkg.tar.xz and place it in the wright directory.
    I have now also installed fetchmail

    Thanks for this great work.

    Peter

    Reply

    1. admin

      Hey Peter,

      thanks for calling me up on this. Indeed in zarafa-postfixadmin was no version specified for the php-imap dependency. Since nothing else depended on a lower version of php-imap, the latest (from php 7) has got installed.

      I changed this in zarafa-postfixadmin. It depends on php-imap<7 now. This will make your system install the right version from pietma, as it should.

      MartiMcFly

      Reply

  5. Hello Martina,

    I have a another question.
    Where can I find the fetchmail log, I configured fetchmail in zarafa-postfix-admin, but the email server don’t download the email. Maybe so I can analyse what wrong is in the configuration.
    Also I am searching where I can configured the smtp server for zarafa for send email.
    Can you help me with this problem?

    The output from: journalctl -u fetchmail-postfixadmin -f is only
    Nov 30 06:58:19 alarm systemd[1]: Starting Fetchmail…
    Nov 30 06:58:19 alarm systemd[1]: Started Fetchmail.
    Nov 30 06:59:28 alarm systemd[1]: Starting Fetchmail…
    Nov 30 06:59:28 alarm systemd[1]: Started Fetchmail.

    Peter

    Reply

    1. admin

      Hey Peter,

      sorry for the long response time.

      Badly the fetchmail script coming with Postfixadmin is broken. I fixed and added it to zarafa-postfixadmin (/usr/share/zarafa-postfixadmin/fetchmail.pl + /etc/webapps/zarafa-postfixadmin/fetchmail.conf). In fetchmail.pl you’ll find this helping you with debugging things…

      $ret=`/usr/bin/fetchmail -Z “-1” -f $filename -i $run_dir/fetchmail.pid`;
      # uncomment for verbose output and run “journalctl -u fetchmail-postfixadmin -f”
      # $ret=`/usr/bin/fetchmail -v -Z “-1” -f $filename -i $run_dir/fetchmail.pid`;

      By this occasion, I’ve added Smarthost support to zarafa-postfixadmin. In your case, I assumed you want to send mails with one of the fetchmail-accounts. There are two new fields in each fetchmail entry (Outgoing Server, Outgoing Address). When Outgoing Server (ex. smtp.gmail.com) is filled, your e-mails send from the selected mailbox are send through this account/provider.

      Because some E-Mail provides do not allow sending e-mails with foreign e-mail-addresses there is a new optional field named “Outgoing Address”. If filled the sender in your e-mails send from Zarafa is rewritten from me@example.com to myname@gmail.com.

      I recommend a fresh installation. When you follow the new installation instructions (more description will follow 😉 ) you should be done in about 15 Minutes. It is very easy now!

      https://pietma.com/run-and-access-zarafa/
      https://pietma.com/install-run-and-access-zarafa-postfix-admin/

      Have fun!

      MartiMcFly

      Reply

  6. Hey Martina,
    No problem, I had alraedy saw you had made a pietma-test. I can waiting. Hihi

    I am now installing zaraf but i got a error.
    I installed arch-linux new.
    Than i follow the instructions on https://pietma.com/run-and-access-zarafa/

    I do pacman -Sy zarafa and got after 1 min. a error.
    :: Proceed with installation? [Y/n] y
    :: Retrieving packages…
    error: failed retrieving file ‘libevent-2.0.22-2-armv7h.pkg.tar.xz’ from mirror.archlinuxarm.org : Connection timed out after 10634 milliseconds
    warning: failed to retrieve some files
    retrieving file
    retrieving file
    retrieving file
    retrieving file
    zarafa-webapp-titlecounter-2.2.0.414-100-any 8.5 KiB 0.00B/s 00:00 [#######################################################################] 100%
    zarafa-webapp-webappmanual-2.2.0.414-100-any 7.9 KiB 0.00B/s 00:00 [#######################################################################] 100%
    zarafa-webapp-xmpp-2.2.0.414-100-any 171.5 KiB 5.58M/s 00:00 [#######################################################################] 100%
    zarafa-webapp-zdeveloper-2.2.0.414-100-any 9.6 KiB 0.00B/s 00:00 [#######################################################################] 100%
    error: failed to commit transaction (unexpected error)
    Errors occurred, no packages were upgraded.

    Can you please solved the problem.

    Gr. Peter

    Reply

    1. admin

      Hey,

      yes, I use a test repository for development and stuff like that. After I’m done it’s deleted again 🙂

      Your error means, that one of archlinux mirror servers isn’t reachable. That happens some times. As the other packages got downloaded your server’s connected to the internet. Just retry the same command until it starts working again.

      Marti

      Reply

  7. Hey Marti

    Zarafa installing goes perfect.
    A great job from you thank you very much.
    I can send emails, but not yet retrieve emails.

    Mysq had a failed error.
    journalctl -u zarafa-server -r
    alarm zarafa-server[505]: ECDatabaseMySQL::_Update() query failed
    Dec 16 17:29:06 alarm zarafa-server[505]: [208B blob data]
    Dec 16 17:29:04 alarm zarafa-server[505]: ECDatabaseMySQL::_Update() query failed
    Dec 16 17:29:04 alarm zarafa-server[505]: [208B blob data]
    Dec 16 17:29:03 alarm zarafa-server[505]: ECDatabaseMySQL::_Update() query failed
    Dec 16 17:29:03 alarm zarafa-server[505]: [209B blob data]
    Dec 16 17:29:03 alarm zarafa-server[505]: ECDatabaseMySQL::_Update() query failed

    Also de file mysql -uroot < /usr/share/doc/zarafa-postfixadmin/import-from-zarafa.sql does not exist.
    I won’t a clean install from Zarafa this evening.

    Gr. Peter

    Reply

    1. admin

      This doesn’t look good. Possibly your database installation of zarafa has become corrupted. Could you please restart zarafa-server => “systemctl restart zarafa-server”

      Reply

    2. admin

      Maybe your sd-card is to slow. For creation of zarafa tables I start zarafa-server for about 60 seconds. On some sd-cards this is to short. An evidence could be, when creating an user account is taking longer then 10 seconds.

      Reply

      1. Hey Martina,

        The raison of the database errors is my phone, if i removed my account from the phone the database errors are stopped. This is a problem for later.

        Reply

      2. Hey Martina,

        The SD card is a class 10 SDHC card, I bougth it specially in a shop of Raspberry experts.
        Zarafa server is now running about 2 day,s but if use activesync with my Ipad or blackberry I got the errors of the mysql database.
        Dec 16 17:29:04 alarm zarafa-server[505]: [208B blob data]
        Dec 16 17:29:03 alarm zarafa-server[505]: ECDatabaseMySQL::_Update() query failed
        Dec 16 17:29:03 alarm zarafa-server[505]: [209B blob data]
        Dec 16 17:29:03 alarm zarafa-server[505]: ECDatabaseMySQL::_Update() query failed
        I have search on internet, but can’t find anything about this error.
        Also, I cannot connect with outlook 2010/Windows 10 to the Raspberry I got a error the server is not reachable or the name of Postin folder is not exist.
        This is one of my last steps of the migration from synology to the PI.

        Peter

        Reply

        1. admin

          Hey Peter,

          this is a bug in the Database. It got fixed in Kopano, but not jet in Zarafa. That’s why I’ve patched this update into Zarafa. So all you have to do is update to the latest zarafa-server from pietma repository. Dont forget to stop the server (systemctl stop zarafa-server) and start it after the update again (systemctl start zarafa-server). The database update is done during startup.

          You need at least Outlook 2013. This is supporting ActiveSync for the first time. Zarafas Outlook plugin isn’t supported anymore. A strong and extensive ActiveSync support is replacing it. The licence server isn’t open source, so I can’t enable the OutlookExchange protocol support.

          MartiMcFly

          Reply

          1. Hey Martina,

            I did a new clean installation on a new SD card.

            Then i started journalctl –f,
            I got a error: /usr/sbin/php: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory

            Activesync with the phone and Ipad are working good now.

            Peter

          2. admin

            Hey Peter,

            Great!

            That error comes from an old ‘readline’ package on your system. ArchlinuxARM images aren’t created daily, that’s why you have to update the whole system (pacman -Syu) after the first start. I always build against the latest packages so every body’s able to use my packages.

            Here you’ve got two options: Update readline (pacman -Sy readline) or update your whole system (pacman -Syu). I’d recommend taking a backup of the sd-card before complete system updates. Possibly there are many packages updated and if something breaks, you’ll need time to find the issue. A backup will give you more calmness 😉

            MartiMcFly

  8. Hey Martina,

    I got a new install, and got a error

    mysql -uroot < /usr/share/doc/zarafa-postfixadmin/pietma/import-from-zarafa.sql
    ERROR 1146 (42S02) at line 11: Table 'zarafapostfixadmin.domain' doesn't exist
    [root@alarm pietma]#

    must i change somtings?

    Gr. Peter

    Reply

      1. Yes, I have done the complete postfixadmin installation.
        Later could I all users import from zarafa with mysql -uroot < /usr/share/doc/zarafa-postfixadmin/pietma/import-from-zarafa.sql.
        There for I had first create a domain in https://alarm/zarafa-postfixadmin
        The only problem this moment is that i cannot retrieve emails from the provider. I see no action in journalctl –f for fetchmail, only I send a email.

        Gr. Peter

        Reply

        1. admin

          Did you run ‘systemctl enable fetchmail-postfixadmin.timer’ and ‘systemctl start fetchmail-postfixadmin.timer’? ‘journalctl -f’ should show all actions and this timers execution (every minute). In fetchmail the interval has to be lowered to about one minute or mails are picked up every 10th minute. In the complete systemlog you should be able to see the reason for not delivering things. I guess postfix will be very communicative.

          Reply

          1. Hey Martina,

            No i didn’t, i started fetchmail-postfixadmin.timer and after a reboot al the email are retrieved from my service provider.

            Thank you very much for all your help and for your great job your made.

            Gr. Peter

  9. Question: i have a running Zarafa on ArchLinux with SSL (StartSSL). I have to renew and everything works on the Windows and Android devices. Not on IOS devices!

    I gave the right .crt and .key file and I only replaced the old one with the new ones….what did I forget?

    Reply

  10. Hey Martina,
    The email server is now running for a few days, and I like it now.
    I have regenerate the certificate keys, because I got always an error message if I started outlook.
    I have change the CN in /usr/share/doc/zarafa/pietma/install-ssl.sh.
    Now I have a problem with the Mobil device manager, I got an error if the plugin is enabled in the settings from zarafa-app, if I disable the mdm the error is gone.
    The error is: Unable to connect to Z-Push Server. Could not connect to host
    I have already reinstall z-push, but no solution.

    Gr Peter

    Reply

    1. Hey Martina,

      I have set the certificate keys back to localhost.
      Now the problem with the Mobil device manager are dissolved .

      I must now find a solution for outlook.

      Gr. Peter

      Reply

      1. admin

        Hey Peter,

        after you change your certificate, you have to set the right host to connect to in /etc/webapps/zarafa-webapp/plugins/mdm/config.php . PHPs comparison of hostname and certificate-host is going to fail, when you don’t.

        I’ll add a local/private unencrypted port for z-push to nginx. This way it doesn’t matter when you change your certificate.

        Marti

        Reply

        1. Hey Martina,
          The problem with the Z-push server and the MDM is remained.
          I have changed the file /etc/webapps/zarafa-webapp/plugins/mdm/config.php
          define(‘PLUGIN_MDM_SERVER’, ‘127.0.0.1:81’);
          define(‘PLUGIN_MDM_SERVER_SSl’, false);

          Also, I create a new file /etc/nginx/sites-available/default.http. en copy the complete config from https://git.pietma.com/pietma/com-pietma-zarafa/blob/98feca3f7beb421f0d35353df3ec55c3ed483c3c/zarafa-server.cfg/etc/nginx/sites-available/default.http in the new created

          Gr. Peter

          Reply

          1. admin

            Hey Peter,

            I’m confused. Didn’t you use the installer shell script? The …/default.http should already be there. Where have you put all your nginx configuration?

            Marti

  11. ‘Hey Martina,
    I use the /usr/share/doc/zarafa/pietma/install-ssl.sh for create the certificate keys
    I use the installer shell script; /usr/share/doc/zarafa/pietma/install.sh and then I use the /usr/share/doc/zarafa-postfixadmin/pietma/install.sh for the first installation.
    Sorry that you a little bit confused, I removed first /etc/nginx/sites-available/default.http, and then I create a new /etc/nginx/sites-available/default.http. and copy the contents from https://git.pietma.com/pietma/com-pietma-zarafa/blob/98feca3f7beb421f0d35353df3ec55c3ed483c3c/zarafa-server.cfg/etc/nginx/sites-available/default.http in the new file.
    So I am sure that the file is good, and I cannot make a typo

    Peter

    Reply

    1. admin

      Hey Peter,

      you’re right. I think I know the reason why this isn’t working immediately.

      A couple releases ago I’ve just copied the files from sites-available to sites-enabled. Now symlinks are created in sites-enabled/* and point to sites-available/*.

      Just recreate symlinks and reload nginx configs. After that it should work.

      $ ln -sf /etc/nginx/sites-available/* /etc/nginx/sites-enabled/
      $ nginx -s reload

      Marti

      Reply

  12. If I use the zarafa-passwd command to change/update a password, the new password goes into effect and works on zarafa webapp, but imap still works with the old password, even after a reboot. How can this be?

    Thanks,
    Mike

    Reply

  13. Hello Martina,

    after hours of searching i don’t have any solution for my problem(s).
    What did i have done:
    1. installed arch linux on my RPI3 and updating
    2. changed pacman.conf
    3. pacman -Sy zarafa
    4. /usr/share/doc/zarafa/pietma/install.sh
    5. /usr/share/doc/zarafa-postfixadmin/pietma/install.sh

    Now i found some errors
    https://alarm/zarafa-postfixadmin/setup.php says a debug info:
    “Invalid query: Specified key was too long; max key length is 1000 bytes ”
    with no option to set the name of a admin

    – journalctl says every minute:
    – alarm systemd[1]: Started Fetchmail.
    – alarm sh[9181]: DBD::mysql::db selectall_arrayref failed: Table ‘zarafapostfixadmin.fetchmail’ doesn’t exist at /usr/share/zarafa-postfixad

    – journalctl says every 5 second:
    alarm zarafa-postfixadmin[522]: ERROR 1146 (42S02) at line 1: Table ‘zarafapostfixadmin.log’ doesn’t exist

    Where did i have done the mistake?

    Heiko

    Reply

    1. admin

      Hey Heiko,

      this sounds like ZPA installation hasn’t run well. Appearently there’s no database created and no credentials are set for ZPA.

      What’s the output you get during execution (delete passwords please)?
      $ /usr/share/doc/zarafa-postfixadmin/pietma/install.sh

      Marti

      Reply

      1. Hi Marti,

        thanks for your answer.

        I have made a new fresh install of Arch Linux, Zarafa and last with your new install script for Postfixadmin. Nothing changed in journalctl. Issues are the same.
        Here is the output of your install script. The password for mysql stays empty

        [root@alarm ~]# /usr/share/doc/zarafa-postfixadmin/pietma/install.sh

        :: Copy and override POSTFIX (extended) settings? [Y/n]y

        [….] Copy and override POSTFIX (extended) settings
        [DONE] Copy and override POSTFIX (extended) settings

        :: Please enter MySQL Root Password (or empty)

        Continue without password
        [….] Create Zarafa-Postfixadmin database
        [DONE] Create Zarafa-Postfixadmin database
        [….] Set credentials
        [DONE] Set credentials
        [….] Install database tables (this will take a while ~1min)
        [logo-default.png]

        Postfix Admin Setup Checker

        Running software:
        * PHP version 5.6.30

        Checking for dependencies:
        * Magic Quotes: Disabled – OK
        * Depends on: presence config.inc.php – OK
        * Checking $CONF[‘configured’] – OK
        * Smarty template compile directory is writable – OK
        * Depends on: MySQL 3.23, 4.0 – OK
        * Testing database connection – OK –
        mysql://zarafapostfixadmin:xxxxx@localhost:/run/mysqld/mysqld.sock/
        zarafapostfixadmin
        * Depends on: session – OK
        * Depends on: pcre – OK
        * Depends on: multibyte string – OK
        * Depends on: IMAP functions – OK

        Everything seems fine… attempting to create/update database structure

        Updating database:

        – old version: 0; target version: 1797
        (If the update doesn’t work, run setup.php?debug=1 to see the
        detailed error messages and SQL queries.)

        updating to version 1 (MySQL)…

        DEBUG INFORMATION:
        Invalid query: Specified key was too long; max key length is 1000 bytes

        Check your error_log for the failed query.
        [DONE] Install database tables

        :: Enable and start services ZARAFA-POSTFIXADMIN, FETCHMAIL-POSTFIXADMIN, POSTFIX [Y/n] y

        [….] Enable and start services
        Created symlink /etc/systemd/system/multi-user.target.wants/zarafa-postfixadmin.service -> /usr/lib/systemd/system/zarafa-postfixadmin.service.
        Created symlink /etc/systemd/system/timers.target.wants/fetchmail-postfixadmin.timer -> /usr/lib/systemd/system/fetchmail-postfixadmin.timer.
        postfix/postfix-script: refreshing the Postfix mail system
        [DONE] Enable and start services

        :: Import Zarafa users [Y/n] y

        [….] Import Zarafa users
        ERROR 1146 (42S02) at line 11: Table ‘zarafapostfixadmin.domain’ doesn’t exist
        [root@alarm ~]#

        Heiko

        Reply

        1. admin

          Hey Heiko,

          thanks for your report!

          Apparently you’ve found a very recent bug in postfixadmin, which only happens with an existing database with turned on UTF-8 support. This is the case, when zarafa and its database are installed before ZPA.

          https://sourceforge.net/p/postfixadmin/bugs/379/
          https://github.com/postfixadmin/postfixadmin/commit/ba94c3a75ea025762ad732b1a4c735251add8b0f#diff-aa524efcdf264bcad4fe5be0020d76e1

          I merged/fixed this bug for ZPA v0.45.1. Just update zarafa-postfixadmin and repeat the installation skript.

          Please give me a hint whether it worked out for you.

          Marti

          Reply

          1. Hey Marti,

            after a long search i found also some notices about utf-8.

            So i make a new install of arch linux without any changes in locale.gen. Only in
            vconsole.conf keymaps=de-latin1 and localtime for Berlin. After this
            – pacman -Syu
            Next:
            – Edit /etc/pacman.conf
            – pacman -Sy zarafa
            – /usr/share/doc/zarafa/pietma/install.sh
            – adding testuser and store like above successfull
            – /usr/share/doc/zarafa-postfixadmin/pietma/install.sh
            Unfortunately with a password for mysql so again
            – /usr/share/doc/zarafa-postfixadmin/pietma/install.sh without password

            And now the output:

            [root@alarm pietma]# zarafa-admin -c ‘testuser@localhost.com’ -p ‘123456’ -e ‘testuser@localhost.com’ -f ‘Test User’
            User created.
            [root@alarm pietma]# zarafa-admin –create-store ‘testuser@localhost.com’
            User store ‘testuser@localhost.com’ created.
            [root@alarm pietma]# /usr/share/doc/zarafa-postfixadmin/pietma/install.sh

            :: Copy and override POSTFIX (extended) settings? [Y/n]y

            [….] Copy and override POSTFIX (extended) settings
            [DONE] Copy and override POSTFIX (extended) settings

            :: Please enter MySQL Root Password (or empty)

            ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
            [….] Create Zarafa-Postfixadmin database
            ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
            ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)
            [root@alarm pietma]# /usr/share/doc/zarafa-postfixadmin/pietma/install.sh

            :: Copy and override POSTFIX (extended) settings? [Y/n]y

            [….] Copy and override POSTFIX (extended) settings
            [DONE] Copy and override POSTFIX (extended) settings

            :: Please enter MySQL Root Password (or empty)

            Continue without password
            [….] Create Zarafa-Postfixadmin database
            [DONE] Create Zarafa-Postfixadmin database
            [….] Set credentials
            [DONE] Set credentials
            [….] Install database tables (this will take a while ~1min)
            [logo-default.png]

            Postfix Admin Setup Checker

            Running software:
            * PHP version 5.6.30

            Checking for dependencies:
            * Magic Quotes: Disabled – OK
            * Depends on: presence config.inc.php – OK
            * Checking $CONF[‘configured’] – OK
            * Smarty template compile directory is writable – OK
            * Depends on: MySQL 3.23, 4.0 – OK
            * Testing database connection – OK –
            mysql://zarafapostfixadmin:xxxxx@localhost:/run/mysqld/mysqld.sock/
            zarafapostfixadmin
            * Depends on: session – OK
            * Depends on: pcre – OK
            * Depends on: multibyte string – OK
            * Depends on: IMAP functions – OK

            Everything seems fine… attempting to create/update database structure

            Updating database:

            – old version: 0; target version: 1797
            (If the update doesn’t work, run setup.php?debug=1 to see the
            detailed error messages and SQL queries.)

            updating to version 1 (MySQL)… done

            updating to version 2 (MySQL)… done

            updating to version 3 (MySQL)…

            DEBUG INFORMATION:
            Invalid query: Table ‘zarafapostfixadmin.admin’ doesn’t exist

            Check your error_log for the failed query.
            [DONE] Install database tables

            :: Enable and start services ZARAFA-POSTFIXADMIN, FETCHMAIL-POSTFIXADMIN, POSTFIX [Y/n] y

            [….] Enable and start services
            Created symlink /etc/systemd/system/multi-user.target.wants/zarafa-postfixadmin.service -> /usr/lib/systemd/system/zarafa-postfixadmin.service.
            Created symlink /etc/systemd/system/timers.target.wants/fetchmail-postfixadmin.timer -> /usr/lib/systemd/system/fetchmail-postfixadmin.timer.
            postfix/postfix-script: refreshing the Postfix mail system
            [DONE] Enable and start services

            :: Import Zarafa users [Y/n] y

            [….] Import Zarafa users
            ERROR 1146 (42S02) at line 11: Table ‘zarafapostfixadmin.domain’ doesn’t exist
            [root@alarm pietma]#

            After this no issue of a to long key but again
            Mar 22 22:58:33 alarm systemd[1]: Started Fetchmail.
            Mar 22 22:58:34 alarm sh[20125]: DBD::mysql::db selectall_arrayref failed: Table ‘zarafapostfixadmin.fetchmail’ doesn’t exist at /usr/share/zarafa-postfixa…..
            Mar 22 22:58:38 alarm zarafa-postfixadmin[516]: ERROR 1146 (42S02) at line 1: Table ‘zarafapostfixadmin.log’ doesn’t exist

            Any idea?

            Heiko

          2. martimcfly

            I think I’ve got the issue!

            I had to fix the installation script. Now it creates a database with latin1 encoding which postfixadmin relies on.

            Just update ZPA to v0.45.3, drop the existing zarafapostfixadmin database and run the installation script again.

            Looking forward to your feedback!

            Marti

          3. admin

            Hey Heiko,

            how did the update go? Is everything functional now?

            Marti

  14. Hey Marti,

    thanks for your care about me. I was a on vacation at the weekend. So now i can work with/fight against the system. Your update seems to work. No issues in the journal. Only message every minute: “started fetchmail”. So everything seems to be good.

    But there are one or more other problems:
    first problem:
    when i create a user with “zarafa-admin -c ‘testuser2@localhost.com’ -p ‘abc_123’ -e ‘testuser2@localhost.com’ -f ‘Test User2’ ” i get in journalctl “zarafa-server[510]: Command `/etc/zarafa/userscripts/createuser` exited with non-zero status 126”
    But after creating store for testuser2 i can login via https://alarm/zarafa-webapp/
    so i did ” mysql -uroot < /usr/share/doc/zarafa-postfixadmin/pietma/import-from-zarafa.sql" but i can't login with testuser2 in https://alarm/zarafa-postfixadmin/users/login.php

    next problem:
    i can't create a superadmin account. I assume the issue is between my ears but i hope the fault is on your site ;))

    Heiko

    Reply

    1. martimcfly

      Hey Heiko,

      great to hear that ZPA worked!

      I’m confused about the message you get from zarafa-admin. Did you run it under root? What’s your MariaDB/Mysql version? At some point the ABI changed and MySQL became incompatible with Zarafa. For a very short time, I’ve been serving the broken Mysql-Package. Possibly you installed it? Maybe this is the reason for the non-zero status?

      Mailbox passwords are transferred to Zarafa. ZPA is left with an empty password field. That’s why mailbox users are unable to login to ZPA. If you make ZPA the main password database people would be able to login in ZPA but the webapp-passwd-plugin wouldn’t work anymore. For password changes you’d always have to open ZPA. However, leaving the Zarafa Webapp would confuse the most zarafa-user.

      After you create a regular user in ZPA you have to open his properties (Edit). There you’re able to change his rights to superadmin.

      Marti

      Reply

      1. Hey Marti,

        a few weeks have gone but today i begun the “fight” again.

        So i made a fresh installation. with your latest zarafa and ZPA from your repo.

        Now i have a admin account in ZPA and i can add a domain. When i add a user i get
        Apr 28 19:20:34 alarm zarafa-postfixadmin[524]: Creating user test@mydomain.de
        Apr 28 19:20:35 alarm zarafa-server[523]: Command `/etc/zarafa/userscripts/createuser` exited with non-zero status 126
        Apr 28 19:20:35 alarm zarafa-postfixadmin[524]: User created.
        Apr 28 19:20:38 alarm zarafa-postfixadmin[524]: User store ‘test@mydomain.de’ created.
        Apr 28 19:20:38 alarm zarafa-postfixadmin[524]:

        But login with zarafa-webapp is ok.

        When i add a (in German) “e-mail abruf” i get in journalctl:

        Apr 28 19:33:31 alarm nginx[314]: 2017/04/28 19:33:31 [error] 372#372: *276 FastCGI sent in stderr: “PHP message: __LANG.pFetchmail_database_save_success used via read_f, but nothing replaced (value )” while reading response header from upstream, client: 192.168.0.4, server: , request: “POST /zarafa-postfixadmin/edit.php?table=fetchmail HTTP/1.1”, upstream: “fastcgi://unix:/run/php-fpm/zarafa-postfixadmin.sock:”, host: “alarm”, referrer: “https://alarm/zarafa-postfixadmin/edit.php?table=fetchmail”
        Apr 28 19:33:33 alarm zarafa-postfixadmin[524]: Action 2017-04-28 19:33:31 heiko_admin@mydomain.de (192.168.0.4) mydomain.de create_fetchmail

        A few minutes later fetchmail writes in journal:
        Apr 28 19:33:33 alarm zarafa-postfixadmin[524]: Skipped
        Apr 28 19:33:33 alarm zarafa-postfixadmin[524]:
        Apr 28 19:33:54 alarm systemd[1]: Started Fetchmail.
        Apr 28 19:33:55 alarm fetchmail-all[21915]: fetch test@wieldt.de for test@wieldt.de
        Apr 28 19:33:55 alarm sh[21915]: /var/lib/fetchmail/.fetchmail.pid: Permission denied
        Apr 28 19:33:55 alarm sh[21915]: fetchmail: lock creation failed.
        Apr 28 19:34:56 alarm systemd[1]: Started Fetchmail.

        I take a look in /var/lib an saw
        drwxr-xr-x 2 90 nobody 4096 Jan 28 16:17 fetchmail

        Is 90:nobody correct?

        Heiko

        Reply

        1. admin

          Hey Heiko!

          Great to hear that you keep yourself up-to-date!

          That permissions seem to be wrong. Try to fix it…
          $ chown fetchmail:nobody /var/lib/fetchmail

          The error in nginx seems to be a simple logging error coming from Postfixadmin…
          https://sourceforge.net/p/postfixadmin/mailman/message/31621260/

          I’m not sure whether this causes any failures (except the logging)?

          Marti

          Reply

          1. Hey Marti,

            the wrong permissions were the solution. Now i have sent and received my first mails.

            BTW nginx is also crying when i change the polling minutes for a mailbox but the new time works.

            The next step will be to change the certificate for mail.mydomain.de to open the server for our phones

            Heiko

            Ah, one question: is it necesssry for Fetchmail to start every minute? The setting for my mailboxes to poll my providers every 10 minutes is a good solution and would be a good setting for fetchmail also. Right?

  15. Would you please change two mails above my real domain name (test@wieldt.de) in test@mydomain.de. I had forgotten to change it.

    Thanks

    Heiko

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *