Hi, What is the correct procedure to use cronjobs for sending emails. With the package method installation of Koha 17.11.11 on Ubuntu 16.04 Server, postfix smtp setup has been done. I have a Koha instance called "igntucl" and koha user created as '"gntucl-koha" And cronjob entries are found in crontab.example @ * /usr/share/koha/bin/cronjobs* Should this be run as: crontab -u root crontab.example or crontab -u igntucl-koha crontab.example ? and crontab.example is edited for pointing to koha-conf.xml location export PERL5LIB=/usr/share/koha/lib export KOHA_CONF=/etc/koha/sites*/igntucl/*koha-conf.xml crontab -e (accessed from root user) shows __KOHA_USER__ $KOHA_CRON_PATH/ process_message_queue.pl But still I am getting error as: unable to locate Koha configuration file koha-conf.xml at /usr/share/koha/lib/C4/Context.pm line 243. Could you please explain what is correct way of enabling/ working with cron job for Koha? With Thanks Satish MV Librarian Govt. Engineering College, Hassan
On Fri, Feb 09, 2018 at 05:34:30PM +0530, SATISH wrote:
What is the correct procedure to use cronjobs for sending emails.
Please resend your message with all the typos removed -- it's very difficult to help when there are so many stray asterisks, quotes, etc. Paul. -- Paul Hoffman <paul@flo.org> Software Manager Fenway Library Organization 550 Huntington Ave. Boston, MA 02115 (617) 442-2384 (FLO main number)
Hi Paul, On 09-Feb-2018 7:49 PM, "Paul Hoffman" <paul@flo.org> wrote: On Fri, Feb 09, 2018 at 05:34:30PM +0530, SATISH wrote:
What is the correct procedure to use cronjobs for sending emails.
Please resend your message with all the typos removed -- it's very difficult to help when there are so many stray asterisks, quotes, etc. I find you reply to the OP objectionable. Satish is not a native speaker of English. Plus there are certain turns of phrase and writing styles that are Indian English. Just because these are different from what you are accustomed to, does not essentially make them wrong. Regards, Indranil. Paul. -- Paul Hoffman <paul@flo.org> Software Manager Fenway Library Organization 550 Huntington Ave. Boston, MA 02115 (617) 442-2384 (FLO main number) _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
I certainly didn't mean to be objectionable. Satish, if my message seemed harsh I am truly sorry. Indranil, I agree completely with your point that Indian English is no better or worse than other forms of English, e.g., my own American English, or any other language. Paul. On Fri, Feb 09, 2018 at 08:25:01PM +0530, Indranil Das Gupta wrote:
Hi Paul,
On 09-Feb-2018 7:49 PM, "Paul Hoffman" <paul@flo.org> wrote:
On Fri, Feb 09, 2018 at 05:34:30PM +0530, SATISH wrote:
What is the correct procedure to use cronjobs for sending emails.
Please resend your message with all the typos removed -- it's very difficult to help when there are so many stray asterisks, quotes, etc.
I find you reply to the OP objectionable.
Satish is not a native speaker of English.
Plus there are certain turns of phrase and writing styles that are Indian English.
Just because these are different from what you are accustomed to, does not essentially make them wrong.
Regards, Indranil.
Paul.
-- Paul Hoffman <paul@flo.org> Software Manager Fenway Library Organization 550 Huntington Ave. Boston, MA 02115 (617) 442-2384 (FLO main number) _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
-- Paul Hoffman <paul@flo.org> Software Manager Fenway Library Organization 550 Huntington Ave. Boston, MA 02115 (617) 442-2384 (FLO main number)
I have the same problema, my Koha 17.11 versión don't send emails. I was upgraded from 16.11 to 17.11 I was used this tutorial http://kohageek.blogspot.com/2017/05/configure-exim-with-gmail-to-send-notic... but I can't fix the problem. 2018-02-09 9:13 GMT-06:00 Paul Hoffman <paul@flo.org>:
I certainly didn't mean to be objectionable. Satish, if my message seemed harsh I am truly sorry.
Indranil, I agree completely with your point that Indian English is no better or worse than other forms of English, e.g., my own American English, or any other language.
Paul.
On Fri, Feb 09, 2018 at 08:25:01PM +0530, Indranil Das Gupta wrote:
Hi Paul,
On 09-Feb-2018 7:49 PM, "Paul Hoffman" <paul@flo.org> wrote:
On Fri, Feb 09, 2018 at 05:34:30PM +0530, SATISH wrote:
What is the correct procedure to use cronjobs for sending emails.
Please resend your message with all the typos removed -- it's very difficult to help when there are so many stray asterisks, quotes, etc.
I find you reply to the OP objectionable.
Satish is not a native speaker of English.
Plus there are certain turns of phrase and writing styles that are Indian English.
Just because these are different from what you are accustomed to, does not essentially make them wrong.
Regards, Indranil.
Paul.
-- Paul Hoffman <paul@flo.org> Software Manager Fenway Library Organization 550 Huntington Ave. Boston, MA 02115 (617) 442-2384 (FLO main number) _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
-- Paul Hoffman <paul@flo.org> Software Manager Fenway Library Organization 550 Huntington Ave. Boston, MA 02115 (617) 442-2384 (FLO main number) _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
Hi, 1) I removed all cron entries by crontab -r 2) did # sudo koha-shell igntucl ( as koha default user created by package installation) 3) crontab -e igntucl-koha crontab.example 4) manually did bin/process_message_queue.pl as (igntucl-koha) user 5) mail notices status changed to - sent 6) mail log for igntucl-koha user shows; root@testserver:/var/mail# tail -f igntucl-koha X-Cron-Env: <KOHA_CRON_PATH=/usr/share/koha/bin/cronjobs> X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/var/lib/koha/igntucl> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=igntucl-koha> Message-Id: <20180209112001.B9011120779@testserver.localdomain> Date: Fri, 9 Feb 2018 16:50:01 +0530 (IST) /bin/sh: 1: __KOHA_USER__: not found 7) koha installation has a public ip, and is it related to localdomain in the Message-Id. 8) manually did bin/process_message_queue.pl as root user. 9) mail notices status changed to - sent 10) but not received any mail to inbox 11) mail log shows: root@testserver:/var/mail# tail -f root BEGIN failed--compilation aborted at /usr/share/koha/lib/Koha/Config/SysPref.pm line 26. Compilation failed in require at /usr/share/koha/lib/C4/Context.pm line 105. BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Context.pm line 105. Compilation failed in require at /usr/share/koha/lib/C4/Members.pm line 25. BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Members.pm line 25. Compilation failed in require at /usr/share/koha/lib/C4/Letters.pm line 30. BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Letters.pm line 30. Compilation failed in require at /usr/share/koha/bin/cronjobs/ process_message_queue.pl line 28. BEGIN failed--compilation aborted at /usr/share/koha/bin/cronjobs/ process_message_queue.pl line 28. 13) should : __KOHA_USER__: to replaced as* root *or* igntucl-koha* 12) does it mean, a postfix issue?? expecting your thoughts!! Thanks & Regards Satish
If you are using packages, you want to do none of that. None at all. The packages put the cron jobs in place already. In /etc/cron.d/koha-common as well as cron.daily hourly etc You have now sadly made quite a mess. All you really needed to do with the packages is make sure your mta is set up then run sudo koha-email-enable instancename I don't know who told you to do it the way you have, but they are wrong. Chris On 10 February 2018 6:47:22 AM NZDT, SATISH <lis4satish@gmail.com> wrote:
Hi,
1) I removed all cron entries by crontab -r
2) did # sudo koha-shell igntucl ( as koha default user created by package installation)
3) crontab -e igntucl-koha crontab.example
4) manually did bin/process_message_queue.pl as (igntucl-koha) user
5) mail notices status changed to - sent
6) mail log for igntucl-koha user shows;
root@testserver:/var/mail# tail -f igntucl-koha X-Cron-Env: <KOHA_CRON_PATH=/usr/share/koha/bin/cronjobs> X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <HOME=/var/lib/koha/igntucl> X-Cron-Env: <PATH=/usr/bin:/bin> X-Cron-Env: <LOGNAME=igntucl-koha> Message-Id: <20180209112001.B9011120779@testserver.localdomain> Date: Fri, 9 Feb 2018 16:50:01 +0530 (IST)
/bin/sh: 1: __KOHA_USER__: not found
7) koha installation has a public ip, and is it related to localdomain in the Message-Id.
8) manually did bin/process_message_queue.pl as root user.
9) mail notices status changed to - sent
10) but not received any mail to inbox
11) mail log shows:
root@testserver:/var/mail# tail -f root BEGIN failed--compilation aborted at /usr/share/koha/lib/Koha/Config/SysPref.pm line 26. Compilation failed in require at /usr/share/koha/lib/C4/Context.pm line 105. BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Context.pm line 105. Compilation failed in require at /usr/share/koha/lib/C4/Members.pm line 25. BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Members.pm line 25. Compilation failed in require at /usr/share/koha/lib/C4/Letters.pm line 30. BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Letters.pm line 30. Compilation failed in require at /usr/share/koha/bin/cronjobs/ process_message_queue.pl line 28. BEGIN failed--compilation aborted at /usr/share/koha/bin/cronjobs/ process_message_queue.pl line 28.
13) should : __KOHA_USER__: to replaced as* root *or* igntucl-koha*
12) does it mean, a postfix issue??
expecting your thoughts!!
Thanks & Regards Satish _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Yes, I am using package method for installation. Now, removed all the crontab entries made by me. Since it was not delivering mails, I started working with cronjob and then to postfix. As you had mentioned, cron settings are already made with package installation, then I assume It must be with postfix issue now, However, I attached a screenshot for the test mail verification from postfix at https://ibb.co/gBHVOx Thank you all. Satish
Did you run the command to enable email? Chris On 10 February 2018 7:59:18 AM NZDT, SATISH <lis4satish@gmail.com> wrote:
Yes, I am using package method for installation.
Now, removed all the crontab entries made by me.
Since it was not delivering mails, I started working with cronjob and then to postfix.
As you had mentioned, cron settings are already made with package installation, then I assume
It must be with postfix issue now,
However, I attached a screenshot for the test mail verification from postfix at https://ibb.co/gBHVOx
Thank you all. Satish _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
And yes you will need to set up your mta to actually deliver mail. This is entirely separate to Koha though. Chris On 10 February 2018 7:59:18 AM NZDT, SATISH <lis4satish@gmail.com> wrote:
Yes, I am using package method for installation.
Now, removed all the crontab entries made by me.
Since it was not delivering mails, I started working with cronjob and then to postfix.
As you had mentioned, cron settings are already made with package installation, then I assume
It must be with postfix issue now,
However, I attached a screenshot for the test mail verification from postfix at https://ibb.co/gBHVOx
Thank you all. Satish _______________________________________________ Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz https://lists.katipo.co.nz/mailman/listinfo/koha
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
Hi
What is the correct procedure to use cronjobs for sending emails.
With the package method installation of Koha 17.11.11 on Ubuntu 16.04 Server, postfix smtp setup has been done. I have a Koha instance called igntucl-and koha user created as igntucl-koha as default.
And cronjob entries are found in crontab.example at * /usr/share/koha/bin/cronjobs*
Should this be run as:
crontab -u root crontab.example or crontab -u igntucl-koha crontab.example ?
and crontab.example is edited for pointing to the location of koha-conf.xml
export PERL5LIB=/usr/share/koha/lib export KOHA_CONF=/etc/koha/sites*/igntucl/*koha-conf.xml
crontab -e (accessed from root user) shows
__KOHA_USER__ $KOHA_CRON_PATH/ process_message_queue.pl
But still I am getting error as: unable to locate Koha configuration file koha-conf.xml at /usr/share/koha/lib/C4/Context.pm line 243.
Could you please explain what is correct way of enabling/ working with cron job for Koha?
participants (5)
-
Chris Cormack -
Indranil Das Gupta -
Paul Hoffman -
SATISH -
webmaster UVG Altiplano