I'm running xmail 1.26 on centos. Everything is working fine except getting email from cron for jobs that output stuff (I am getting the daily logwatch which contains the jobs ran and "MAIL sending errors X Time(s)", where X varies (today, that X is going to be very high))
the xmail sendmail replacement is setup according to docs (AFAIK) and looks like this:
Code:
[root@Impuls pinger]# ll /usr/lib/sendmail
lrwxrwxrwx 1 root root 30 Jan 21 2010 /usr/lib/sendmail -> /etc/alternatives/mta-sendmail
[root@Impuls pinger]# ll /etc/alternatives/mta-sendmail
lrwxrwxrwx 1 root root 26 Jun 9 2010 /etc/alternatives/mta-sendmail -> /usr/lib/sendmail.sendmail
[root@Impuls pinger]# ll /usr/lib/sendmail.sendmail
lrwxrwxrwx 1 root root 16 Jun 9 2010 /usr/lib/sendmail.sendmail -> ../sbin/sendmail
[root@Impuls pinger]# ll /usr/sbin/sendmail
lrwxrwxrwx 1 root root 27 Jan 30 2010 /usr/sbin/sendmail -> /usr/sbin/sendmail.xmail.sh
[root@Impuls pinger]# ll /usr/sbin/sendmail.xmail.sh
-rwxr-xr-x 1 root root 132 Jan 19 2006 /usr/sbin/sendmail.xmail.sh
[root@Impuls pinger]# ll /usr/sbin/sendmail.xmail
-rwsr-sr-x 1 root root 18484 Jan 30 2010 /usr/sbin/sendmail.xmail (note the +s is in place as needed)
[root@Impuls pinger]# ll /var/MailRoot/bin/sendmail
-rwxr-xr-x 1 root root 14324 Jan 30 2010 /var/MailRoot/bin/sendmail
the sendmail.xmail script looks like this:
Code:
[root@Impuls pinger]# cat /usr/sbin/sendmail.xmail.sh
#!/bin/sh
export DEFAULT_DOMAIN="ciuly.com"
if [ -z $MAIL_ROOT ]; then
export MAIL_ROOT=/var/MailRoot
fi
/usr/sbin/sendmail.xmail $*
[root@Impuls pinger]#
now, when the cron runs the job (it's just a script that verifies if the actual job is running and if not it starts it, outputting that it did so), things will look like this (pstree output):
Code:
[root@Impuls pinger]# ps -Af | grep ping
root 15141 15140 0 00:11 ? 00:00:00 [gpinger.chk] <defunct>
root 15150 1 0 00:11 ? 00:00:00 /usr/bin/php /www/pinger/pinger.php 1
root 15163 15162 0 00:12 ? 00:00:00 [ipinger.chk] <defunct>
root 15172 1 0 00:12 ? 00:00:00 /usr/bin/php /www/pinger/pinger.php 2
more
Code:
root 30465 2558 0 04:21 ? 00:00:00 crond
root 30466 30465 0 04:21 ? 00:00:00 [gpinger.chk] <defunct>
root 30473 30465 0 04:21 ? 00:00:00 /bin/sh /usr/sbin/sendmail -FCronDaemon -i -odi -oem -oi -t
cron log on system says something like this:
Code:
Jun 16 08:00:11 Impuls crond[1001]: (root) MAIL (mailed 514 bytes of output but got status 0x0007 )
the sent bytes varies depending on which script generates the error.
I couldn't find what the 0x0007 error code means.
any ideas why the sendmail from cron is freezed/failed?
thanks.