Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: [SOLVED] mail report says "no messages" or only a few after upgrade to zcs5

  1. #21
    lzmarine is offline Intermediate Member
    Join Date
    Jul 2007
    Location
    Wilmington, DE
    Posts
    18
    Rep Power
    8

    Default

    This produces empty report, but because it's still trying to get yesterday at midnight through today at midnight and the mta table has data from this morning (after midnight). However, the following looks to produce a good report:

    mail:~# sudo -u zimbra /opt/zimbra/libexec/zmdailyreport -time 20081217000000,20081217235959
    Generating report
    From 2008-12-17 00:00:00 to 2008-12-17 23:59:59

    13 messages found for 16 total recipients (3 unique)
    72892 total bytes
    5607.08 average bytes/msg
    1.23 average recipients/msg
    0.62 average delay/msg (sec)

    Errors

    Most active senders
    3 xxx@zimbra.com
    3 xxx@mail.domain.com
    1 xxx@redstationun.com
    1 xxx@importantpro.com
    1 xxx@nevaquail.com
    1 xxx@trickwish.com
    1 xxx@avonslobs.net
    1 xxx@fonline.de
    1 xxx@jerleneroordahost.net

    Most active recipients
    7 xxx@magnoliasevents.com
    6 xxx@lzmarine.net
    3 xxx@mail.domain.com
    mail:~#

    I think once I verify the report after the offline backup, I'll recap the steps and mark it as solved... sound good? I'm still curious why ZCS 5.0.11 and earlier were fine, but 5.0.12 has the problem. Also interesting that the report had data from the day on which I did the install, but not after the offline backup (just zmcontrol stop, copy, and zmcontrol start.)

    Thanks again for the help.
    Zimbra: 5.0.13_GA_2791_UBUNTU8
    OS: Ubuntu 8.04.2
    Kernel: Linux 2.6.24-19-server #1 SMP Wed Aug 20 23:54:28 UTC 2008 i686 GNU/Linux

  2. #22
    tonster is offline Zimbra Employee
    Join Date
    Dec 2007
    Location
    Ypsilanti, MI
    Posts
    145
    Rep Power
    7

    Default

    Quote Originally Posted by lzmarine View Post
    This produces empty report, but because it's still trying to get yesterday at midnight through today at midnight and the mta table has data from this morning (after midnight). However, the following looks to produce a good report:

    mail:~# sudo -u zimbra /opt/zimbra/libexec/zmdailyreport -time 20081217000000,20081217235959
    Generating report
    From 2008-12-17 00:00:00 to 2008-12-17 23:59:59

    13 messages found for 16 total recipients (3 unique)
    72892 total bytes
    5607.08 average bytes/msg
    1.23 average recipients/msg
    0.62 average delay/msg (sec)

    Errors

    Most active senders
    3 xxx@zimbra.com
    3 xxx@mail.domain.com
    1 xxx@redstationun.com
    1 xxx@importantpro.com
    1 xxx@nevaquail.com
    1 xxx@trickwish.com
    1 xxx@avonslobs.net
    1 xxx@fonline.de
    1 xxx@jerleneroordahost.net

    Most active recipients
    7 xxx@magnoliasevents.com
    6 xxx@lzmarine.net
    3 xxx@mail.domain.com
    mail:~#

    I think once I verify the report after the offline backup, I'll recap the steps and mark it as solved... sound good? I'm still curious why ZCS 5.0.11 and earlier were fine, but 5.0.12 has the problem. Also interesting that the report had data from the day on which I did the install, but not after the offline backup (just zmcontrol stop, copy, and zmcontrol start.)

    Thanks again for the help.
    That is odd. Well let us know how it goes!

  3. #23
    lzmarine is offline Intermediate Member
    Join Date
    Jul 2007
    Location
    Wilmington, DE
    Posts
    18
    Rep Power
    8

    Default

    Mail report content success!!! The problem is that running a cron shell on Ubunbtu that does zmcontrol stop and zmcontrol start does not properly start zmlogswatch (logger). I tried both of the following ways in my cron shell script (runs as root):

    sudo -u zimbra /opt/zimbra/bin/zmcontrol start
    -- AND ALSO --
    . /opt/zimbra/.bashrc
    sudo -u zimbra /opt/zimbra/bin/zmcontrol start

    The service starts correctly if I su to zimbra user from root, run . /opt/zimbra/.bashrc, then run /opt/zimbra/bin/zmcontrol start

    It seems like an environment issue, but I'm likley missing something simple here.
    Zimbra: 5.0.13_GA_2791_UBUNTU8
    OS: Ubuntu 8.04.2
    Kernel: Linux 2.6.24-19-server #1 SMP Wed Aug 20 23:54:28 UTC 2008 i686 GNU/Linux

  4. #24
    tonster is offline Zimbra Employee
    Join Date
    Dec 2007
    Location
    Ypsilanti, MI
    Posts
    145
    Rep Power
    7

    Lightbulb

    Quote Originally Posted by lzmarine View Post
    Mail report content success!!! The problem is that running a cron shell on Ubunbtu that does zmcontrol stop and zmcontrol start does not properly start zmlogswatch (logger). I tried both of the following ways in my cron shell script (runs as root):

    sudo -u zimbra /opt/zimbra/bin/zmcontrol start
    -- AND ALSO --
    . /opt/zimbra/.bashrc
    sudo -u zimbra /opt/zimbra/bin/zmcontrol start

    The service starts correctly if I su to zimbra user from root, run . /opt/zimbra/.bashrc, then run /opt/zimbra/bin/zmcontrol start

    It seems like an environment issue, but I'm likley missing something simple here.
    Well, it won't work the way you tried with . .bashrc because you're taking the .bashrc environment and then losing it when you sudo, but what seems odd is that you should still be picking it up when you take zimbra's shell but you're not (and I'm guessing you're just getting roots environment again). What shell does zimbra have (finger zimbra or grep zimbra /etc/passwd). Another thing you might try is creating a script like /usr/local/bin/restartzimbra.sh with the following:

    Code:
    #!//bin/bash
    source /opt/zimbra/.bashrc
    /opt/zimbra/bin/zmcontrol stop
    /opt/zimbra/bin/zmcontrol start
    and then using your previous commandline like:

    Code:
    sudo -u zimbra /usr/local/bin/restartzimbra.sh
    Really though, I'm not sure why you're passing through sudo when you're already root. Doing something like

    Code:
    su - zimbra -c "/opt/zimbra/bin/zmcontrol start"
    Would be sufficient since you're root, and should definitely pick up zimbra's environment. Similarly, switching to user zimbra from root and making sure to get zimbra's environment would be:

    Code:
    su - zimbra

  5. #25
    lzmarine is offline Intermediate Member
    Join Date
    Jul 2007
    Location
    Wilmington, DE
    Posts
    18
    Rep Power
    8

    Default

    I'm fairly new to the sudo methodology, so I figured I was not doing something simple. I ran a test script, below, that works for restarting the services successfully! Thank you for all your help.

    #!/bin/sh
    su - zimbra -c "/opt/zimbra/bin/zmcontrol stop"
    su - zimbra -c "/opt/zimbra/bin/zmcontrol start"
    su - zimbra -c "/opt/zimbra/bin/zmcontrol status"

    The solution was 2-fold; first (and primarily), install swatch (`apt-get install swatch` and accept all dependencies), then correct MY faulty backup script to not use sudo, but standard su as recommended by tonster.
    Zimbra: 5.0.13_GA_2791_UBUNTU8
    OS: Ubuntu 8.04.2
    Kernel: Linux 2.6.24-19-server #1 SMP Wed Aug 20 23:54:28 UTC 2008 i686 GNU/Linux

  6. #26
    arnisraido is offline Intermediate Member
    Join Date
    Dec 2010
    Location
    Riga
    Posts
    15
    Rep Power
    4

    Default

    Quote Originally Posted by lzmarine View Post
    sudo -u zimbra /opt/zimbra/bin/zmcontrol start
    -- AND ALSO --
    . /opt/zimbra/.bashrc
    sudo -u zimbra /opt/zimbra/bin/zmcontrol start

    The service starts correctly if I su to zimbra user from root, run . /opt/zimbra/.bashrc, then run /opt/zimbra/bin/zmcontrol start

    It seems like an environment issue, but I'm likley missing something simple here.
    I had the similar issue - logger and stats services were constantly stopping. And running
    "sudo -u zimbra ..."
    from root, did not helped, the same with
    "sudo -u zmlogswatchctl restart"


    Then I switched to zimbra
    Code:
    su zimbra
    And started services correctly.
    I found in logs, it can be connected with PERL PATH?

  7. #27
    phoenix is online now Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,586
    Rep Power
    57

    Default

    This thread is over two years old and is not the same version of Zimbra that you have installed. The 'stats' service in Zimbra has changed completely since this version.

    Quote Originally Posted by arnisraido View Post
    Then I switched to zimbra
    Code:
    su zimbra
    You should not use that command to switch to the Zimbra user, you should always use the following command:

    Code:
    su - zimbra
    The hyphen in that command is important as it creates the correct command environment.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  8. #28
    arnisraido is offline Intermediate Member
    Join Date
    Dec 2010
    Location
    Riga
    Posts
    15
    Rep Power
    4

    Default

    Thank You, I will notice this.
    Release 8.0.1.GA.5438.UBUNTU12.64 UBUNTU12_64 FOSS edition.

Page 3 of 3 FirstFirst 123

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 02-03-2011, 07:01 AM
  2. help with smtp auth
    By pheonix1t in forum Installation
    Replies: 1
    Last Post: 04-27-2009, 06:56 AM
  3. [SOLVED] Zimbra don't work - zmmailboxd
    By dmalherbe in forum Administrators
    Replies: 10
    Last Post: 11-20-2008, 10:05 AM
  4. [SOLVED] mailbox and apache not running
    By rtwick in forum Administrators
    Replies: 4
    Last Post: 11-15-2008, 08:21 AM
  5. Mail not getting to mail boxes
    By ehults in forum Installation
    Replies: 5
    Last Post: 10-31-2005, 09:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •