WebGUI not showing any mails

Issue #1027 resolved
HDIN created an issue

Hello Janos,

My WebGUI (user login) is not showing any mails and keeps on loading, when search button is clicked.

Sphinx 2.2.11-id64-release (95ae9a6)

piler 1.3.6, build 998, Janos SUTO sj@acts.hu

Sphinx & piler are running fine.

Please help.

Comments (19)

  1. Janos SUTO repo owner

    Check out the webserver’s error logs. Also check /var/piler/sphinx directory if dailydelta1.* files have significant sizes.

  2. HDIN reporter

    Thanks for your reply.

    Find below the webserver’s error log, (getting this when search button is clicked)

    ===

    PHP Parse error: syntax error, unexpected '[', expecting ']' in /var/piler/www/model/search/message.php on line 155

    ===

    Below is /var/piler/sphinx directory’s dailydelta1 files,

    ===

    -rw-r--r-- 1 piler piler 0 Nov 15 05:05 dailydelta1.spa
    -rw-r--r-- 1 piler piler 1 Nov 15 05:05 dailydelta1.spd
    -rw-r--r-- 1 piler piler 1 Nov 15 05:05 dailydelta1.spe
    -rw-r--r-- 1 piler piler 1.2K Nov 15 05:05 dailydelta1.sph
    -rw-r--r-- 1 piler piler 1 Nov 15 05:05 dailydelta1.spi
    -rw-r--r-- 1 piler piler 0 Nov 15 05:05 dailydelta1.spk
    -rw------- 1 piler piler 0 Nov 15 05:05 dailydelta1.spl
    -rw-r--r-- 1 piler piler 0 Nov 15 05:05 dailydelta1.spm
    -rw-r--r-- 1 piler piler 1 Nov 15 05:05 dailydelta1.spp
    -rw-r--r-- 1 piler piler 1 Nov 15 05:05 dailydelta1.sps
    -rw-r--r-- 1 piler piler 1 Nov 15 02:30 dailydelta1.tmp.tmps

    ===

    Your help is much appreciated.

    Awaiting your response.

  3. Janos SUTO repo owner

    What php version do you have? Anyway, I think either the piler cronjobs are not installed or not running, or you have no emails archived yet.

    Show me “crontab -u piler -l” output as well, and any proof from the mail log that you have archived any message.

  4. HDIN reporter

    Hello Janos,

    Please find below the details you asked for,

    ===

    [root@archive ~]# php -v
    PHP 5.4.16 (cli) (built: Nov 1 2019 16:04:20)
    Copyright (c) 1997-2013 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

    [root@archive ~]# crontab -u piler -l

    PILERSTART

    5,35 * * * * /usr/local/libexec/piler/indexer.delta.sh
    30 2 * * * /usr/local/libexec/piler/indexer.main.sh
    3 * * * * /usr/local/libexec/watch_sphinx_main_index.sh
    */15 * * * * /usr/bin/indexer --quiet tag1 --rotate --config /usr/local/etc/piler/sphinx.conf
    */15 * * * * /usr/bin/indexer --quiet note1 --rotate --config /usr/local/etc/piler/sphinx.conf
    30 6 * * * /usr/bin/php /usr/local/libexec/piler/generate_stats.php --webui /var/piler/www >/dev/null
    */5 * * * * /usr/bin/find /var/piler/error -type f|wc -l > /var/piler/stat/error
    */5 * * * * /usr/bin/find /var/piler/www/tmp -type f -name i.* -exec rm -f {} ;

    PILEREND

    [root@archive ~]# cat /var/log/maillog | grep gmail
    Nov 14 15:37:27 archive piler-smtp[898]: received: 15R5BVE2K5FM1VBU, from=XXXXXX@gmail.com, size=4132, client=107.161.182.58, fd=6
    Nov 14 15:37:27 archive piler[913]: 1/15R5BVE2K5FM1VBU: 400000005dcdbb113482024c0083445ba167, size=4132/2080, attachments=0, reference=, message-id=CAJptyUFBE5GNF-hMU8KCi2TM3fhyQgdGX-UQGB9zGLzVR1-LNw@mail.gmail.com, retention=2557, folder=0, delay=0.0741, status=stored
    [root@archive ~]#

    ===

    Find the screenshot attached for reference.

  5. Janos SUTO repo owner

    OK, please upgrade php to 7.x. The 5.x series is no longer supported. Then check the gui again.

  6. HDIN reporter

    Hello Janos,

    We are near to the fix.

    Now getting below error,

    Empty search result. Try adding the wildcard character(*) after a word snippet (min. 5 characters), eg. duplic* to find "duplicate", "duplicated", etc.

    No webserver logs either. Thanks.

  7. Janos SUTO repo owner

    Show me the output of:

    mysql -h 127.0.0.1 -P9306
    
    select * from dailydelta1;
    

  8. HDIN reporter

    Hello Janos,

    Please find below the output,

    [root@archive ~]# mysql -h 127.0.0.1 -P9306                                                                                                                    
    Welcome to the MariaDB monitor.  Commands end with ; or \g.                                                                                                    
    Your MySQL connection id is 1                                                                                                                                  
    Server version: 2.2.11-id64-release (95ae9a6)                                                                                                                  
    
    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.                                                                                           
    
    Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.                                                                                 
    
    MySQL [(none)]>                                                                                                                                                
    MySQL [(none)]> select * from dailydelta1;                                                                                                                     
    +------+------------+------+-------------+                                                                                                                     
    | id   | sent       | size | attachments |                                                                                                                     
    +------+------------+------+-------------+                                                                                                                     
    |    1 | 1573301758 |    0 |           0 |                                                                                                                     
    |    2 | 1573763825 |    0 |           0 |                                                                                                                     
    +------+------------+------+-------------+                                                                                                                     
    2 rows in set (0.00 sec)                                                                                                                                       
    
    MySQL [(none)]>
    

    Thanks.

  9. HDIN reporter

    Hello Janos,

    The mails are showing now. Thank you for your help.

    I’ve some questions,

    1. How will the “Restore to mailbox” feature work.
    2. Can i restrict users from using only n number of mailboxes.
    3. Can i restrict users by disk space.

    Thanks.

  10. Janos SUTO repo owner
    1. Set the SMARTHOST variable in config-site.php to point to your mail server. Then piler will send the emails to be restored there.
    2. Please clarify
    3. No

  11. HDIN reporter

    Hello Janos,

    1. SMARTHOST is already set using the hostname of the mail server. But when I click it, it says OK but can’t see mails in the mail server. FYI : I’m using Zimbra mail server.
    2. Found that, adding the email address to users can only be done by Admin. Resolved.
    3. For example, *@domain.com can only use upto 3 GB disk space of the server.

    I really appreciate you time and help. Thanks.

  12. Janos SUTO repo owner

    Check the zimbra logs if piler host attempts to connect to it or not.

    For #3, as I said piler won’t reject a message based on a disk quota. However if the emails were received by an mta which can handle some sql queries (postfix, perhaps) to decide if emails to a certain domain is fine, then you could hack such an sql query to do so. Check out https://docs.google.com/document/d/19WK64GNU92bSx7eHNrZSSiamftsfbdqf_rVqwJXgpYs/edit#heading=h.8enf8ltqwsxt. Note that this docs is for the enterprise version of piler, but such config can be made with the community edition as well, though you need a harder work to count the messages or message size for a single domain as all data is in the same database and tables. (While piler enterprise uses a separate database for each organization).

  13. HDIN reporter

    Hello Janos,

    Below is the log from Piler server,

    ===

    Nov 15 10:38:01 archive piler-smtp[902]: connected from x.x.x.x:48124 on fd=6 (active connections: 1)
    Nov 15 10:38:01 archive piler-smtp[902]: received: KV4A4PYG2L0RTBTS, from=no-reply@archive.domain.com, size=4167, client=x.x.x.x, fd=6
    Nov 15 10:38:01 archive piler-smtp[902]: disconnected from x.x.x.x on fd=6 (0 active connections)
    Nov 15 10:38:01 archive piler-webui[1094]: sending mail from=no-reply@archive.domain.com, rcpt=admin@example.com, status=1
    Nov 15 10:38:02 archive piler[925]: 1/KV4A4PYG2L0RTBTS: discarding: duplicate message, id: 2, message-id: CAJptyUFBE5GNF-hMU8KCi2TM3fhyQgdGX-UQGB9zGLzVR1-LNw@mail.gmail.com
    Nov 15 10:38:02 archive piler[925]: 1/KV4A4PYG2L0RTBTS: 400000005dcec664046def1c0039338dee5e, size=4167/0, attachments=0, reference=, message-id=CAJptyUFBE5GNF-hMU8KCi2TM3fhyQgdGX-UQGB9zGLzVR1-LNw@mail.gmail.com, retention=0, folder=0, delay=0.0054, status=duplicate
    Nov 15 10:43:16 archive piler-smtp[902]: connected from y.y.y.y:51575 on fd=6 (active connections: 1)
    Nov 15 10:43:16 archive piler-smtp[902]: disconnected from y.y.y.y on fd=6 (0 active connections)

    ===

    No logs hitting the Zimbra server.

    Thanks.

  14. HDIN reporter

    Hello Janos SUTO,

    Any update for my last query. It was regarding the “Restore to mailbox” feature. See the logs provided by me. Thanks.

  15. Janos SUTO repo owner

    Show me the SMARTHOST value from the config. It should point to your mail server. I believe that you pointed it to piler itself which is wrong.

  16. HDIN reporter

    Hello Janos SUTO,

    Sorry for my mistake. There was a typo in the SMARTHOST.

    The issue is fixed now. Getting mails to-and-fro.

    Thank you so much again for your time.

  17. Log in to comment