1

Topic: migrate from cluebirger to iredapd

==== Required information ====
- iRedMail version (check /etc/iredmail-release): iredapd 1.8.0
- Linux/BSD distribution name and version: freebsd
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====
im doing this: http://www.iredmail.org/docs/cluebringe … edapd.html

[root@ns352115 /usr/local/etc/dovecot]# python2 /opt/iredapd/tools/migrate_cluebringer_greylisting.py
Traceback (most recent call last):
  File "/opt/iredapd/tools/migrate_cluebringer_greylisting.py", line 30, in <module>
    from tools import debug, logger, get_db_conn
ImportError: cannot import name debug
[root@ns352115 /usr/local/etc/dovecot]# python2 /opt/iredapd/tools/migrate_cluebringer_throttle.py
Traceback (most recent call last):
  File "/opt/iredapd/tools/migrate_cluebringer_throttle.py", line 31, in <module>
    from tools import debug, logger, get_db_conn
ImportError: cannot import name debug

----

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

2 (edited by reno31 2016-01-28 00:02:20)

Re: migrate from cluebirger to iredapd

==== Required information ====
- iRedMail version (check /etc/iredmail-release): iredapd 1.8.0
- Linux/BSD distribution name and version: debian
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx):Apache
- Manage mail accounts with iRedAdmin-Pro? no
- Related log if you're reporting an issue: /
====

Same exact issue here

root@mail:/opt/iredapd/tools# python migrate_cluebringer_greylisting.py
Traceback (most recent call last):
  File "migrate_cluebringer_greylisting.py", line 32, in <module>
    from tools import debug, logger, get_db_conn
ImportError: cannot import name debug
root@mail:/opt/iredapd/tools# python migrate_cluebringer_throttle.py
Traceback (most recent call last):
  File "migrate_cluebringer_throttle.py", line 33, in <module>
    from tools import debug, logger, get_db_conn
ImportError: cannot import name debug

edit : required information added

3

Re: migrate from cluebirger to iredapd

Same exact setup here.

root@satyr:/opt/iredapd/tools# python migrate_cluebringer_greylisting.py
Traceback (most recent call last):
  File "migrate_cluebringer_greylisting.py", line 30, in <module>
    from tools import debug, logger, get_db_conn
ImportError: cannot import name debug

reno31 wrote:

==== Required information ====
- iRedMail version (check /etc/iredmail-release): iredapd 1.8.0
- Linux/BSD distribution name and version: debian
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx):Apache
- Manage mail accounts with iRedAdmin-Pro? no
- Related log if you're reporting an issue: /
====

Same exact issue here

root@mail:/opt/iredapd/tools# python migrate_cluebringer_greylisting.py
Traceback (most recent call last):
  File "migrate_cluebringer_greylisting.py", line 32, in <module>
    from tools import debug, logger, get_db_conn
ImportError: cannot import name debug
root@mail:/opt/iredapd/tools# python migrate_cluebringer_throttle.py
Traceback (most recent call last):
  File "migrate_cluebringer_throttle.py", line 33, in <module>
    from tools import debug, logger, get_db_conn
ImportError: cannot import name debug

edit : required information added

4

Re: migrate from cluebirger to iredapd

Please open this file, and replace "web.config.debug = debug" with:

web.config.debug = False

5

Re: migrate from cluebirger to iredapd

root@mail:/opt/iredapd/tools# grep web.config.debug migrate_cluebringer_*
migrate_cluebringer_greylisting.py:web.config.debug = False
migrate_cluebringer_throttle.py:web.config.debug = False
root@mail:/opt/iredapd/tools# python migrate_cluebringer_greylisting.py
Traceback (most recent call last):
  File "migrate_cluebringer_greylisting.py", line 32, in <module>
    from tools import debug, logger, get_db_conn
ImportError: cannot import name debug
root@mail:/opt/iredapd/tools# python migrate_cluebringer_throttle.py
Traceback (most recent call last):
  File "migrate_cluebringer_throttle.py", line 33, in <module>
    from tools import debug, logger, get_db_conn
ImportError: cannot import name debug

6

Re: migrate from cluebirger to iredapd

Original line:

from tools import debug, logger, get_db_conn

Please remove 'debug, ' in this line.

7

Re: migrate from cluebirger to iredapd

[root@ns352115 /opt/iRedAPD-1.8.0/tools]# python2 migrate_cluebringer_greylisting.py
Traceback (most recent call last):
  File "migrate_cluebringer_greylisting.py", line 30, in <module>
    from tools import debug, logger, get_db_conn
ImportError: cannot import name debug

8

Re: migrate from cluebirger to iredapd

Dear @dong,

Please read my previous reply (right above your post).

9

Re: migrate from cluebirger to iredapd

i do false and remove debug from line:

[root@ns352115 /opt/iRedAPD-1.8.0/tools]# python2 migrate_cluebringer_greylisting.py
* Backend: mysql
* Migrate global greylisting setting.
        - Query enabled global greylisting setting.
Traceback (most recent call last):
  File "migrate_cluebringer_greylisting.py", line 69, in <module>
    limit=1)
  File "/usr/local/lib/python2.7/site-packages/web/db.py", line 682, in select
    return self.query(qout, processed=True)
  File "/usr/local/lib/python2.7/site-packages/web/db.py", line 643, in query
    db_cursor = self._db_cursor()
  File "/usr/local/lib/python2.7/site-packages/web/db.py", line 566, in _db_cursor
    return self.ctx.db.cursor()
  File "/usr/local/lib/python2.7/site-packages/web/db.py", line 507, in _getctx
    self._load_context(self._ctx)
  File "/usr/local/lib/python2.7/site-packages/web/db.py", line 518, in _load_context
    ctx.db = self._connect(self.keywords)
  File "/usr/local/lib/python2.7/site-packages/web/db.py", line 546, in _connect
    return self.db_module.connect(**keywords)
  File "/usr/local/lib/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 193, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on '127.0.0.1' (61)")

10

Re: migrate from cluebirger to iredapd

Ok. I put corrent mysqldb account info in files:

[root@ns352115 /opt/iRedAPD-1.8.0/tools]# python2 migrate_cluebringer_greylisting.py
* Backend: mysql
* Migrate global greylisting setting.
        - Query enabled global greylisting setting.
        - Cluebringer has greylisting enabled globally.
        - iRedAPD already has global greylisting setting, not migrate Cluebringer global setting.
* Migrate per-domain and per-user no-greylisting settings.
        - Query no-greylisting settings
[root@ns352115 /opt/iRedAPD-1.8.0/tools]# python2 migrate_cluebringer_throttle.py
* Backend: mysql
No throttle settings found. Exit.

now is ok?

11

Re: migrate from cluebirger to iredapd

dong wrote:

now is ok?

Yes. no errors, output message looks fine. smile

12

Re: migrate from cluebirger to iredapd

Same here, issue fixed by removing debug