More postfix config
This commit is contained in:
parent
42000fd748
commit
5c43260089
|
@ -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 <EMAIL@ADDRESS>\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 "`<http://www.opendkim.org/>`_"
|
||||
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 "`<https://github.com/trusteddomainproject/OpenDMARC>`_"
|
||||
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 ""
|
||||
|
||||
|
|
|
@ -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
|
||||
=====
|
||||
|
|
Loading…
Reference in a new issue