1 (edited by tungstenx 2018-01-19 20:12:51)

Topic: ImportError: No module named settings

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7 MYSQL edition
- Linux/BSD distribution name and version: Ubuntu 16.04.3 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Apache2
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

mod_wsgi (pid=19601, process='', application='mail.---.com|/iredadmin'): Loading WSGI script '/opt/www/iredadmin/iredadmin.py'.
mod_wsgi (pid=19601): Target WSGI script '/opt/www/iredadmin/iredadmin.py' cannot be loaded as Python module.
 mod_wsgi (pid=19601): Exception occurred processing WSGI script '/opt/www/iredadmin/iredadmin.py'.
 Traceback (most recent call last):
   File "/opt/www/iredadmin/iredadmin.py", line 9, in <module>
     from libs import iredbase
   File "/opt/www/iredadmin/libs/iredbase.py", line 18, in <module>
     import iredutils
   File "/opt/www/iredadmin/libs/iredutils.py", line 14, in <module>
     import settings
 ImportError: No module named settings

settings.py is in /opt/www/iredadmin/

Update:
I've installed this on a web server, virtual hosting a few sites and after fixing the changes iRedMail make to my conf, I had to manually wire up the mail.xyz.com address to point to  /opt/www/iredadmin/

Update 2:
So I've found a found another post and this is the result of the command for me:

$ sudo grep -i 'iredadmin' /etc/apache2/sites-enabled/xyz.com 
    Alias /iredadmin/static "/opt/www/iredadmin/static/"
    WSGIScriptAlias /iredadmin "/opt/www/iredadmin/iredadmin.py/"

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: ImportError: No module named settings

Please show us file permission of directories/files below:

ls -l /opt/www/
ls -l /opt/www/iredadmin/settings.py

3

Re: ImportError: No module named settings

Thank you for the response, below is the result of the ls commands:

$ ls -l /opt/www/
lrwxrwxrwx  1 root      root        22 Jan 18 18:04 iredadmin -> /opt/www/iRedAdmin-0.8
dr-xr-xr-x 10 iredadmin iredadmin 4096 Jan 19 15:01 iRedAdmin-0.8
lrwxrwxrwx  1 root      root        28 Jan 18 18:04 roundcubemail -> /opt/www/roundcubemail-1.3.0
drwxr-xr-x 13 root      root      4096 Jan 18 18:04 roundcubemail-1.3.0
-r-------- 1 iredadmin iredadmin 3713 Jan 18 18:04 /opt/www/iredadmin/settings.py

4

Re: ImportError: No module named settings

Owners and permissions are correct. No idea right now, direct ssh access is better for troubleshooting in this case if possible.