Comments (7)
Hi, unfortunately it seems to be a MySQL+InnoDB limitation (according to http://south.aeracode.org/ticket/39 and http://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes.
I suggest you try this workaround: http://mechanics.flite.com/blog/2014/07/29/using-innodb-large-prefix-to-avoid-error-1071/.
Please tell me if it works.
from modoboa-postfix-autoreply.
@msenebald ping
from modoboa-postfix-autoreply.
Hi,
sorry for the delay. I tried the workaround, but without success.
Since i am not so familiar with django, i a not sure how to get the sql code that is generated by the migration.
What I did, I removed the index option in the migration "db_index=True" from:
migrations/0002_auto_20150728_1236.py
field=models.CharField(max_length=300, db_index=True),
it happily upgrades the rest. But now without index.
I use mariadb 5.5.44 from official centos 7 repo.
from modoboa-postfix-autoreply.
Have you tried to recreate indexes after the migration ?
from modoboa-postfix-autoreply.
This can be solved by changing max_length to 253, which would seem sensible since domain names cannot acceptably exceed 253 characters in any case.
from modoboa-postfix-autoreply.
The workaround you've noted ( large prefix ) only works with an additional two steps:
- The server is setup to use Barracuda ( default is Antelope because backwards compat. )
- The table row is setup to use the right
ROW_FORMAT
.
The second issue is generally what gets people. It's easy enough to switch over to Barracuda, but the ROW_FORMAT
option needs to be specified depending on your server setup. The default ROW_FORMAT
is usually set to COMPACT
( even my latest edition install of MariaDB 10.1 was set to COMPACT
); you need to append the ROW_FORMAT=DYNAMIC;
or whatever you want to use to the actual CREATE
line, like so:
CREATE TABLE `postfix_autoreply_transport` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`domain` varchar(300) NOT NULL,
`method` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
Or change your ROW_FORMAT=DEFAULT
option to use DYNAMIC
instead of REDUNDANT
or COMPACT
if you'd rather not deal. COMPRESSED
cannot be set globally. ( Edit to note: This is only present in really really new versions. You probably don't have it - I don't. Explicitly setting the option is the only way atm ).
For more information about ROW_FORMAT
see the manual.
from modoboa-postfix-autoreply.
Perfect. Thanks for your help @tonioo !
from modoboa-postfix-autoreply.
Related Issues (20)
- Error autoreply
- Date macro HOT 3
- Auto Reply Error & return to sender HOT 9
- Python 3 compatibility
- Autoreply only for direct message and not alias HOT 1
- Problem with modoboa-postfix-autoreply HOT 4
- Autoreply error HOT 1
- autoreply and API HOT 6
- Make use of the new global transport table
- [Version 1.5.0] Problem of lookup with SQL table HOT 1
- Add /api/v1/armessages/?mailbox=
- Date format for fromdate and untildate in api/v1/armessages
- Calendar in auto-reply don't work with admin HOT 2
- autoreply /api/v1/armessages/[email protected] no longer works HOT 5
- Autoreply doesnt work HOT 9
- Autoreply error HOT 1
- Autoreply bounce - gmail and msn
- Autoreply error (Header values can't contain newline) HOT 4
- Possibility to have HTML in content
- More control over the subject
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modoboa-postfix-autoreply.