Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-18-2009, 07:48 AM
Member
 
Posts: 11
Default [SOLVED] Daily report shows emails to zimbra from zimbra every ten minutes

Hi,

This is not causing me any operational issue but it is driving me nuts.

Everyday now for a few weeks I get loads of entries in my "Daily mail report" email which look like this:

"2009-09-17 00:00:04 bounced (mail for localhost.localdomain loops back to myself) from=zimbra@localhost.localdomain to=zimbra@localhost.localdomain"

Notably each entry is exactly ten minutes apart and go all day.

I am guessing there is a report or an error being sent automatically to zimbra@localhost.localdomain but since that doesn't exist we get the bounce.

What could it be?

Thanks in advance.

Guy
Reply With Quote
  #2 (permalink)  
Old 09-19-2009, 01:57 AM
Outstanding Member
 
Posts: 594
Default

These are zmlocalconfig smtp addresses:-

smtp_destination = admin@toi-store.in.zimbra.com
smtp_source = admin@toi-store.in.zimbra.com

zmdailyreport in crontab sends mail to these id's. You need to change it to some existing user say admin account.
Reply With Quote
  #3 (permalink)  
Old 09-21-2009, 01:22 AM
Member
 
Posts: 11
Default

Quote:
Originally Posted by veronica View Post
These are zmlocalconfig smtp addresses:-

smtp_destination = admin@toi-store.in.zimbra.com
smtp_source = admin@toi-store.in.zimbra.com

zmdailyreport in crontab sends mail to these id's. You need to change it to some existing user say admin account.
Hi Veronica,

Good point but I have already set these to the correct email address and am receiving the daily report just fine. Its the content of the report thats confusing me. Something is emailing zimbra@locahost.localdomain every 10 minutes - 24/7.

Does anyone know what could be set to run every 10 minutes?

I can't see anything in the crontab.

Thanks,
Guy
Reply With Quote
  #4 (permalink)  
Old 10-02-2009, 05:20 AM
Member
 
Posts: 12
Default

I am getting these as well but was able to direct them to an email account. They seem to be disk free checks with permission denied. Anyone know how to fix it. The message is as follows:

From: root@mydomain.com (Cron Daemon)
To: zimbra@mail.mydomain.com
Subject: Cron <zimbra@mail> /opt/zimbra/libexec/zmdisklog

df: `/dev/sda2': Permission denied
df: `/dev/mapper/LVG00-zimbra': Permission denied
df: `/dev/sda1': Permission denied
Reply With Quote
  #5 (permalink)  
Old 10-02-2009, 06:18 AM
Member
 
Posts: 11
Default

Quote:
Originally Posted by zmailcc View Post
I am getting these as well but was able to direct them to an email account. They seem to be disk free checks with permission denied. Anyone know how to fix it. The message is as follows:

From: root@mydomain.com (Cron Daemon)
To: zimbra@mail.mydomain.com
Subject: Cron <zimbra@mail> /opt/zimbra/libexec/zmdisklog

df: `/dev/sda2': Permission denied
df: `/dev/mapper/LVG00-zimbra': Permission denied
df: `/dev/sda1': Permission denied
Ok. I have got somewhere now. Thanks for your input zmailcc.

If you look at zmdisklog cron job fails after upgrade to RHAS5.4 this has something to do with upgrading a RHEL64 to 5.4...

As suggested in the thread above I have commented out lines 81-83 of the /opt/zimbra/libexec/zmdisklog script.

I will post back and let you know if it works or not.

Thanks.
Reply With Quote
  #6 (permalink)  
Old 10-02-2009, 06:21 AM
Member
 
Posts: 11
Default

Furthermore I have now spotted the job in crontab (not sure why I missed it frst time!)...

*/10 * * * * /opt/zimbra/libexec/zmdisklog

I still don't understand why I don't get the actual emails.
Reply With Quote
  #7 (permalink)  
Old 10-02-2009, 07:52 AM
Member
 
Posts: 12
Default

Quote:
Originally Posted by cubittech View Post
Furthermore I have now spotted the job in crontab (not sure why I missed it frst time!)...

*/10 * * * * /opt/zimbra/libexec/zmdisklog

I still don't understand why I don't get the actual emails.
Thanks cubittech. I had recently upgraded to RHEL 5.4. I tried the sudo fix and it solved the problem for me.

The reason the actual emails do not come through for you may have to do with how cron is sending them. Since the job is run as the user zimbra. The cron daemon is invoking sendmail -t to submit the emails to zimbra without specifying a domain. New versions of sendmail use the “submit.cf” configuration file when it is invoked as a mail submission program (MSP) with the “-t” switch. With the default submit.cf, email addresses are rewritten to go to the local domain e.g. zimbra@localhost.localdomain. It also bypasses sendmail's alias file.

For it to reach a Zimbra account, it must be sent to zimbra@mydomain.com, where mydomain.com is a Zimbra hosted domain and zimbra is an account or alias in the domain.

I noticed this problem when email from logwatch sent to root stopped going to an account in Zimbra somewhere around RHEL4. You might be able to fix it with an explicit MAILTO in the crontab file. I used a more global fix to get the logwatch emails that involved changing submit.cf. I can post the changes for submit.cf if you want to try that.
Reply With Quote
  #8 (permalink)  
Old 10-02-2009, 08:35 AM
Member
 
Posts: 11
Default

Quote:
Originally Posted by zmailcc View Post
Thanks cubittech. I had recently upgraded to RHEL 5.4. I tried the sudo fix and it solved the problem for me.

The reason the actual emails do not come through for you may have to do with how cron is sending them. Since the job is run as the user zimbra. The cron daemon is invoking sendmail -t to submit the emails to zimbra without specifying a domain. New versions of sendmail use the “submit.cf” configuration file when it is invoked as a mail submission program (MSP) with the “-t” switch. With the default submit.cf, email addresses are rewritten to go to the local domain e.g. zimbra@localhost.localdomain. It also bypasses sendmail's alias file.

For it to reach a Zimbra account, it must be sent to zimbra@mydomain.com, where mydomain.com is a Zimbra hosted domain and zimbra is an account or alias in the domain.

I noticed this problem when email from logwatch sent to root stopped going to an account in Zimbra somewhere around RHEL4. You might be able to fix it with an explicit MAILTO in the crontab file. I used a more global fix to get the logwatch emails that involved changing submit.cf. I can post the changes for submit.cf if you want to try that.
Strange thing is that I am getting logwatch and daily mail report etc ... just not these zmdisklog messages.

If you could post your changes that would certainly be useful. Thanks.
Reply With Quote
  #9 (permalink)  
Old 10-03-2009, 04:35 PM
Member
 
Posts: 12
Default

Quote:
Originally Posted by cubittech View Post
Strange thing is that I am getting logwatch and daily mail report etc ... just not these zmdisklog messages.

If you could post your changes that would certainly be useful. Thanks.
You can test to see if my submit.cf changes might help by using the Linux mail command to send an email to zimbra. Make sure you have an email account or alias configured in Zimbra to receive email sent to zimbra. Log on to your mail server and su - zimbra. Use the mail command to send a test message:

[root@mail ~]# su - zimbra
[zimbra@mail ~]$ mail zimbra
Subject: test to zimbra from zimbra
test
.
Cc:

[zimbra@mail ~]$


Check the zimbra mailbox to see if it came through. If not, then changing submit.cf may help.

Change directory to /usr/share/sendmail-cf/cf and edit submit.mc to masquerade as the domain mydomain.com where mydomain.com is a domain you are hosting with Zimbra. If the directory /usr/share/sendmail-cf is missing you need to install the sendmail-cf rpm. You might want to backup the submit.mc and submit.cf files in case something goes wrong.

[root@mail ~]# cd /usr/share/sendmail-cf/cf
[root@mail cf]#


Edit submit.mc and add the lines shown in bold. It should look something like this.

divert(-1)
#
# Copyright (c) 2001-2003 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#

#
# This is the prototype file for a set-group-ID sm-msp sendmail that
# acts as a initial mail submission program.

divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`linux setup')dnl
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
define(`confPID_FILE', `/var/run/sm-client.pid')dnl
dnl define(`confDIRECT_SUBMISSION_MODIFIERS',`C')dnl
FEATURE(`use_ct_file')dnl
dnl
dnl masquerade as the email domain
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`masquerade_envelope')dnl
dnl the following should be set to a domain hosted by this server
MASQUERADE_AS(`mydomain.com')dnl
dnl

dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
FEATURE(`msp', `[127.0.0.1]')dnl


You can now build submit.cf
[root@mail cf]# ./Build submit.cf

Copy submit.cf and submit.mc to /etc/mail
[root@mail cf]# cp submit.cf /etc/mail/.
[root@mail cf]# cp submit.mc /etc/mail/.


Run the mail test again and this time it should work.
Reply With Quote
  #10 (permalink)  
Old 10-05-2009, 05:21 AM
Member
 
Posts: 11
Default

Quote:
Originally Posted by zmailcc View Post
You can test to see if my submit.cf changes might help by using the Linux mail command to send an email to zimbra. Make sure you have an email account or alias configured in Zimbra to receive email sent to zimbra. Log on to your mail server and su - zimbra. Use the mail command to send a test message:

[root@mail ~]# su - zimbra
[zimbra@mail ~]$ mail zimbra
Subject: test to zimbra from zimbra
test
.
Cc:

[zimbra@mail ~]$


Check the zimbra mailbox to see if it came through. If not, then changing submit.cf may help.

Change directory to /usr/share/sendmail-cf/cf and edit submit.mc to masquerade as the domain mydomain.com where mydomain.com is a domain you are hosting with Zimbra. If the directory /usr/share/sendmail-cf is missing you need to install the sendmail-cf rpm. You might want to backup the submit.mc and submit.cf files in case something goes wrong.

[root@mail ~]# cd /usr/share/sendmail-cf/cf
[root@mail cf]#


Edit submit.mc and add the lines shown in bold. It should look something like this.

divert(-1)
#
# Copyright (c) 2001-2003 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
#

#
# This is the prototype file for a set-group-ID sm-msp sendmail that
# acts as a initial mail submission program.

divert(0)dnl
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`linux setup')dnl
define(`confCF_VERSION', `Submit')dnl
define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
define(`confTIME_ZONE', `USE_TZ')dnl
define(`confDONT_INIT_GROUPS', `True')dnl
define(`confPID_FILE', `/var/run/sm-client.pid')dnl
dnl define(`confDIRECT_SUBMISSION_MODIFIERS',`C')dnl
FEATURE(`use_ct_file')dnl
dnl
dnl masquerade as the email domain
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`masquerade_envelope')dnl
dnl the following should be set to a domain hosted by this server
MASQUERADE_AS(`mydomain.com')dnl
dnl

dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
FEATURE(`msp', `[127.0.0.1]')dnl


You can now build submit.cf
[root@mail cf]# ./Build submit.cf

Copy submit.cf and submit.mc to /etc/mail
[root@mail cf]# cp submit.cf /etc/mail/.
[root@mail cf]# cp submit.mc /etc/mail/.


Run the mail test again and this time it should work.
Thanks. This sent me down a few roads. I soon realised that the mail command wasn't working to any address!

Eventually I solved the issue by symlinking /user/sbin/sendmail to /opt/zimbra/postfix/sbin/sendmail as I realised that sendmail was not working at all on my system.

Although you could do it manually by issuing:
ln -s /opt/zimbra/postfix/sbin/sendmail /usr/sbin/sendmail


but I actually used the "update-alternatives" command like so:
update-alternatives --install /usr/sbin/sendmail mta /opt/zimbra/postfix/sbin/sendmail 90

So now I can send stuff using the mail command but not to "zimbra". However, on my RHEL5.4 64bit server I don't have a folder called /usr/share/sendmail-cf/cf so I'm a bit uncertain what to do next :-)
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.