Compare commits

..

2 commits

Author SHA1 Message Date
Jeff Moe 6fda76bc77 Mail admin SQL 2024-09-01 12:39:55 -06:00
Jeff Moe 53ccf3851b DNS 2024-09-01 11:55:45 -06:00
2 changed files with 262 additions and 54 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:54-0600\n"
"POT-Creation-Date: 2024-09-01 12:39-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:233
#: ../../../_source/mail-libre-is.rst:20 ../../../_source/mail-libre-is.rst:236
msgid "Dovecot"
msgstr ""
@ -58,11 +58,11 @@ msgstr ""
msgid "`<https://dovecot.org/>`_"
msgstr ""
#: ../../../_source/mail-libre-is.rst:25 ../../../_source/mail-libre-is.rst:79
#: ../../../_source/mail-libre-is.rst:25 ../../../_source/mail-libre-is.rst:82
msgid "MariaDB"
msgstr ""
#: ../../../_source/mail-libre-is.rst:28 ../../../_source/mail-libre-is.rst:449
#: ../../../_source/mail-libre-is.rst:28 ../../../_source/mail-libre-is.rst:452
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:457
#: ../../../_source/mail-libre-is.rst:32 ../../../_source/mail-libre-is.rst:460
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:131
#: ../../../_source/mail-libre-is.rst:38 ../../../_source/mail-libre-is.rst:134
msgid "Postfix"
msgstr ""
@ -90,7 +90,7 @@ msgstr ""
msgid "`<https://www.postfix.org/>`_"
msgstr ""
#: ../../../_source/mail-libre-is.rst:44 ../../../_source/mail-libre-is.rst:472
#: ../../../_source/mail-libre-is.rst:44 ../../../_source/mail-libre-is.rst:475
msgid "DNS"
msgstr ""
@ -98,215 +98,303 @@ msgstr ""
msgid "Add a DNS mx record, so it returns result like this:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:55
#: ../../../_source/mail-libre-is.rst:52
msgid "Set IP for mail.libre.is. Set up reverse DNS records."
msgstr ""
#: ../../../_source/mail-libre-is.rst:58
msgid "Debian"
msgstr ""
#: ../../../_source/mail-libre-is.rst:56
#: ../../../_source/mail-libre-is.rst:59
msgid ""
"Install Debian stable (bookworm). Install rsyslog for old school "
"convenience:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:65
#: ../../../_source/mail-libre-is.rst:68
msgid "Apache"
msgstr ""
#: ../../../_source/mail-libre-is.rst:66
#: ../../../_source/mail-libre-is.rst:69
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:75
#: ../../../_source/mail-libre-is.rst:78
msgid "Open up firewall ports 80 and 443."
msgstr ""
#: ../../../_source/mail-libre-is.rst:80
#: ../../../_source/mail-libre-is.rst:83
msgid "The main database server."
msgstr ""
#: ../../../_source/mail-libre-is.rst:88
#: ../../../_source/mail-libre-is.rst:91
msgid "Add databases. Change password to something secure."
msgstr ""
#: ../../../_source/mail-libre-is.rst:132
#: ../../../_source/mail-libre-is.rst:135
msgid "The main SMTP mail server."
msgstr ""
#: ../../../_source/mail-libre-is.rst:139
#: ../../../_source/mail-libre-is.rst:142
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:152
#: ../../../_source/mail-libre-is.rst:155
msgid "Edit /etc/postfix/mysql-virtual-mailbox-maps.cf and add below contents:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:162
#: ../../../_source/mail-libre-is.rst:165
msgid "Edit /etc/postfix/mysql-virtual-alias-maps.cf and add below:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:172
#: ../../../_source/mail-libre-is.rst:175
msgid "Edit /etc/postfix/mysql-email2email.cf and add:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:182
#: ../../../_source/mail-libre-is.rst:185
msgid "Then run these commands:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:199
#: ../../../_source/mail-libre-is.rst:202
msgid "Redis"
msgstr ""
#: ../../../_source/mail-libre-is.rst:200
#: ../../../_source/mail-libre-is.rst:203
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:209
#: ../../../_source/mail-libre-is.rst:212
msgid "rspamd"
msgstr ""
#: ../../../_source/mail-libre-is.rst:210
#: ../../../_source/mail-libre-is.rst:213
msgid "Spam control."
msgstr ""
#: ../../../_source/mail-libre-is.rst:218
#: ../../../_source/mail-libre-is.rst:221
msgid "Certbot"
msgstr ""
#: ../../../_source/mail-libre-is.rst:219
#: ../../../_source/mail-libre-is.rst:222
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:234
#: ../../../_source/mail-libre-is.rst:237
msgid "Just using encrypted IMAPS, not POP."
msgstr ""
#: ../../../_source/mail-libre-is.rst:241
#: ../../../_source/mail-libre-is.rst:244
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:248
#: ../../../_source/mail-libre-is.rst:251
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:257
#: ../../../_source/mail-libre-is.rst:260
msgid "Add user and set up configs"
msgstr ""
#: ../../../_source/mail-libre-is.rst:285
#: ../../../_source/mail-libre-is.rst:288
msgid "Edit /etc/dovecot/conf.d/10-master.conf and add:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:296
#: ../../../_source/mail-libre-is.rst:299
msgid ""
"Edit /etc/dovecot/conf.d/10-ssl.conf, set key locations, and make it "
"required."
msgstr ""
#: ../../../_source/mail-libre-is.rst:305
#: ../../../_source/mail-libre-is.rst:308
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:328
#: ../../../_source/mail-libre-is.rst:331
msgid "Set file permissions."
msgstr ""
#: ../../../_source/mail-libre-is.rst:335
#: ../../../_source/mail-libre-is.rst:338
msgid "Edit /etc/dovecot/conf.d/10-master.conf and change to:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:348
#: ../../../_source/mail-libre-is.rst:351
msgid "Restart dovecot server."
msgstr ""
#: ../../../_source/mail-libre-is.rst:354
#: ../../../_source/mail-libre-is.rst:357
msgid "Run this to tell postfix to deliver to dovecot:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:360
#: ../../../_source/mail-libre-is.rst:363
msgid "Edit /etc/dovecot/conf.d/20-lmtp.conf and change line like this:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:367
#: ../../../_source/mail-libre-is.rst:370
msgid "Restart dovecot again...."
msgstr ""
#: ../../../_source/mail-libre-is.rst:375
#: ../../../_source/mail-libre-is.rst:378
msgid "More postfix"
msgstr ""
#: ../../../_source/mail-libre-is.rst:376
#: ../../../_source/mail-libre-is.rst:379
msgid "More postfix configuration, now that the above is set up."
msgstr ""
#: ../../../_source/mail-libre-is.rst:378
#: ../../../_source/mail-libre-is.rst:381
msgid "Set postfix to use dovecot for authentication:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:392
#: ../../../_source/mail-libre-is.rst:395
msgid "Edit /etc/postfix/master.cf and change thusly:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:409
#: ../../../_source/mail-libre-is.rst:412
msgid "Run:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:415
#: ../../../_source/mail-libre-is.rst:418
msgid "Restart postfix:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:421
#: ../../../_source/mail-libre-is.rst:424
msgid ""
"Does it ever end? Edit /etc/postfix/master.cf and add to bottom of "
"submission section."
msgstr ""
#: ../../../_source/mail-libre-is.rst:433
#: ../../../_source/mail-libre-is.rst:436
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
#: ../../../_source/mail-libre-is.rst:444
msgid "Make sure all is good:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:458
#: ../../../_source/mail-libre-is.rst:461
msgid "Requires database setup."
msgstr ""
#: ../../../_source/mail-libre-is.rst:467
#: ../../../_source/mail-libre-is.rst:470
msgid "SPF"
msgstr ""
#: ../../../_source/mail-libre-is.rst:468
#: ../../../_source/mail-libre-is.rst:471
msgid "Set up SPF."
msgstr ""
#: ../../../_source/mail-libre-is.rst:473
#: ../../../_source/mail-libre-is.rst:476
msgid "Set up DNS."
msgstr ""
#: ../../../_source/mail-libre-is.rst:477
#: ../../../_source/mail-libre-is.rst:481
msgid "Administration"
msgstr ""
#: ../../../_source/mail-libre-is.rst:482
msgid "Now that everything is working..."
msgstr ""
#: ../../../_source/mail-libre-is.rst:484
msgid "Log into the database using the mailadmin databse password:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:492
msgid "List Virtual Domains"
msgstr ""
#: ../../../_source/mail-libre-is.rst:500
msgid "List Virtual Users"
msgstr ""
#: ../../../_source/mail-libre-is.rst:508
msgid "List Virtual Aliases"
msgstr ""
#: ../../../_source/mail-libre-is.rst:516
msgid "Add Virtual Domain"
msgstr ""
#: ../../../_source/mail-libre-is.rst:518
msgid "Add the domain:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:526
msgid "Add a Mail User"
msgstr ""
#: ../../../_source/mail-libre-is.rst:527
msgid "Generate a password with dovecot:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:533
msgid ""
"Log into database as mailadmin and run this command, using the dovecot "
"generated password string, and set the domain and user email."
msgstr ""
#: ../../../_source/mail-libre-is.rst:536
msgid "Note, upstream docs are missing \"(\" and \")\" for VALUES."
msgstr ""
#: ../../../_source/mail-libre-is.rst:546
msgid "Add a User Alias"
msgstr ""
#: ../../../_source/mail-libre-is.rst:547
msgid ""
"Example to add an alias. The first email should be the alias, the second "
"email is where it should go to."
msgstr ""
#: ../../../_source/mail-libre-is.rst:558
msgid "Change a User Password"
msgstr ""
#: ../../../_source/mail-libre-is.rst:559
msgid "Generate string for new password:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:565
msgid "Use that string:"
msgstr ""
#: ../../../_source/mail-libre-is.rst:573
msgid "Delete Virtual Domain"
msgstr ""
#: ../../../_source/mail-libre-is.rst:581
msgid "Delete User"
msgstr ""
#: ../../../_source/mail-libre-is.rst:589
msgid "Delete Alias"
msgstr ""
#: ../../../_source/mail-libre-is.rst:597
msgid "Other"
msgstr ""
#: ../../../_source/mail-libre-is.rst:478
#: ../../../_source/mail-libre-is.rst:598
msgid "Perhaps these too."
msgstr ""

View file

@ -49,6 +49,9 @@ Add a DNS mx record, so it returns result like this:
$ host -t mx libre.is
libre.is mail is handled by 10 mail.libre.is.
Set IP for mail.libre.is.
Set up reverse DNS records.
Debian
@ -473,6 +476,123 @@ DNS
Set up DNS.
Administration
==============
Now that everything is working...
Log into the database using the mailadmin databse password:
.. code-block:: sh
mariadb -u mailadmin -p mailserver
List Virtual Domains
--------------------
.. code-block:: sql
SELECT * FROM virtual_domains;
List Virtual Users
------------------
.. code-block:: sql
SELECT * FROM virtual_users;
List Virtual Aliases
--------------------
.. code-block:: sql
SELECT * FROM virtual_aliases;
Add Virtual Domain
------------------
Add the domain:
.. code-block:: sql
INSERT INTO virtual_domains (name) VALUES ("example.org");
Add a Mail User
---------------
Generate a password with dovecot:
.. code-block:: sh
sudo dovecot pw -s BLF-CRYPT
Log into database as mailadmin and run this command, using the dovecot
generated password string, and set the domain and user email.
Note, upstream docs are missing "(" and ")" for VALUES.
.. code-block:: sql
INSERT INTO virtual_users (domain_id, email, password) VALUES
((SELECT id FROM virtual_domains WHERE name='example.org'),
'john@example.org','{BLF-CRYPT}$2y$05$.We…');
Add a User Alias
----------------
Example to add an alias. The first email should be the alias,
the second email is where it should go to.
.. code-block:: sql
INSERT INTO virtual_aliases (domain_id, source, destination) VALUES
( (SELECT id FROM virtual_domains WHERE name='example.org'),
'melissa@example.org', 'juila@example.net');
Change a User Password
----------------------
Generate string for new password:
.. code-block:: sh
sudo dovecot pw -s BLF-CRYPT
Use that string:
.. code-block:: sql
UPDATE virtual_users SET password='{BLF-CRYPT}$2y$05$.We…' WHERE email='email@address';
Delete Virtual Domain
---------------------
.. code-block:: sql
DELETE FROM virtual_domains where name='example.org';
Delete User
-----------
.. code-block:: sql
DELETE FROM virtual_users WHERE email='john@example.org';
Delete Alias
------------
.. code-block:: sql
DELETE FROM virtual_aliases WHERE source='melissa@example.org';
Other
=====
Perhaps these too.