From 5c43260089c61f6ef6f735f89829c20398adcad1 Mon Sep 17 00:00:00 2001 From: Jeff Moe Date: Sun, 1 Sep 2024 10:53:05 -0600 Subject: [PATCH] More postfix config --- .../locale/en/LC_MESSAGES/mail-libre-is.po | 149 ++++++++++-------- docs/_source/mail-libre-is.rst | 58 +++++++ 2 files changed, 144 insertions(+), 63 deletions(-) diff --git a/docs/_source/locale/en/LC_MESSAGES/mail-libre-is.po b/docs/_source/locale/en/LC_MESSAGES/mail-libre-is.po index 64922a7..6d6be0c 100644 --- a/docs/_source/locale/en/LC_MESSAGES/mail-libre-is.po +++ b/docs/_source/locale/en/LC_MESSAGES/mail-libre-is.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Libre Developers Documentation 0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-01 10:31-0600\n" +"POT-Creation-Date: 2024-09-01 10:53-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: en\n" @@ -30,8 +30,8 @@ msgstr "" #: ../../../_source/mail-libre-is.rst:6 msgid "" -"Setting up Internet mail servers is a pain. It's nothing like just setting " -"up a web server... This install is based on this guide:" +"Setting up Internet mail servers is a pain. It's nothing like just " +"setting up a web server... This install is based on this guide:" msgstr "" #: ../../../_source/mail-libre-is.rst:10 @@ -42,7 +42,7 @@ msgstr "" msgid "Main Components" msgstr "" -#: ../../../_source/mail-libre-is.rst:16 ../../../_source/mail-libre-is.rst:124 +#: ../../../_source/mail-libre-is.rst:16 ../../../_source/mail-libre-is.rst:208 msgid "Dovecot" msgstr "" @@ -54,7 +54,7 @@ msgstr "" msgid "MariaDB" msgstr "" -#: ../../../_source/mail-libre-is.rst:24 ../../../_source/mail-libre-is.rst:150 +#: ../../../_source/mail-libre-is.rst:24 ../../../_source/mail-libre-is.rst:234 msgid "OpenDKIM" msgstr "" @@ -62,7 +62,7 @@ msgstr "" msgid "``_" msgstr "" -#: ../../../_source/mail-libre-is.rst:28 ../../../_source/mail-libre-is.rst:158 +#: ../../../_source/mail-libre-is.rst:28 ../../../_source/mail-libre-is.rst:242 msgid "OpenDMARC" msgstr "" @@ -74,7 +74,7 @@ msgstr "" msgid "``_" msgstr "" -#: ../../../_source/mail-libre-is.rst:34 ../../../_source/mail-libre-is.rst:80 +#: ../../../_source/mail-libre-is.rst:34 ../../../_source/mail-libre-is.rst:106 msgid "Postfix" msgstr "" @@ -88,9 +88,9 @@ msgstr "" #: ../../../_source/mail-libre-is.rst:41 msgid "" -"The Apache webserver is used out of laziness as it allows easy certificate " -"updates with certbot. A webmail server won't be running on the main mail " -"server." +"The Apache webserver is used out of laziness as it allows easy " +"certificate updates with certbot. A webmail server won't be running on " +"the main mail server." msgstr "" #: ../../../_source/mail-libre-is.rst:50 @@ -105,79 +105,102 @@ msgstr "" msgid "Add databases. Change password to something secure." msgstr "" -#: ../../../_source/mail-libre-is.rst:81 +#: ../../../_source/mail-libre-is.rst:107 msgid "The main SMTP mail server." msgstr "" -#: ../../../_source/mail-libre-is.rst:90 -msgid "Redis" -msgstr "" - -#: ../../../_source/mail-libre-is.rst:91 +#: ../../../_source/mail-libre-is.rst:114 msgid "" -"Note, the licensing of Redis has gone bad. The version in Debian is OK. But " -"in the future, probably replace with a fork." +"Set up postfix to use MariaDB. Edit /etc/postfix/mysql-virtual-mailbox-" +"domains.cf and add below, using the mailserver password used in MariaDB." msgstr "" -#: ../../../_source/mail-libre-is.rst:100 -msgid "rspamd" +#: ../../../_source/mail-libre-is.rst:127 +msgid "Edit /etc/postfix/mysql-virtual-mailbox-maps.cf and add below contents:" msgstr "" -#: ../../../_source/mail-libre-is.rst:101 -msgid "Spam control." +#: ../../../_source/mail-libre-is.rst:137 +msgid "Edit /etc/postfix/mysql-virtual-alias-maps.cf and add below:" msgstr "" -#: ../../../_source/mail-libre-is.rst:109 -msgid "Certbot" +#: ../../../_source/mail-libre-is.rst:147 +msgid "Edit /etc/postfix/mysql-email2email.cf and add:" msgstr "" -#: ../../../_source/mail-libre-is.rst:110 -msgid "" -"Encryption certificates with Let's Encrypt. Not using an Apache webserver on " -"the mail server makes getting new certificates a bit more complex." -msgstr "" - -#: ../../../_source/mail-libre-is.rst:125 -msgid "Just using encrypted IMAPS, not POP." -msgstr "" - -#: ../../../_source/mail-libre-is.rst:132 -msgid "" -"Note, since IPv6 isn't being used, the dovecot install barfs. Edit /etc/" -"dovecot/dovecot.conf and add this line, where appropriate:" -msgstr "" - -#: ../../../_source/mail-libre-is.rst:139 -msgid "" -"Note, this is removing the \"::\" from listen, which using IPv6. Then re-run " -"the install so the packages are happy. Note, the re-install won't overwrite " -"the \"listen\" change." -msgstr "" - -#: ../../../_source/mail-libre-is.rst:159 -msgid "Requires database setup." -msgstr "" - -#: ../../../_source/mail-libre-is.rst:168 -msgid "SPF" -msgstr "" - -#: ../../../_source/mail-libre-is.rst:169 -msgid "Set up SPF." -msgstr "" - -#: ../../../_source/mail-libre-is.rst:173 -msgid "DNS" +#: ../../../_source/mail-libre-is.rst:157 +msgid "Then run these commands:" msgstr "" #: ../../../_source/mail-libre-is.rst:174 +msgid "Redis" +msgstr "" + +#: ../../../_source/mail-libre-is.rst:175 +msgid "" +"Note, the licensing of Redis has gone bad. The version in Debian is OK. " +"But in the future, probably replace with a fork." +msgstr "" + +#: ../../../_source/mail-libre-is.rst:184 +msgid "rspamd" +msgstr "" + +#: ../../../_source/mail-libre-is.rst:185 +msgid "Spam control." +msgstr "" + +#: ../../../_source/mail-libre-is.rst:193 +msgid "Certbot" +msgstr "" + +#: ../../../_source/mail-libre-is.rst:194 +msgid "" +"Encryption certificates with Let's Encrypt. Not using an Apache webserver" +" on the mail server makes getting new certificates a bit more complex." +msgstr "" + +#: ../../../_source/mail-libre-is.rst:209 +msgid "Just using encrypted IMAPS, not POP." +msgstr "" + +#: ../../../_source/mail-libre-is.rst:216 +msgid "" +"Note, since IPv6 isn't being used, the dovecot install barfs. Edit " +"/etc/dovecot/dovecot.conf and add this line, where appropriate:" +msgstr "" + +#: ../../../_source/mail-libre-is.rst:223 +msgid "" +"Note, this is removing the \"::\" from listen, which using IPv6. Then re-" +"run the install so the packages are happy. Note, the re-install won't " +"overwrite the \"listen\" change." +msgstr "" + +#: ../../../_source/mail-libre-is.rst:243 +msgid "Requires database setup." +msgstr "" + +#: ../../../_source/mail-libre-is.rst:252 +msgid "SPF" +msgstr "" + +#: ../../../_source/mail-libre-is.rst:253 +msgid "Set up SPF." +msgstr "" + +#: ../../../_source/mail-libre-is.rst:257 +msgid "DNS" +msgstr "" + +#: ../../../_source/mail-libre-is.rst:258 msgid "Set up DNS." msgstr "" -#: ../../../_source/mail-libre-is.rst:178 +#: ../../../_source/mail-libre-is.rst:262 msgid "Other" msgstr "" -#: ../../../_source/mail-libre-is.rst:179 +#: ../../../_source/mail-libre-is.rst:263 msgid "Perhaps these too." msgstr "" + diff --git a/docs/_source/mail-libre-is.rst b/docs/_source/mail-libre-is.rst index e4784de..a71f6cd 100644 --- a/docs/_source/mail-libre-is.rst +++ b/docs/_source/mail-libre-is.rst @@ -111,6 +111,64 @@ The main SMTP mail server. sudo apt install postfix sudo apt install postfix-mysql +Set up postfix to use MariaDB. +Edit /etc/postfix/mysql-virtual-mailbox-domains.cf +and add below, using the mailserver password used in MariaDB. + +.. code-block:: sh + + user = mailserver + password = password + hosts = 127.0.0.1 + dbname = mailserver + query = SELECT 1 FROM virtual_domains WHERE name='%s' + + +Edit /etc/postfix/mysql-virtual-mailbox-maps.cf and add below contents: + +.. code-block:: sh + + user = mailserver + password = password + hosts = 127.0.0.1 + dbname = mailserver + query = SELECT 1 FROM virtual_users WHERE email='%s' + +Edit /etc/postfix/mysql-virtual-alias-maps.cf and add below: + +.. code-block:: sh + + user = mailserver + password = password + hosts = 127.0.0.1 + dbname = mailserver + query = SELECT destination FROM virtual_aliases WHERE source='%s' + +Edit /etc/postfix/mysql-email2email.cf and add: + +.. code-block:: sh + + user = mailserver + password = password + hosts = 127.0.0.1 + dbname = mailserver + query = SELECT email FROM virtual_users WHERE email='%s' + +Then run these commands: + +.. code-block:: sh + + sudo postconf \ + virtual_mailbox_domains=mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf + sudo postconf \ + virtual_mailbox_maps=mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf + sudo postconf \ + virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf + sudo postconf \ + virtual_alias_maps=mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf + sudo chgrp postfix /etc/postfix/mysql-*.cf + sudo chmod 640 /etc/postfix/mysql-*.cf + Redis =====