rvojcik / iredmail-cli Goto Github PK
View Code? Open in Web Editor NEWiRedMail CLI (MySQL Only), Command Line interface to iRedMail Open Source Email server solution
License: GNU General Public License v2.0
iRedMail CLI (MySQL Only), Command Line interface to iRedMail Open Source Email server solution
License: GNU General Public License v2.0
I was trying your script and got that error so I went to see what was going on because /usr/share/apache2/iredadmin was OK. I looked in libs/ and found that iredpwd lib is no longer in iRedAdmin libs (I suppose it's now merged in iredutils lib), so removed it and now it works great:
Line 334:
# Import some iRedMail libraries
import settings
from libs import iredutils
Is anybody there still? I wish to know how can I run the commands without a root user. With standard user, the command complains about the path (which is correct BTW) while if the same is done with sudo, then it works like a charm.
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
iRedMail v0.9.8, v0.9.1 (MySQL) Centos 7.5.1804
When trying to add a email via command line "ERROR: Error, email not added", the command line works fine for password changes, listing domains, adding a new domain.
but error comes when trying to add a new email
email-manage.py -a -d test.com
Domain added
email-manage.py -w -m [email protected]
ERROR: Mailbox [email protected] not exist
email-manage.py -a -m [email protected]
ERROR: Error, email not added
server works fine with iRedadmin, but only the command line is not working.
Looks like 0ef919e doesn't fix it completely, i get this error when i'm trying to get the list of aliases with em -l -s something
:
Aliases
Traceback (most recent call last):
File "/usr/local/bin/em", line 468, in <module>
search_database(args.domain, args.mailbox, args.search_string)
File "/usr/local/bin/em", line 92, in search_database
result = send_sql_query(db_vmail, sql)
File "/usr/local/bin/em", line 52, in send_sql_query
dbresult.execute(query)
File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1054, "Unknown column 'goto' in 'field list'")
Ability to delete some domain with everything.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.