We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Impossible to disable cron email notifications
Impossible to disable cron email notifications
Hello,
I'm using 0.9.8 (amd64) @ Debian 8.0
There are 3 users, in CRON tab of VestaCP the "disable notifications" clicked, i.e. they are promised to be disabled. Only one user (admin) has 1 cron task except standart VestaCP crons.
That's /home/admin/web/[DOMAIN]/cron.sh
The contents:
In lastcron.log there are only data, no error messages. At the same time, there is a FROZEN mail with recepient address username i.e. admin @ local.domain.internal (my host) in exim4 queue created each 15 minutes (the cron time):
The problem appeared when my account reputation at one famous mail sending service dropped below 50% due to this flood (percent of undelivered mails).
P.S. another strange thing is that
exim -bt [email protected] shows the transport = my smarthost, the
exim -bt [email protected] shows "is undeliverable: Unrouteable address" but still forwards it to smarthost...
I'm using 0.9.8 (amd64) @ Debian 8.0
There are 3 users, in CRON tab of VestaCP the "disable notifications" clicked, i.e. they are promised to be disabled. Only one user (admin) has 1 cron task except standart VestaCP crons.
That's /home/admin/web/[DOMAIN]/cron.sh
The contents:
Code: Select all
cd /home/admin/web/[DOMAIN]/public_html
/usr/bin/php cron.php > lastcron.log
Why the hell this message is sent? There is no e-mail address in the /var/spool/cron/crontabs/*MAIL-ID-HERE
PHP Notice: Undefined index: HTTP_HOST in /home/admin/web/[DOMAIN]/public_html/cron.php on line 229
PHP Notice: Undefined index: error in /home/admin/web/[DOMAIN]/public_html/cron.php on line 115
The problem appeared when my account reputation at one famous mail sending service dropped below 50% due to this flood (percent of undelivered mails).
P.S. another strange thing is that
exim -bt [email protected] shows the transport = my smarthost, the
exim -bt [email protected] shows "is undeliverable: Unrouteable address" but still forwards it to smarthost...
Re: Impossible to disable cron email notifications
add "> /dev/null 2>&1" to your cron job, this will prevent any output. If you have output, a email will be sent, if you tuck turn off notifications, the value mailto will be set to null - this prevents all mails and is nit a good jdea to set in admin user. also please do not run any websites under the admin user, admin user has sudo / root rights - better is to create a own user without sudo rights.
Re: Impossible to disable cron email notifications
Thank you for reply. I will move website to another user.
In any case, if I switched off notifications in VestaCP and the mail address disappeared from crontab file, I expected not to receive any mail with cron output or error messages, but I receive it. Is it a bug or feature?
In any case, if I switched off notifications in VestaCP and the mail address disappeared from crontab file, I expected not to receive any mail with cron output or error messages, but I receive it. Is it a bug or feature?
Re: Impossible to disable cron email notifications
i think its not a good idea to disable notifications in admin user, based on the existing jobs - there you want to know if something is not working. better switch to another user and disable there the notification, should work, will set mailto='' in users cron.Messiah wrote:Thank you for reply. I will move website to another user.
In any case, if I switched off notifications in VestaCP and the mail address disappeared from crontab file, I expected not to receive any mail with cron output or error messages, but I receive it. Is it a bug or feature?
Re: Impossible to disable cron email notifications
The reason is that admin user cron jobs flood my mailbox.
Not enough disk space to run backup
Error: Connection to localhost failed
etc. Sometimes 10-20 messages per day.
Not enough disk space to run backup
Error: Connection to localhost failed
etc. Sometimes 10-20 messages per day.
Re: Impossible to disable cron email notifications
so you dont think you need this emails? maybe for fixing the different, important problems? Or do you dont need the server? Then I would better take him down...Messiah wrote:The reason is that admin user cron jobs flood my mailbox.
Not enough disk space to run backup
Error: Connection to localhost failed
etc. Sometimes 10-20 messages per day.
or let me explain this with another situation: If your fire alarm rings, because your house burns, you will now disable the siren and go back to sleep?
Re: Impossible to disable cron email notifications
Hi,
The system sends email "Not enough disk space to run backup" when there are few gigabytes of free space that are enough to save few archives. As for "Error: Connection to localhost failed" and some strange DNS errors like can't resolve domain ip address (of the domain hosted on THIS VPS) - I can't understand the reason of them at all, the apache ang nginx has 100% uptime, dns is not used (all domains are set up on external DNS like registrar or CloudFlare).
The system sends email "Not enough disk space to run backup" when there are few gigabytes of free space that are enough to save few archives. As for "Error: Connection to localhost failed" and some strange DNS errors like can't resolve domain ip address (of the domain hosted on THIS VPS) - I can't understand the reason of them at all, the apache ang nginx has 100% uptime, dns is not used (all domains are set up on external DNS like registrar or CloudFlare).