set utf8mb4 charset in mailman-web

This commit is contained in:
Matthew Saunders Brown 2024-12-30 09:27:37 -08:00
parent 633bad9a30
commit 7874a8fadc

View File

@ -46,6 +46,9 @@ IP=`ip route get 1.1.1.1| head -n 1 | cut -d ' ' -f 7`
sed -i "s|root@localhost|webmaster@$FQDN|g" /etc/mailman3/mailman-web.py
sed -i "s|MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')|MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1', '$IP')|g" /etc/mailman3/mailman-web.py
sed -i "s|'django_mailman3.lib.auth.fedora',|#'django_mailman3.lib.auth.fedora',|g" /etc/mailman3/mailman-web.py
# the multiple slashes in the append are for adding spaces
sed -i "/'OPTIONS': {/a \ \ \ \ \ \ \ \ \ \ \ \ 'charset': 'utf8mb4'," /etc/mailman3/mailman-web.py
sed -i "/'OPTIONS': {/a \ \ \ \ \ \ \ \ \ \ \ \ # use utf8mb4, which is what the tables should already be set to" /etc/mailman3/mailman-web.py
sed -i 's|# SECURE_PROXY_SSL_HEADER =|SECURE_PROXY_SSL_HEADER =|g' /etc/mailman3/mailman-web.py
sed -i "s|TIME_ZONE =.*|TIME_ZONE = '$TIMEZONE'|g" /etc/mailman3/mailman-web.py
sed -i "s|localhost.local|$FQDN|g" /etc/mailman3/mailman-web.py