php-warnings

Issue #892 resolved
Holger Wiegleb created an issue

Hi,

I just started with Piler 1.3.4, after some hours of installation and configuration it works fine :-)

In many mails I get the following warnings: Notice: Undefined index: date in /var/piler/www/system/helper/mime.php on line 143

Do you have any ideas whats going wrong?

Thank you for this great piece of software!

Comments (14)

  1. Holger Wiegleb reporter

    I get the warning for about 50% of the messages, not for all,

    The message appears twice in a mail (above the line with "dowmload", "show headers", "print"...) or it doesnt appear.

  2. Holger Wiegleb reporter
    Received: from hwi-kopano.hwi-local (localhost [127.0.0.1])
        by hwi-kopano.hwi-local (Postfix) with ESMTP id 4C3DF2E0BB3
        for <support@**********.de>; Thu, 29 Mar 2018 16:37:58 +0200 (CEST)
    X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on *******-server14.de
    X-Spam-Level: 
    X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,HTML_MESSAGE,
        URIBL_BLOCKED autolearn=ham version=3.3.2
    X-Original-To: support@*********
    Delivered-To: ********@*********-server14.de
    X-policyd-weight:  NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .***********. - helo: .mout.kundenserver. - helo-domain: .kundenserver.)  FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7
    Received: from server14.**********.de [37.17.224.14]
        by hwi-*********.hwi-***** with POP3 (fetchmail-6.3.26)
        for <support@***********.de> (single-drop); Thu, 29 Mar 2018 16:37:58 +0200 (CEST)
    Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13])
        by ***********server14.de (Postfix) with ESMTPS id 391D059E07FF
        for <support@************.de>; Thu, 29 Mar 2018 16:37:48 +0200 (CEST)
    Received: from sfg-server.**********.local ([176.94.6.229]) by
     mrelayeu.kundenserver.de (mreue103 [212.227.15.183]) with ESMTPSA (Nemesis)
     id 0Lxd6Z-1eV7Pr22nb-017IGE for <support@*************.de>; Thu, 29 Mar
     2018 16:37:48 +0200
    X-Footer: c2NobWlkdC1mYWxiZS5kZQ==
    Received: from [192.168.111.89] ([192.168.111.89])
        (authenticated user martina.*******@***********.de)
        by sfg-server.*************.local (Kerio Connect 9.2.5 patch 3) with ESMTPSA;
        Thu, 29 Mar 2018 16:34:54 +0200
    Date: Thu, 29 Mar 2018 16:37:04 +0200
    Subject: ecoDMS - Verbindung
    Importance: Normal
    X-Priority: 3
    Thread-Index: AdPHauW0KYZpUtTwQoua9O6SQSwEMQ==
    Message-ID: <aa415caa-af00-4e6a-a57a-69a7a7945716@***********.de>
    X-Mailer: Kerio Outlook Connector (Offline Edition) (9.2.5.3336 T3)
    From: Martina ******* <martina.*********@********.de>
    To: 'Holger ********' <support@***********.de>
    Cc: mb <martina.*******@*********.de>
    MIME-Version: 1.0
    Content-Type: multipart/alternative; boundary="=-dMOaHHj4PSJbSmce5mSG"
    X-Provags-ID: V03:K0:i4iDvqkYpyjA4uqIwCIOghqGiQjICqth6wIqW8uwxtb6WvnNwAC
     W9FriugzFncr7GYwlRDx4fROg+TPFuNO4YPZbaQ7AgMpUxB4oZiEkObpxeVX6zdQIkblOpi
     TaQ1fkpJa1T3ThQ1WHRHKfJoptte5pew+glNleSw05jlWvKLK7m79yz6A6ksvfebj+skxoa
     wgks02SSTItwhBxg06Gbg==
    X-UI-Out-Filterresults: notjunk:1;V01:K0:yBAnqO54E8Q=:f30tEesRxomSWFluMqsTXF
     oePYxqpRP+A61B7pBs4PKK4KBqvQ6t28ZomtehyH1me0CZ8pqmFaIdMb1jbCgoPcyQQVpDHWj
     HQ9APQ2QHdhfTaajeFp4S58kt7Ud8fvDz1vJ1T3pxooQG5VECbD5DuCbHX179X3JpSfo7SpqP
     /ZWzljrNd+UKGiUSyv6344YcP7cmdh0zBZ/qn/7VDczOv69r0t1zgv1k2SoIX2wDVt3Zir7QP
     PV3sBVwwrVOxli/CA8Jkbs1nQ34MfvykpVm6P2kvBIcnms4AskKzU9mfJpeT7+hwP06o0Rgc0
     7mZu7Pt+p0Ep8TFl3A+dwIeXb4VDz2PXD2njzBp6MKV5mMwD0mt6oUGKWD++BFCXneqXILM9q
     /uQ+b25pQHq8eRmq4iJQcmif2XQ0RLRcUyPxyQc9BVgah8h3hqAiph3mcDcYTXpcZP+MiVg6K
     +fInuHghWgTGmGykVk98pOiA+ckuIyadD+lr8cMzqoofO7wFl25G5yuY6DIpAGM+IzN3T3Cqc
     gGR7Nhx4CXnnXaBENDgmakixprsBdsgMs9MkfhKVfDoygP6OU3Swn+b5g8DBDdfSHOQBTsE1Z
     9D4LLBEBmU0aTgVwDOYg0rTwm6y4oQetHt+sQ34pYMbIonn46mSEKBzzAhKOg+C9oksv+CIu5
     OlYfKmMdG/zLF7yLJMAUxhjKZnWtwKZxssO7VFzvTJ1picYvDAau5tJt/xac+zfYctKfoUx2G
     23TsWpjDhHO3sdIMIaWsXi9jpfAw5UpiXg4P4WIKjpWLQPu20mUCpoiX6O0=
    
  3. Holger Wiegleb reporter

    Here I get 2 warnings ...

    Notice: Undefined index: date in /var/piler/www/system/helper/mime.php on line 143

    Notice: Undefined index: date in /var/piler/www/system/helper/mime.php on line 143

    Thank you for your efforts!

  4. Janos SUTO repo owner

    Thanks. Could you do me a favour, and use the formatting options? Bitbucket doesn't allow me to edit your comment, and it's just unprocessable to me without formatting it.

  5. Janos SUTO repo owner

    Try the following diff:

    diff --git a/webui/system/helper/mime.php b/webui/system/helper/mime.php
    index 428c118..65eb750 100644
    --- a/webui/system/helper/mime.php
    +++ b/webui/system/helper/mime.php
    @@ -140,7 +140,9 @@ class Piler_Mime_Decode {
    
           // I saw a dumb email (it was a spam, though) having two Date: lines.
           // In this case we take the first date, and discard the rest
    -      if(is_array($headers[self::HEADER_FIELDS[4]])) { $headers[self::HEADER_FIELDS[4]] = $headers[self::HEADER_FIELDS[4]][0]; }
    +      if(isset($headers[self::HEADER_FIELDS[4]]) && is_array($headers[self::HEADER_FIELDS[4]])) {
    +         $headers[self::HEADER_FIELDS[4]] = $headers[self::HEADER_FIELDS[4]][0];
    +      }
    
           for($i=0; $i<count(self::HEADER_FIELDS); $i++) {
              if(!isset($headers[self::HEADER_FIELDS[$i]])) { $headers[self::HEADER_FIELDS[$i]] = ''; }
    

    Or simply overwrite webui/system/helper/mime.php with this file: https://bitbucket.org/jsuto/piler/raw/58e9b809c94e39391195cc9617ca543e6839ff83/webui/system/helper/mime.php

  6. Holger Wiegleb reporter

    Great! It works! Thank you very much.

    Do I find such a fix in upcoming versions or do I have to fix it after an update myself?

  7. Janos SUTO repo owner

    The fix is merged to the master branch, so it will be in any newer versions. No need for any future manual updates.

  8. Holger Wiegleb reporter

    Thats fine!

    Some more questions, I hope its okay, when I ask it here ...

    I'm evaluating piler because I support some small companies and I'm searching for a solution. piler seems to be perfect for our requirements ...

    Do you think the project will be continued within the next 10 or 20 years? How many programmers work on it? Is it possible to change the community-version to the enterprise-version? Do both versions depend on the same branch?

    500$ / server / year is okay for not too small companies, For small companies I like the licence-model of benno-mailarchiv (small business, 5 mailboxes, 80€ / year)

    Do you plan to offer different pricing-models for piler enterprise?

    Independently of the enterprise licence-options, is it okay to use the community-version for some small companies?

  9. Janos SUTO repo owner

    It's ok to ask here, I've seen much already from users :-)

    Anyway, it's very difficult to predict the future for 10 to 20 years, however it's my best interest to continue the project. I'm the only core developer on the project (though there are some occasional minor contributions from users).

    Both the enterprise and the community versions share a great deal of code. However, I've changed the enterprise edition, and done some optimizations or changes (eg. tweak the database schema, the way it stores attachments, dropped the folders feature which I don't like), as well as adding a few new features (eg. support for multitenancy), distributing it as a deb package, etc. The bottomline is that unfortunately you just can't switch between them, and use the existing data, though you can export data from one edition, and import it to the other.

    The pricing is not mature yet, that's why I started a survey to ask users for input. What I have in mind that sell the commercial version for a one time fee for companies don't need multitenancy or multinode support, and perhaps give a 1 year access to newer versions with the possibility to renew it later.

    For service providers offering SaaS archiving services (with support for multitenancy, multiple nodes) I plan the per server / year flat pricing method or a per mailbox pricing, depending the outcome of the survey. For larger companies in between (multiple nodes, but no multitenancy needs) probably some pricing in between. So yes, a different pricing model is quite possible.

    Even though I'm focusing on some commercial aspects of the project won't cripple the community version by any means, and I won't terminate it. You are free to use it for any purposes for smaller or even larger companies. I'm aware of some installations using the community edition to provide saas services, and I'm totally OK with even that. Instead I intend to offer the enterprise edition even for smaller companies with a friendly pricing and for bigger companies with some really useful improvements making the enterprise edition a lucrative option.

    I'll create a comparison chart between the community and the enterprise edition, and let everyone pick the edition that suits his needs.

    And on top of all these above I think I'll start commercial support as well pretty soon. Based on the responses I got so far there's a need for it, and some piler users are willing to pay for support (also more than 1 option is possible). So the plan is to promote it for the users of both editions. Note that some users preferred to get free support, so I might keep the bitbucket issue tracker (=this forum) on a 'if I still have time' basis.

    Let me know you need more answers or have other questions.

  10. Holger Wiegleb reporter

    Thank you for your comprehensive answers.

    I wish you a lot of success with the project and I hope that the commercial part compensates your efforts.

    So far, everything sounds fine to me and I will test intensely in the next few days and probably start up shortly with a first customer.

    During my previous tests, I had one or the other problem, which I could solve with the help of research.

    Should I have further questions I will contact you.

  11. Log in to comment