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

Error when doing email-manage.py -l #2

Open
lepasserby opened this issue Apr 5, 2016 · 3 comments
Open

Error when doing email-manage.py -l #2

lepasserby opened this issue Apr 5, 2016 · 3 comments
Assignees
Labels

Comments

@lepasserby
Copy link

  1. I have nginx, not apache (and in fact plan to disable it and manage cli-only
  2. path is set correctly (email-manage.py does not throw path-related error)
  3. iRedMail-0.9.4

Trying to run
email-manage.py -l

gives

Domains
Traceback (most recent call last):
File "/usr/local/sbin/email-manage.py", line 456, in
search_database(args.domain, args.mailbox, args.search_string)
File "/usr/local/sbin/email-manage.py", line 82, in search_database
sql = "SELECT domain, description, transport, case when backupmx then 'yes' else 'no' end as 'Backup MX' FROM domain WHERE domain like '%" + search_string + "%'"
TypeError: cannot concatenate 'str' and 'bool' objects

@rvojcik
Copy link
Owner

rvojcik commented Apr 5, 2016

Thx for your report.

Yes your're right. It's bug in argument verification.
You have tu use -l option in combination with -s or -m

email-manage.py -l -s '%'

or

email-manage.py -l -m my@mailbox.tld

I'll fix it in new release

@rvojcik rvojcik added the bug label Apr 5, 2016
@rvojcik rvojcik self-assigned this Apr 5, 2016
@rvojcik rvojcik added this to the Bugs to next release milestone Apr 5, 2016
@alien4u
Copy link

alien4u commented Apr 21, 2017

I was able to fix this modifiying unicode(search_string).
Meaning replace every '%" + search_string + "%'" with '%" + unicode(search_string) + "%'"

Hope this help.

@bertalanimre
Copy link

So may I assume, this bug will never be fixed? :(

@rvojcik rvojcik removed this from the Bugs to next release milestone Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants