Package: postfix-gld
Version: 1.7-9
Severity: important
X-Debbugs-Cc: sa...@gasmi.net,sanv...@debian.org
Tags: patch

Hello.

On a newly installed Debian 12 (bookworm) system, following the
indications in README.Debian leads to the following error message:

[...]
MariaDB [(none)]> USE gld;
Database changed
MariaDB [gld]> source /usr/share/gld/tables.mysql
ERROR 1071 (42000) at line 1 in file: '/usr/share/gld/tables.mysql': Specified 
key was too long; max key length is 1000 bytes
Query OK, 0 rows affected (0.006 sec)

and the greylist table is not created.

This happens because now the default character set is utf8mb4,
which supports up to four bytes per character.

I have been reading this:

https://en.wikipedia.org/wiki/Email_address

To summarize: The IDN standard performs a clever mangling of the domain names
so that it becomes ASCII before it's processed by tools like GLD.

For the local part of the address, wikipedia says that people "avoid
special characters to avoid the risk of rejected emails".

So, using "latin1", as in the attached patch, is probably enough
to fix the issue, but I'd like to hear from you. I plan to fix this
in stable as well, in some point release (Debian 12.x).

(Using X-Debbugs-Cc to reach the author).

Thanks.
--- a/postfix-gld-1.7/tables.mysql
+++ b/postfix-gld-1.7/tables.mysql
@@ -6,11 +6,11 @@ CREATE TABLE greylist (
   last int(11) NOT NULL default '0',
   n int(11) NOT NULL default '0',
   PRIMARY KEY  (ip,sender,recipient)
-) ENGINE=MyISAM COMMENT='greylist';
+) ENGINE=MyISAM CHARSET=latin1;
     
 
 CREATE TABLE whitelist (
   mail char(242) NOT NULL default '',
   comment char(242) NOT NULL default '',
   PRIMARY KEY  (mail)
-) ENGINE=MyISAM;
+) ENGINE=MyISAM CHARSET=latin1;

Reply via email to