[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with cron jobs



Thank you Charles, for your useful guides.

Charles Cazabon <search-web-for-address@xxxxxxxxxx>
wrote:
mozafar rowshan wrote:
>
> I checked my cron jobs after installing qmail (netqmail version) and created a sample job in the /var/spool/crond/root (and also /etc/crontab) file:
>
> * * * * * echo "message from crond"
>
> after that, my cron log file told the following message (every minute):
>
> Dec 5 12:19:01 cp crond[5404]: (root) CMD (echo "message from crond")
> Dec 5 12:19:01 cp crond[5403]: (root) MAIL (mailed NN bytes of output but got status 0x006f )

Your cron is probably calling the qmail sendmail wrapper; it's exiting 111,
which indicates one of a number of errors. The likely ones are that it's
unable to switch to the proper qmail directory, or it's unable to run
qmail-inject.

How, exactly, did you install netqmail?

Is mail successfully received if you run it manually from a shell, like this:

/var/qmail/bin/sendmail root < /tmp/test-message.txt


(after putting some text in /tmp/test-message.txt)?

Is your /var partition mounted "noexec"?

> Is mail successfully received if you run it manually from a shell, like this:
 
> /var/qmail/bin/sendmail root < /tmp/test-message.txt

> (after putting some text in /tmp/test-message.txt)?

The message successfully received, only if I am root. For the mroshan user (that my root emails received by him through qmail root alias) , I got the following error:

spamc/qmail-spamc.c:98: 'execlp("qmail-queue", "qmail-queue", NULL)' failed: No such file or directory
qmail-inject: fatal: qq internal bug (#4.3.0)

Of course, I am running SpamAssassin and qmail-spamc calls qmail-queue after spam-related processing and the problem was that the qmail-queue was not in mroshan PATH. Thus, by creating a symlink to qmail-queue in /usr/bin, this problem was solevd and cron problem too!!! I am confused about this last point: Does this means that qmail-inject runs as receiving mroshan user?!!! the cron job runs as root and calls sendmail/qmail-inject as root and "delivers" email to mroshan... How including qmail-queue in the receiving  mroshan user solves the problem?!

I do apologize for my bad english. I hope that you understood me!

thank you again



Looking for last minute shopping deals? Find them fast with Yahoo! Search.