postfix, DNS

This commit is contained in:
Jeff Moe 2024-09-01 11:55:01 -06:00
parent 9ad571f383
commit 509e8f353f
2 changed files with 120 additions and 64 deletions

View file

@ -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 11:45-0600\n"
"POT-Creation-Date: 2024-09-01 11:54-0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
@ -50,7 +50,7 @@ msgstr ""
msgid "For more information and details about what is what, refer to that site."
msgstr ""
#: ../../../_source/mail-libre-is.rst:20 ../../../_source/mail-libre-is.rst:222
#: ../../../_source/mail-libre-is.rst:20 ../../../_source/mail-libre-is.rst:233
msgid "Dovecot"
msgstr ""
@ -58,11 +58,11 @@ msgstr ""
msgid "`<https://dovecot.org/>`_"
msgstr ""
#: ../../../_source/mail-libre-is.rst:25 ../../../_source/mail-libre-is.rst:68
#: ../../../_source/mail-libre-is.rst:25 ../../../_source/mail-libre-is.rst:79
msgid "MariaDB"
msgstr ""
#: ../../../_source/mail-libre-is.rst:28 ../../../_source/mail-libre-is.rst:413
#: ../../../_source/mail-libre-is.rst:28 ../../../_source/mail-libre-is.rst:449
msgid "OpenDKIM"
msgstr ""
@ -70,7 +70,7 @@ msgstr ""
msgid "`<http://www.opendkim.org/>`_"
msgstr ""
#: ../../../_source/mail-libre-is.rst:32 ../../../_source/mail-libre-is.rst:421
#: ../../../_source/mail-libre-is.rst:32 ../../../_source/mail-libre-is.rst:457
msgid "OpenDMARC"
msgstr ""
@ -82,7 +82,7 @@ msgstr ""
msgid "`<https://github.com/trusteddomainproject/OpenDMARC>`_"
msgstr ""
#: ../../../_source/mail-libre-is.rst:38 ../../../_source/mail-libre-is.rst:120
#: ../../../_source/mail-libre-is.rst:38 ../../../_source/mail-libre-is.rst:131
msgid "Postfix"
msgstr ""
@ -90,203 +90,223 @@ msgstr ""
msgid "`<https://www.postfix.org/>`_"
msgstr ""
#: ../../../_source/mail-libre-is.rst:44
msgid "Debian"
#: ../../../_source/mail-libre-is.rst:44 ../../../_source/mail-libre-is.rst:472
msgid "DNS"
msgstr ""
#: ../../../_source/mail-libre-is.rst:45
msgid "Add a DNS mx record, so it returns result like this:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:55
msgid "Debian"
msgstr ""
#: ../../../_source/mail-libre-is.rst:56
msgid ""
"Install Debian stable (bookworm). Install rsyslog for old school "
"convenience:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:54
#: ../../../_source/mail-libre-is.rst:65
msgid "Apache"
msgstr ""
#: ../../../_source/mail-libre-is.rst:55
#: ../../../_source/mail-libre-is.rst:66
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."
msgstr ""
#: ../../../_source/mail-libre-is.rst:64
#: ../../../_source/mail-libre-is.rst:75
msgid "Open up firewall ports 80 and 443."
msgstr ""
#: ../../../_source/mail-libre-is.rst:69
#: ../../../_source/mail-libre-is.rst:80
msgid "The main database server."
msgstr ""
#: ../../../_source/mail-libre-is.rst:77
#: ../../../_source/mail-libre-is.rst:88
msgid "Add databases. Change password to something secure."
msgstr ""
#: ../../../_source/mail-libre-is.rst:121
#: ../../../_source/mail-libre-is.rst:132
msgid "The main SMTP mail server."
msgstr ""
#: ../../../_source/mail-libre-is.rst:128
#: ../../../_source/mail-libre-is.rst:139
msgid ""
"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:141
#: ../../../_source/mail-libre-is.rst:152
msgid "Edit /etc/postfix/mysql-virtual-mailbox-maps.cf and add below contents:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:151
#: ../../../_source/mail-libre-is.rst:162
msgid "Edit /etc/postfix/mysql-virtual-alias-maps.cf and add below:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:161
#: ../../../_source/mail-libre-is.rst:172
msgid "Edit /etc/postfix/mysql-email2email.cf and add:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:171
#: ../../../_source/mail-libre-is.rst:182
msgid "Then run these commands:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:188
#: ../../../_source/mail-libre-is.rst:199
msgid "Redis"
msgstr ""
#: ../../../_source/mail-libre-is.rst:189
#: ../../../_source/mail-libre-is.rst:200
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:198
#: ../../../_source/mail-libre-is.rst:209
msgid "rspamd"
msgstr ""
#: ../../../_source/mail-libre-is.rst:199
#: ../../../_source/mail-libre-is.rst:210
msgid "Spam control."
msgstr ""
#: ../../../_source/mail-libre-is.rst:207
#: ../../../_source/mail-libre-is.rst:218
msgid "Certbot"
msgstr ""
#: ../../../_source/mail-libre-is.rst:208
#: ../../../_source/mail-libre-is.rst:219
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:223
#: ../../../_source/mail-libre-is.rst:234
msgid "Just using encrypted IMAPS, not POP."
msgstr ""
#: ../../../_source/mail-libre-is.rst:230
#: ../../../_source/mail-libre-is.rst:241
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:237
#: ../../../_source/mail-libre-is.rst:248
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:246
#: ../../../_source/mail-libre-is.rst:257
msgid "Add user and set up configs"
msgstr ""
#: ../../../_source/mail-libre-is.rst:274
#: ../../../_source/mail-libre-is.rst:285
msgid "Edit /etc/dovecot/conf.d/10-master.conf and add:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:285
#: ../../../_source/mail-libre-is.rst:296
msgid ""
"Edit /etc/dovecot/conf.d/10-ssl.conf, set key locations, and make it "
"required."
msgstr ""
#: ../../../_source/mail-libre-is.rst:294
#: ../../../_source/mail-libre-is.rst:305
msgid ""
"Edit /etc/dovecot/dovecot-sql.conf.ext file and add these lines at the "
"bottom, changing the password to the mailserver database password."
msgstr ""
#: ../../../_source/mail-libre-is.rst:317
#: ../../../_source/mail-libre-is.rst:328
msgid "Set file permissions."
msgstr ""
#: ../../../_source/mail-libre-is.rst:324
#: ../../../_source/mail-libre-is.rst:335
msgid "Edit /etc/dovecot/conf.d/10-master.conf and change to:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:337
#: ../../../_source/mail-libre-is.rst:348
msgid "Restart dovecot server."
msgstr ""
#: ../../../_source/mail-libre-is.rst:343
#: ../../../_source/mail-libre-is.rst:354
msgid "Run this to tell postfix to deliver to dovecot:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:349
#: ../../../_source/mail-libre-is.rst:360
msgid "Edit /etc/dovecot/conf.d/20-lmtp.conf and change line like this:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:356
#: ../../../_source/mail-libre-is.rst:367
msgid "Restart dovecot again...."
msgstr ""
#: ../../../_source/mail-libre-is.rst:364
#: ../../../_source/mail-libre-is.rst:375
msgid "More postfix"
msgstr ""
#: ../../../_source/mail-libre-is.rst:365
#: ../../../_source/mail-libre-is.rst:376
msgid "More postfix configuration, now that the above is set up."
msgstr ""
#: ../../../_source/mail-libre-is.rst:367
#: ../../../_source/mail-libre-is.rst:378
msgid "Set postfix to use dovecot for authentication:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:381
#: ../../../_source/mail-libre-is.rst:392
msgid "Edit /etc/postfix/master.cf and change thusly:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:399
#: ../../../_source/mail-libre-is.rst:409
msgid "Run:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:415
msgid "Restart postfix:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:405
msgid "Make sure all is good:"
#: ../../../_source/mail-libre-is.rst:421
msgid ""
"Does it ever end? Edit /etc/postfix/master.cf and add to bottom of "
"submission section."
msgstr ""
#: ../../../_source/mail-libre-is.rst:422
msgid "Requires database setup."
msgstr ""
#: ../../../_source/mail-libre-is.rst:431
msgid "SPF"
msgstr ""
#: ../../../_source/mail-libre-is.rst:432
msgid "Set up SPF."
msgstr ""
#: ../../../_source/mail-libre-is.rst:436
msgid "DNS"
msgstr ""
#: ../../../_source/mail-libre-is.rst:437
msgid "Set up DNS."
#: ../../../_source/mail-libre-is.rst:433
msgid ""
"Allow aliases to send by adding this file (XXX check OK) "
"/etc/postfix/aliases.cf with this contents:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:441
msgid "Make sure all is good:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:458
msgid "Requires database setup."
msgstr ""
#: ../../../_source/mail-libre-is.rst:467
msgid "SPF"
msgstr ""
#: ../../../_source/mail-libre-is.rst:468
msgid "Set up SPF."
msgstr ""
#: ../../../_source/mail-libre-is.rst:473
msgid "Set up DNS."
msgstr ""
#: ../../../_source/mail-libre-is.rst:477
msgid "Other"
msgstr ""
#: ../../../_source/mail-libre-is.rst:442
#: ../../../_source/mail-libre-is.rst:478
msgid "Perhaps these too."
msgstr ""

View file

@ -40,6 +40,17 @@ Postfix
`<https://www.postfix.org/>`_
DNS
===
Add a DNS mx record, so it returns result like this:
.. code-block:: sh
$ host -t mx libre.is
libre.is mail is handled by 10 mail.libre.is.
Debian
======
Install Debian stable (bookworm).
@ -395,6 +406,11 @@ Edit /etc/postfix/master.cf and change thusly:
-o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
Run:
.. code-block:: sh
sudo postconf smtpd_sender_login_maps=mysql:/etc/postfix/mysql-email2email.cf
Restart postfix:
@ -402,6 +418,26 @@ Restart postfix:
sudo systemctl restart postfix
Does it ever end? Edit /etc/postfix/master.cf and add to bottom of submission
section.
.. code-block:: cfg
-o smtpd_sender_restrictions=reject_sender_login_mismatch,permit_sasl_authenticated,reject
.. code-block:: sh
sudo systemctl restart postfix
Allow aliases to send by adding this file (XXX check OK)
/etc/postfix/aliases.cf with this contents:
.. code-block:: sql
SELECT email FROM virtual_users WHERE email='%s' UNION SELECT destination FROM virtual_aliases WHERE source='%s'
Make sure all is good:
.. code-block:: sh