1

Topic: Error when deleting alias

==== Provide required information to help troubleshoot and get quick answer ====
- Linux/BSD distribution name and version: FreeBSD 8.2
- iRedMail version and backend (LDAP/MySQL):DBMailAdmin-MySQL-1.0.1
- Any related log? Log is helpful for troubleshooting.
====

Hi, we are trying dbmailadmin and it really looks promising. We only got an error when deleting an alias under a domain. The following error occured:

Error: (1064, 'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'<sql: "(\'test@xxxx.xxx\')">\' at line 1')

There was no information in the logs and the record of the alias isn't deleted in dbmail_aliases_extra. Adding and editing an alias works.

2

Re: Error when deleting alias

It's a bug in DBMailAdmin-MySQL. Could you please try attached patch? Let me know whether it works for you or not.

Steps to apply it:

*) Download attached patch and upload to your server which has DBMailAdmin-MySQL-1.0.1 running. Assume it's /root/delete_alias.patch.

*) Backup file which will be patched:

# cp libs/dbmail_mysql/alias.py libs/dbmail_mysql/alias.py.bak

*) Verify patch with command 'patch --dry-run':

# patch --dry-run -p0 < /root/delete_alias.patch
patching file libs/dbmail_mysql/alias.py

*) If you got the SAME output as above sample, it's safe to apply it without '--dry-run':

# patch -p0 < /root/delete_alias.patch
Post's attachments

delete_alias.patch 852 b, 1 downloads since 2012-02-19 

You don't have the permssions to download the attachments of this post.

3

Re: Error when deleting alias

The patch solved the problem.

Before I am going to make an import script (for the 'extra' tables) I wonder if there is already one available?

4

Re: Error when deleting alias

thesvr wrote:

Before I am going to make an import script (for the 'extra' tables) I wonder if there is already one available?

Sorry, no.