Comments (10)
It's installed explicitly into a virtualenv at
mailinabox/setup/management.sh
Line 46 in 162e509
mailinabox
should fix it. But in that issue, the backup command is invoked the wrong way, which probably explains the problem.from mailinabox.
In this case you should run /usr/local/lib/mailinabox/env/bin/pip list
That will use the mailinabox virtual environment
from mailinabox.
I had previously run curl -s https://mailinabox.email/setup.sh | sudo bash
and now ran mailinabox
as Josh suggested. Neither fixed the problem of the rtyaml module not being found. Running cd /root/mailinabox/management
then python3 backup.py
still returns ModuleNotFoundError: No module named 'rtyaml'
. Nevertheless, running /usr/local/lib/mailinabox/env/bin/pip list
confirms that the rtyaml module is installed in the virtualenv. For some reason, the rtyaml module in the virtualenv is not being found.
from mailinabox.
Don't put python3
in the command to start backup.py. Just give the path to the python script alone. It has a shebang line at the top to activate its virtualenv where its packages are installed.
from mailinabox.
I originally tried directly running backup.py
in the management directory without the python3
command which returns backup.py: command not found
even though running ls
confirms that the backup.py file is in the management directory. The only command line I tried that works properly is ~/mailinabox/management# /usr/local/lib/mailinabox/env/bin/python3 backup.py
which seems to indicate that the virtualenv is not being used unless the full path to python3 in the virtualenv is specified.
from mailinabox.
Did you run backup.py
or ./backup.py
?
The ./
makes a big difference! If you don't give your shell a path to find a command, it will first look at al the directories in the $PATH
variable, and if it doesn't find a command there, it will give up with command not found
.
from mailinabox.
I did run backup.py
which failed. Running ./backup.py
which specifies running from the current directory rather than the command search path does enable the shebang line in backup.py
to direct running python3 from the virtualenv. Thanks for the suggestion. I should have realized that the MiaB management directory is not in the default system command search path.
from mailinabox.
Could be a nice improvement, to add the MiaB management directory to the command search path. I'm going to make that customization.
from mailinabox.
I had the same thought about appending the MiaB management directory to the command search path. I created a file named “Mail-in-a-Box_management.sh” owned by 0:0 with mode 644 and saved it to the /etc/profile.d directory. This file contains:
# If a Mail-in-a-Box management directory exists
# then append it to the commamnd search path.
if [ -d "/root/mailinabox/management" ] ; then
PATH="$PATH:/root/mailinabox/management"
fi
This customization should be harmless because the default search path retains priority and no change is made to the search path unless the MiaB management directory exists. For an informative discussion of the ways to change the command search path see: https://askubuntu.com/questions/866161/setting-path-variable-in-etc-environment-vs-profile
from mailinabox.
I had the same thought about appending the MiaB management directory to the command search path. I created a file named “Mail-in-a-Box_management.sh” owned by 0:0 with mode 644 and saved it to the /etc/profile.d directory. This file contains:
If a Mail-in-a-Box management directory exists
then append it to the commamnd search path.
if [ -d "/root/mailinabox/management" ] ; then
PATH="$PATH:/root/mailinabox/management"
fiThis customization should be harmless because the default search path retains priority and no change is made to the search path unless the MiaB management directory exists. For an informative discussion of the ways to change the command search path see: https://askubuntu.com/questions/866161/setting-path-variable-in-etc-environment-vs-profile
I applied it as such on my box using Ansible.
from mailinabox.
Related Issues (20)
- When should a GitHub issue be opened for the Mail-in-a-Box project? HOT 3
- Better domain management HOT 5
- Upgrade PHP from v8.0 to v8.1
- Upgrade Nextcloud to latest v27 HOT 16
- Apply small Nextcloud upgrade to 26.0.13 HOT 1
- Empty email log scan HOT 2
- Problema no login box.mergenst.com/mail
- Mail-in-a-Box Version: v68 - Not Installing because of repositery error
- B2 Bucket using for Bucket throws error
- No password prompt during v69 install which causes install to quit HOT 4
- Fresh install does not load admin page HOT 7
- How do you add a second domain to this? HOT 6
- Updated to a new version, but still have an error on "System Status" page
- Status Checks errate version v69b HOT 2
- What does postfix config sqlite query do on mail.-users.sh line 118? HOT 1
- No backups shown in the admin interface and failing manually since new duplicity version has been installed HOT 12
- Spamhaus check on status page should separately check both IPv4 and IPv6 addresses HOT 1
- Question regarding smuggling protection in main.cf HOT 1
- Roundcube flaws allow easy email account compromise (CVE-2024-42009, CVE-2024-42008) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailinabox.