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.
Problem with "internal" mails (crontab,backup...)
Problem with "internal" mails (crontab,backup...)
hello.
when i create backups, the process works, but the status-email wont get sent.
this is how my backup-log looks in the end:
i also noticed that the server is running about a week and i never got a single cron notification mail.
so i guess its broken there too, but theres not log for it. (notificatiosn are turned on)
BUT, when i create new users, those emails are sent and recieved. no problems there!
is sending vestacp also mails when it is updating itself?! or any more situations which i could test?
thanks!
when i create backups, the process works, but the status-email wont get sent.
this is how my backup-log looks in the end:
Code: Select all
2016-11-27 20:50:02 Size: 1 Mb
2016-11-27 20:50:02 Runtime: 1 minute
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
exim: can't get the current working directory: No such file or directory
so i guess its broken there too, but theres not log for it. (notificatiosn are turned on)
BUT, when i create new users, those emails are sent and recieved. no problems there!
is sending vestacp also mails when it is updating itself?! or any more situations which i could test?
thanks!
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Problem with "internal" mails (crontab,backup...)
Please Please Please state your OS and version when reporting a problem. If it is Ubuntu, I guess this can be problem with $VESTA global variable not populated as @ScIT reported in the other thread here Can't login to vesta after upgrade to V17
Re: Problem with "internal" mails (crontab,backup...)
i am using debian 8 & "echo $VESTA" replies: "/usr/local/vesta"
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Problem with "internal" mails (crontab,backup...)
do echo as user "admin" or the VestaCP user you are using to make sure the value is there
so su as the user and then echo
I found some similar threads that may help
viewtopic.php?t=9401
viewtopic.php?f=10&t=6651&start=10#p26993
I also suggest you
Delete /usr/local/vesta/data/queue/backup.pipe
Truncate your /usr/local/vesta/log/backup.log
then reboot your server once to see if the problem persists when you run a backup. Tail /usr/local/vesta/log/backup.log for fresh errors
so su as the user and then echo
I found some similar threads that may help
viewtopic.php?t=9401
viewtopic.php?f=10&t=6651&start=10#p26993
I also suggest you
Delete /usr/local/vesta/data/queue/backup.pipe
Truncate your /usr/local/vesta/log/backup.log
then reboot your server once to see if the problem persists when you run a backup. Tail /usr/local/vesta/log/backup.log for fresh errors
Re: Problem with "internal" mails (crontab,backup...)
hey. thanks for your help, but i didnt get it working yet.
i did "su admin", which didnt work first, because i had the chroot settings wrong.
after allowing admin to login and echo vesta, it gives me the same replie as root:
/usr/local/vesta
i checked the pages you linked, but i didnt really understand that mysql problem.
looking at my sql or backup log doesnt show me any mysql-errors like those.
also i unziped the backup and all files are there and not corrupted.
its really just the mail, which wont get send, in the end.
any more ideas plz?!
i did "su admin", which didnt work first, because i had the chroot settings wrong.
after allowing admin to login and echo vesta, it gives me the same replie as root:
/usr/local/vesta
i checked the pages you linked, but i didnt really understand that mysql problem.
looking at my sql or backup log doesnt show me any mysql-errors like those.
also i unziped the backup and all files are there and not corrupted.
its really just the mail, which wont get send, in the end.
any more ideas plz?!
Re: Problem with "internal" mails (crontab,backup...)
if it helps, i can share some of my research facts.
the part where user gets created inside vesta and then get mailed the details, looks like this:
/usr/local/vestacp/web/add/user/index.php
this code works. but i cant find any web files about adding/creating backups.
the only code about it, is directly inside the bash script:
/usr/local/vestacp/bin/v-backup-user
this above code looks like its not working. when i temporary remove this line, there are no more errors in the log!
(but of course also no mail)
dunno if that helped...
*edit* sending mails with sendmail from console works, when i tried it manually.
the part where user gets created inside vesta and then get mailed the details, looks like this:
/usr/local/vestacp/web/add/user/index.php
Code: Select all
// Send email to the new user
if ((empty($_SESSION['error_msg'])) && (!empty($v_notify))) {
$to = $_POST['v_notify'];
$subject = _translate($_POST['v_language'],"Welcome to Vesta Control Panel");
$hostname = exec('hostname');
unset($output);
$from = _translate($_POST['v_language'],'MAIL_FROM',$hostname);
if (!empty($_POST['v_fname'])) {
$mailtext = _translate($_POST['v_language'],'GREETINGS_GORDON_FREEMAN',$_POST['v_fname'],$_POST['v_lname']);
} else {
$mailtext = _translate($_POST['v_language'],'GREETINGS');
}
$mailtext .= _translate($_POST['v_language'],'ACCOUNT_READY',$_SERVER['HTTP_HOST'],$_POST['v_username'],$_POST['v_password']);
send_email($to, $subject, $mailtext, $from);
}
the only code about it, is directly inside the bash script:
/usr/local/vestacp/bin/v-backup-user
Code: Select all
cat $BACKUP/$user.log |$SENDMAIL -s "$subj" $email $notify
(but of course also no mail)
dunno if that helped...
*edit* sending mails with sendmail from console works, when i tried it manually.
Re: Problem with "internal" mails (crontab,backup...)
further reasearch brought me to this:
and its definitly the problem, because this directory doesnt exist anymore at the moment,
when sendmail command is executed.
adding a "cd /backup" before the sendmail command then finally fixed it :-)
i am going to report this to the bugtracker now!
https://github.com/serghey-rodin/vesta/issues/965
addin a "pwd" command in the shell script before the sendmail command, returns this:This error is usually caused by running a command from a directory that no longer exist.
Try changing your directory and re-run the command.
Code: Select all
/backup/tmp.CkmYvp4pdN
when sendmail command is executed.
adding a "cd /backup" before the sendmail command then finally fixed it :-)
2016-11-29 15:05:01 Local: /backup/admin.2016-11-29.tar
2016-11-29 15:05:01 Size: 1 Mb
2016-11-29 15:05:01 Runtime: 1 minute
/backup/tmp.XeVtfBjspX
/backup
i am going to report this to the bugtracker now!
https://github.com/serghey-rodin/vesta/issues/965
-
- Support team
- Posts: 1096
- Joined: Sat Sep 06, 2014 9:58 pm
- Contact:
- Os: Debian 8x
- Web: apache + nginx
Re: Problem with "internal" mails (crontab,backup...)
may be silly... but did you check you SPAM folder of your mailbox ? maybe the mail is being stuck there.
Also invesitgate youe EXIM queue, see if the mails are frozen there.
Exim -bp to check mailqueue
then spot the mails if they are stuck in the queue
check Exim Cheatsheet
Also invesitgate youe EXIM queue, see if the mails are frozen there.
Exim -bp to check mailqueue
then spot the mails if they are stuck in the queue
check Exim Cheatsheet