Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with internal mails, when exim is executed from within a directory that doesnt exist anymore #965

Closed
iLogge opened this issue Nov 29, 2016 · 3 comments

Comments

@iLogge
Copy link

iLogge commented Nov 29, 2016

Operating System (OS/VERSION):

debian 8

VestaCP Version:

latest, Vesta 0.9.8-17

Installed Software (what you got with the installer):

apache only, but rest is pretty default (exim, dovecot etc)

Steps to Reproduce:

open "v-back-user" shell script file and add:

pwd
cd /backup
pwd

before:

cat $BACKUP/$user.log |$SENDMAIL -s "$subj" $email $notify

then run a backup from the panel and you will see something like:

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

inside the vestacp backup.log. and since the tmp directory doesnt exist anymore, when sendmail is called, exim fails and doesnt send any mail:

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

Related Issues/Forum Threads:

https://forum.vestacp.com/viewtopic.php?f=41&t=13214

Other Notes:

there might be also other occasions, where this error is true, not only for the backup script
(cron, restore, etc..)

@Skamasle
Copy link
Collaborator

Is common linux warning if dir not exists then return warning and something not working, maybe good idea add some test to check if dir exists before do something.

@iLogge
Copy link
Author

iLogge commented Dec 1, 2016

its actually enough to just ad an "cd /backup" in front of every direct sendmail occasion from the console.
i changed it allready on my server, but those edits are not update-proof, as long as vesta not add those checks :)

@dpeca
Copy link
Collaborator

dpeca commented Apr 11, 2017

Fixed - 930a2a8

@dpeca dpeca closed this as completed Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants