docs: update Mail

This commit is contained in:
2022-10-12 19:28:12 +03:00
parent 3f2260fad8
commit e39fcd07b9

19
Mail.md
View File

@@ -2,7 +2,7 @@
title: Mail
description: Overview of mail settings, and sending system mail.
published: true
date: 2022-10-05T11:13:02.325Z
date: 2022-10-12T16:28:10.053Z
tags: config, mail
editor: markdown
dateCreated: 2021-08-27T14:00:37.062Z
@@ -26,16 +26,13 @@ sender: matan@pukeko.xyz
Port `465` with SSL should work, though untested.
## System mail via `sendmail`
Gentoo mailing is... weird. Postfix works as is (see [here](https://wiki.gentoo.org/wiki/Postfix)), but `mailx` appears not to, sticking us with `sendmail`.
To send email, you need two things:
- A local mail daemon (we use `postfix`).
- A mail command (we use `mailx`)
To send an acceptable (not pretty - acceptable) mail run:
`echo "Subject: [subject]" | sendmail -F "Takahe" -f "takahe@pukeko.xyz" -t matanhorovitz@protonmail.com <<< $([message-body])`
> Example: Tacocat!
`echo "Subject: tacocat" | sendmail -F "Takahe" -f "takahe@pukeko.xyz" -t matanhorovitz@protonmail.com <<< $(echo tacocat)`
{.is-info}
`echo "[message body]" | mail -s "[subject]" -f "[from address]" [to address]`
Example: Tacocat!
So long as it works, right?
## Nextcloud mail
Nextcloud requires STARTTLS on port 25 - see this example:
![nextcloud_mail.png](/nextcloud_mail.png)
`echo "tacocat" | mail --subject="Takahe's got something important to say" matanhorovitz@protonmail.com`
{.is-info}