1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-11-26 02:57:04 +00:00
mailinabox/setup
Joshua Tauberer 322a5779f1 store IDNs (internationalized domain names) in IDNA (ASCII) in our database, not in Unicode
I changed my mind. In 1bf8f1991f I allowed Unicode domain names to go into the database. I thought that was nice because it's what the user *means*. But it's not how the web works. Web and DNS were working, but mail wasn't. Postfix (as shipped with Ubuntu 14.04 without support for SMTPUTF8) exists in an ASCII-only world. When it goes to the users/aliases table, it queries in ASCII (IDNA) only and had no hope of delivering mail if the domain was in full Unicode in the database. I was thinking ahead to SMTPUTF8, where we *could* put Unicode in the database (though that would prevent IDNA-encoded addressing from being deliverable) not realizing it isn't well supported yet anyway.

It's IDNA that goes on the wire in most places anyway (SMTP without SMTPUTF8 (and therefore how Postfix queries our users/aliases tables), DNS zone files, nginx config, CSR 'CN' field, X509 Common Name and Subject Alternative Names fields), so we should really be talking in terms of IDNA (i.e. ASCII).

This partially reverts commit 1bf8f1991f, where I added a lot of Unicode=>IDNA conversions when writing configuration files. Instead I'm doing Unicode=>IDNA before email addresses get into the users/aliases table. Now we assume the database uses IDNA-encoded ASCII domain names. When adding/removing aliases, addresses are converted to ASCII (w/ IDNA). User accounts must be ASCII-only anyway because of Dovecot's auth limitations, so we don't do any IDNA conversion (don't want to change the user's login info behind their back!). The aliases control panel page converts domains back to Unicode for display to be nice. The status checks converts the domains to Unicode just for the output headings.

A migration is added to convert existing aliases with Unicode domains into IDNA. Any custom DNS or web settings with Unicode may need to be changed.

Future support for SMTPUTF8 will probably need to add columns in the users/aliases table so that it lists both IDNA and Unicode forms.
2015-04-09 14:46:02 +00:00
..
bootstrap.sh Version 0.08 2015-04-01 10:14:34 -04:00
csr_country_codes.tsv when asking for a CSR country code, give the user a list 2014-08-21 17:28:04 +00:00
dkim.sh the opendmarc miter should run on incoming mail only 2015-03-21 16:14:01 +00:00
dns.sh for .fund domains use RSASHA256 DNSSEC keys 2014-12-05 12:03:21 -05:00
firstuser.sh move the user-interactive questions and other parts of start.sh into new files 2014-08-25 08:09:37 -04:00
functions.sh upgrade to ownCloud 8.0.2 2015-03-28 11:08:57 -04:00
mail-dovecot.sh Add POP3S support (merge w/ adjustments) 2015-04-09 08:19:20 -04:00
mail-postfix.sh the opendmarc miter should run on incoming mail only 2015-03-21 16:14:01 +00:00
mail-users.sh more work on making the bash scripts readable 2014-10-04 17:57:26 -04:00
management.sh run status checks each night and email the administrator with the changes from the previous day's results 2015-03-21 16:02:42 +00:00
migrate.py store IDNs (internationalized domain names) in IDNA (ASCII) in our database, not in Unicode 2015-04-09 14:46:02 +00:00
network-checks.sh prevent apt from asking the user any questions 2015-02-13 13:41:52 +00:00
owncloud.sh upgrade to ownCloud 8.0.2 2015-03-28 11:08:57 -04:00
preflight.sh preflight memory check: units problems 2015-01-11 14:13:35 +00:00
questions.sh prevent apt from asking the user any questions 2015-02-13 13:41:52 +00:00
spamassassin.sh Add POP3s support 2015-01-25 23:37:01 -08:00
ssl.sh Typo 2015-01-29 17:03:20 +00:00
start.sh if a migration fails, dont continue setup 2015-04-09 14:46:02 +00:00
system.sh upgrade to ownCloud 8.0.2 2015-03-28 11:08:57 -04:00
web.sh implement Mozilla (e.g. Thunderbird) autoconfiguration file 2015-01-31 21:33:18 +00:00
webmail.sh upgrade to ownCloud 8.0.2 2015-03-28 11:08:57 -04:00
zpush.sh upgrade to ownCloud 8.0.2 2015-03-28 11:08:57 -04:00