1

Topic: ModuleNotFoundError: No module named 'settings'

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.4.0
- Deployed with iRedMail Easy or the downloadable installer? Download
- Linux/BSD distribution name and version: Debian 10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

When I try to run greylisting_admin.py or wblist_admin.py I get the following error on both. Running Python3 and python-webpy is installed from the repo.

Traceback (most recent call last):
  File "greylisting_admin.py", line 14, in <module>
    from libs import utils
  File "/root/iRedAPD-4.9/tools/../libs/utils.py", line 21, in <module>
    from libs.logger import logger
  File "/root/iRedAPD-4.9/tools/../libs/logger.py", line 4, in <module>
    import settings
ModuleNotFoundError: No module named 'settings'

----

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

2

Re: ModuleNotFoundError: No module named 'settings'

I noticed I was using 4.9 in that scenario (although I am on 5.0.1). I went into 5.0.1 /tools/ and get the same thing.

3

Re: ModuleNotFoundError: No module named 'settings'

Did you run it as root user or other user? You may not have permission to read iredapd config file.

4

Re: ModuleNotFoundError: No module named 'settings'

ZhangHuangbin wrote:

Did you run it as root user or other user? You may not have permission to read iredapd config file.

Root

5

Re: ModuleNotFoundError: No module named 'settings'

wylel wrote:

  File "/root/iRedAPD-4.9/tools/../libs/utils.py", line 21, in <module>

Ha, you're in wrong directory. Please run the script under /opt/iredapd/tools/, not /root/iRedAPD-4.9/tools/.

6

Re: ModuleNotFoundError: No module named 'settings'

Ha, you are right. Sorry about that!